summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOwen W. Taylor <otaylor@fishsoup.net>2008-04-03 14:50:05 -0400
committerMichel Dänzer <michel@tungstengraphics.com>2008-04-07 11:15:19 +0200
commit685a04c2bfa779203bd6101f065b682cc0552514 (patch)
tree80302f8aeac917981a4642362c8c382fd0588a9e
parentff886a66de637fce7f1669269e583434c419db95 (diff)
EXA: Fix TS origin computation when implementing RenderComposite with tiling.
(cherry picked from commit 6b1a27023e48b661c4bb3b61181ac57608d8e448)
-rw-r--r--exa/exa_render.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 38e2a04bd..da8140102 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, &region,
(PixmapPtr)pSrc->pDrawable,
- &srcOrg, FB_ALLONES, GXcopy);
+ &patOrg, FB_ALLONES, GXcopy);
REGION_UNINIT(pDst->pDrawable->pScreen, &region);