aboutsummaryrefslogtreecommitdiff
path: root/xorg-server/exa
diff options
context:
space:
mode:
Diffstat (limited to 'xorg-server/exa')
-rw-r--r--xorg-server/exa/exa_priv.h1
-rw-r--r--xorg-server/exa/exa_unaccel.c16
2 files changed, 13 insertions, 4 deletions
diff --git a/xorg-server/exa/exa_priv.h b/xorg-server/exa/exa_priv.h
index 70075786a..1f5605687 100644
--- a/xorg-server/exa/exa_priv.h
+++ b/xorg-server/exa/exa_priv.h
@@ -208,6 +208,7 @@ typedef struct {
RegionRec srcReg;
RegionRec maskReg;
PixmapPtr srcPix;
+ PixmapPtr maskPix;
DevPrivateKeyRec pixmapPrivateKeyRec;
DevPrivateKeyRec gcPrivateKeyRec;
diff --git a/xorg-server/exa/exa_unaccel.c b/xorg-server/exa/exa_unaccel.c
index 571613886..b0a0011cb 100644
--- a/xorg-server/exa/exa_unaccel.c
+++ b/xorg-server/exa/exa_unaccel.c
@@ -442,6 +442,13 @@ ExaSrcValidate(DrawablePtr pDrawable,
RegionPtr dst;
int xoff, yoff;
+ if (pExaScr->srcPix == pPix)
+ dst = &pExaScr->srcReg;
+ else if (pExaScr->maskPix == pPix)
+ dst = &pExaScr->maskReg;
+ else
+ return;
+
exaGetDrawableDeltas(pDrawable, pPix, &xoff, &yoff);
box.x1 = x + xoff;
@@ -449,8 +456,6 @@ ExaSrcValidate(DrawablePtr pDrawable,
box.x2 = box.x1 + width;
box.y2 = box.y1 + height;
- dst = (pExaScr->srcPix == pPix) ? &pExaScr->srcReg : &pExaScr->maskReg;
-
RegionInit(&reg, &box, 1);
RegionUnion(dst, dst, &reg);
RegionUninit(&reg);
@@ -495,16 +500,19 @@ ExaPrepareCompositeReg(ScreenPtr pScreen,
if (pSrc != pDst)
RegionTranslate(pSrc->pCompositeClip,
-pSrc->pDrawable->x, -pSrc->pDrawable->y);
- }
+ } else
+ pExaScr->srcPix = NULL;
if (pMask && pMask->pDrawable) {
pMaskPix = exaGetDrawablePixmap(pMask->pDrawable);
RegionNull(&pExaScr->maskReg);
maskReg = &pExaScr->maskReg;
+ pExaScr->maskPix = pMaskPix;
if (pMask != pDst && pMask != pSrc)
RegionTranslate(pMask->pCompositeClip,
-pMask->pDrawable->x, -pMask->pDrawable->y);
- }
+ } else
+ pExaScr->maskPix = NULL;
RegionTranslate(pDst->pCompositeClip,
-pDst->pDrawable->x, -pDst->pDrawable->y);