diff options
author | Michel Dänzer <daenzer@vmware.com> | 2009-05-15 15:48:37 +0200 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-06-29 14:12:41 -0700 |
commit | cc5e4b632aa99623ff577776039287c5950d921d (patch) | |
tree | 1c9d5255783170a7ff7273d507116e21493e199f | |
parent | bbe0be1e459b0d5810a0e7b916cc890c440a4e21 (diff) |
EXA: Take GC client clip type into account for migration.
Fixes http://bugs.freedesktop.org/show_bug.cgi?id=18950 .
Signed-off-by: Michel Dänzer <daenzer@vmware.com>
(cherry picked from commit 850675d4de4373e5df95507dbf2cd9affaaf54bc)
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | exa/exa_accel.c | 35 | ||||
-rw-r--r-- | exa/exa_priv.h | 10 | ||||
-rw-r--r-- | exa/exa_render.c | 2 | ||||
-rw-r--r-- | exa/exa_unaccel.c | 2 |
4 files changed, 25 insertions, 24 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 453431e11..a50696d90 100644 --- a/exa/exa_accel.c +++ b/exa/exa_accel.c @@ -427,7 +427,8 @@ exaCopyNtoN (DrawablePtr pSrcDrawable, xfree(rects); if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask, - pGC->fillStyle, pGC->alu)) { + pGC->fillStyle, pGC->alu, + pGC->clientClipType)) { dstregion = REGION_CREATE(pScreen, NullBox, 0); REGION_COPY(pScreen, dstregion, srcregion); REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x, @@ -698,7 +699,8 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg, } static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, - Pixel pixel, CARD32 planemask, CARD32 alu); + Pixel pixel, CARD32 planemask, CARD32 alu, + unsigned int clientClipType); static void exaPolyFillRect(DrawablePtr pDrawable, @@ -751,10 +753,11 @@ exaPolyFillRect(DrawablePtr pDrawable, if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) && exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ? pGC->fgPixel : pGC->tile.pixel, pGC->planemask, - pGC->alu)) || + pGC->alu, pGC->clientClipType)) || (pGC->fillStyle == FillTiled && !pGC->tileIsPixel && exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg, - pGC->planemask, pGC->alu))) { + pGC->planemask, pGC->alu, + pGC->clientClipType))) { goto out; } } @@ -907,11 +910,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc) } static Bool -exaFillRegionSolid (DrawablePtr pDrawable, - RegionPtr pRegion, - Pixel pixel, - CARD32 planemask, - CARD32 alu) +exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel, + CARD32 planemask, CARD32 alu, unsigned int clientClipType) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable); @@ -924,7 +924,8 @@ exaFillRegionSolid (DrawablePtr pDrawable, pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap; pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid, - alu) ? NULL : pRegion; + alu, clientClipType) + ? NULL : pRegion; exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff); REGION_TRANSLATE(pScreen, pRegion, xoff, yoff); @@ -987,12 +988,9 @@ out: * Based on fbFillRegionTiled(), fbTile(). */ Bool -exaFillRegionTiled (DrawablePtr pDrawable, - RegionPtr pRegion, - PixmapPtr pTile, - DDXPointPtr pPatOrg, - CARD32 planemask, - CARD32 alu) +exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, + DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, + unsigned int clientClipType) { ExaScreenPriv(pDrawable->pScreen); PixmapPtr pPixmap; @@ -1015,13 +1013,14 @@ exaFillRegionTiled (DrawablePtr pDrawable, if (tileWidth == 1 && tileHeight == 1) return exaFillRegionSolid(pDrawable, pRegion, exaGetPixmapFirstPixel (pTile), planemask, - alu); + alu, clientClipType); pixmaps[0].as_dst = TRUE; pixmaps[0].as_src = FALSE; pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable); pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled, - alu) ? NULL : pRegion; + alu, clientClipType) + ? NULL : pRegion; pixmaps[1].as_dst = FALSE; pixmaps[1].as_src = TRUE; pixmaps[1].pPix = pTile; diff --git a/exa/exa_priv.h b/exa/exa_priv.h index 00a3c9a6c..0911c6d8a 100644 --- a/exa/exa_priv.h +++ b/exa/exa_priv.h @@ -343,11 +343,12 @@ ExaCheckAddTraps (PicturePtr pPicture, static _X_INLINE Bool exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask, - unsigned int fillStyle, unsigned char alu) + unsigned int fillStyle, unsigned char alu, + unsigned int clientClipType) { - return ((alu != GXcopy && alu != GXclear &&alu != GXset && + return ((alu != GXcopy && alu != GXclear && alu != GXset && alu != GXcopyInverted) || fillStyle == FillStippled || - !EXA_PM_IS_SOLID(pDrawable, planemask)); + clientClipType != CT_NONE || !EXA_PM_IS_SOLID(pDrawable, planemask)); } void @@ -355,7 +356,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc); Bool exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile, - DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu); + DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu, + unsigned int clientClipType); void exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h, diff --git a/exa/exa_render.c b/exa/exa_render.c index 45cfff70a..9a79b4781 100644 --- a/exa/exa_render.c +++ b/exa/exa_render.c @@ -905,7 +905,7 @@ exaComposite(CARD8 op, ret = exaFillRegionTiled(pDst->pDrawable, ®ion, (PixmapPtr)pSrc->pDrawable, - &patOrg, FB_ALLONES, GXcopy); + &patOrg, FB_ALLONES, GXcopy, CT_NONE); REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); diff --git a/exa/exa_unaccel.c b/exa/exa_unaccel.c index 2beeb443e..a515bac1f 100644 --- a/exa/exa_unaccel.c +++ b/exa/exa_unaccel.c @@ -101,7 +101,7 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable))); if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle, - pGC->alu)) + pGC->alu, pGC->clientClipType)) exaPrepareAccess (pDrawable, EXA_PREPARE_DEST); else exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ? |