commit 2001989ab6c0910f88a60d0a1f681a9dae958475 Author: Owen W. Taylor Date: Thu Apr 3 14:50:05 2008 -0400 Fix TS origin computation when implementing RenderComposite with tiling diff --git a/exa/exa_render.c b/exa/exa_render.c index 38e2a04..da81401 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -650,7 +650,7 @@ exaComposite(CARD8 op, !pSrc->transform && pSrc->repeatType == RepeatNormal) { - DDXPointRec srcOrg; + DDXPointRec patOrg; /* Let's see if the driver can do the repeat in one go */ if (pExaScr->info->PrepareComposite && !pSrc->alphaMap && @@ -674,12 +674,14 @@ exaComposite(CARD8 op, width, height)) goto done; - srcOrg.x = (xSrc - xDst) % pSrc->pDrawable->width; - srcOrg.y = (ySrc - yDst) % pSrc->pDrawable->height; + /* pattern origin is the point in the destination drawable + * corresponding to (0,0) in the source */ + patOrg.x = xDst - xSrc; + patOrg.y = yDst - ySrc; ret = exaFillRegionTiled(pDst->pDrawable, ®ion, (PixmapPtr)pSrc->pDrawable, - &srcOrg, FB_ALLONES, GXcopy); + &patOrg, FB_ALLONES, GXcopy); REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);