[PATCH] EXA: Use correct coordinate system for calculating Composite fallback region.
Michel Dänzer
michel at daenzer.net
Wed Dec 2 02:48:11 PST 2009
From: Michel Dänzer <daenzer at vmware.com>
Fixes incorrectly skipped rendering of some Composite operations to windows.
Signed-off-by: Michel Dänzer <daenzer at vmware.com>
---
exa/exa_unaccel.c | 24 +++++++++++++++++++++++-
1 files changed, 23 insertions(+), 1 deletions(-)
diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c
index 1bc3eac..b100af2 100644
--- a/exa/exa_unaccel.c
+++ b/exa/exa_unaccel.c
@@ -423,11 +423,33 @@ ExaCheckComposite (CARD8 op,
if (!exaOpReadsDestination(op) && pExaScr->prepare_access_reg) {
PixmapPtr pDstPix;
+ if (pSrc->pDrawable) {
+ xSrc += pSrc->pDrawable->x;
+ ySrc += pSrc->pDrawable->y;
+ }
+
+ if (pMask && pMask->pDrawable) {
+ xMask += pMask->pDrawable->x;
+ yMask += pMask->pDrawable->y;
+ }
+
if (!miComputeCompositeRegion (®ion, pSrc, pMask, pDst,
- xSrc, ySrc, xMask, yMask, xDst, yDst,
+ xSrc, ySrc, xMask, yMask,
+ xDst + pDst->pDrawable->x,
+ yDst + pDst->pDrawable->y,
width, height))
goto skip;
+ if (pSrc->pDrawable) {
+ xSrc -= pSrc->pDrawable->x;
+ ySrc -= pSrc->pDrawable->y;
+ }
+
+ if (pMask && pMask->pDrawable) {
+ xMask -= pMask->pDrawable->x;
+ yMask -= pMask->pDrawable->y;
+ }
+
pDstPix = exaGetDrawablePixmap(pDst->pDrawable);
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &xoff, &yoff);
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
--
1.6.4.3
More information about the xorg-devel
mailing list