summaryrefslogtreecommitdiff
path: root/fb
diff options
context:
space:
mode:
authorAlan Coopersmith <Alan.Coopersmith@sun.com>2005-08-01 22:22:16 +0000
committerAlan Coopersmith <Alan.Coopersmith@sun.com>2005-08-01 22:22:16 +0000
commit7c84189ea1dc236bc979bb4bf158ecb1a6b45137 (patch)
treebdd425537b98d08959fcbf0fc81287025ba0cb6f /fb
parent2acd29c93fd3b3d438887f0ca9be6713db81c1e8 (diff)
Bugzilla #3566 <https://bugs.freedesktop.org/show_bug.cgi?id=3566> PatchXORG-6_8_99_900
#2906 <https://bugs.freedesktop.org/attachment.cgi?id=2906> Fix for RENDER, repeating pictures and offscreen memory (Owen Taylor)
Diffstat (limited to 'fb')
-rw-r--r--fb/fbpict.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/fb/fbpict.c b/fb/fbpict.c
index 20d9ad559..ea45480b2 100644
--- a/fb/fbpict.c
+++ b/fb/fbpict.c
@@ -1265,30 +1265,34 @@ fbComposite (CARD8 op,
x_dst = pbox->x1;
if (maskRepeat)
{
- y_msk = mod (y_msk, pMask->pDrawable->height);
+ y_msk = mod (y_msk - pMask->pDrawable->y, pMask->pDrawable->height);
if (h_this > pMask->pDrawable->height - y_msk)
h_this = pMask->pDrawable->height - y_msk;
+ y_msk += pMask->pDrawable->y;
}
if (srcRepeat)
{
- y_src = mod (y_src, pSrc->pDrawable->height);
+ y_src = mod (y_src - pSrc->pDrawable->y, pSrc->pDrawable->height);
if (h_this > pSrc->pDrawable->height - y_src)
h_this = pSrc->pDrawable->height - y_src;
+ y_src += pSrc->pDrawable->y;
}
while (w)
{
w_this = w;
if (maskRepeat)
{
- x_msk = mod (x_msk, pMask->pDrawable->width);
+ x_msk = mod (x_msk - pMask->pDrawable->x, pMask->pDrawable->width);
if (w_this > pMask->pDrawable->width - x_msk)
w_this = pMask->pDrawable->width - x_msk;
+ x_msk += pMask->pDrawable->x;
}
if (srcRepeat)
{
- x_src = mod (x_src, pSrc->pDrawable->width);
+ x_src = mod (x_src - pSrc->pDrawable->x, pSrc->pDrawable->width);
if (w_this > pSrc->pDrawable->width - x_src)
w_this = pSrc->pDrawable->width - x_src;
+ x_src += pSrc->pDrawable->x;
}
(*func) (op, pSrc, pMask, pDst,
x_src, y_src, x_msk, y_msk, x_dst, y_dst,