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>
This commit is contained in:
parent
c1bbac2708
commit
850675d4de
|
@ -406,7 +406,8 @@ exaHWCopyNtoN (DrawablePtr pSrcDrawable,
|
||||||
xfree(rects);
|
xfree(rects);
|
||||||
|
|
||||||
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
if (!pGC || !exaGCReadsDestination(pDstDrawable, pGC->planemask,
|
||||||
pGC->fillStyle, pGC->alu)) {
|
pGC->fillStyle, pGC->alu,
|
||||||
|
pGC->clientClipType)) {
|
||||||
dstregion = REGION_CREATE(pScreen, NullBox, 0);
|
dstregion = REGION_CREATE(pScreen, NullBox, 0);
|
||||||
REGION_COPY(pScreen, dstregion, srcregion);
|
REGION_COPY(pScreen, dstregion, srcregion);
|
||||||
REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x,
|
REGION_TRANSLATE(pScreen, dstregion, dst_off_x - dx - src_off_x,
|
||||||
|
@ -734,7 +735,8 @@ exaPolySegment (DrawablePtr pDrawable, GCPtr pGC, int nseg,
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion,
|
static Bool exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion,
|
||||||
Pixel pixel, CARD32 planemask, CARD32 alu);
|
Pixel pixel, CARD32 planemask, CARD32 alu,
|
||||||
|
unsigned int clientClipType);
|
||||||
|
|
||||||
static void
|
static void
|
||||||
exaPolyFillRect(DrawablePtr pDrawable,
|
exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
|
@ -787,10 +789,11 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) &&
|
if (((pGC->fillStyle == FillSolid || pGC->tileIsPixel) &&
|
||||||
exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ?
|
exaFillRegionSolid(pDrawable, pReg, pGC->fillStyle == FillSolid ?
|
||||||
pGC->fgPixel : pGC->tile.pixel, pGC->planemask,
|
pGC->fgPixel : pGC->tile.pixel, pGC->planemask,
|
||||||
pGC->alu)) ||
|
pGC->alu, pGC->clientClipType)) ||
|
||||||
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
|
(pGC->fillStyle == FillTiled && !pGC->tileIsPixel &&
|
||||||
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
|
exaFillRegionTiled(pDrawable, pReg, pGC->tile.pixmap, &pGC->patOrg,
|
||||||
pGC->planemask, pGC->alu))) {
|
pGC->planemask, pGC->alu,
|
||||||
|
pGC->clientClipType))) {
|
||||||
goto out;
|
goto out;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -952,11 +955,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
}
|
}
|
||||||
|
|
||||||
static Bool
|
static Bool
|
||||||
exaFillRegionSolid (DrawablePtr pDrawable,
|
exaFillRegionSolid (DrawablePtr pDrawable, RegionPtr pRegion, Pixel pixel,
|
||||||
RegionPtr pRegion,
|
CARD32 planemask, CARD32 alu, unsigned int clientClipType)
|
||||||
Pixel pixel,
|
|
||||||
CARD32 planemask,
|
|
||||||
CARD32 alu)
|
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
PixmapPtr pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||||
|
@ -969,7 +969,8 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
pixmaps[0].pPix = pPixmap;
|
pixmaps[0].pPix = pPixmap;
|
||||||
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
|
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillSolid,
|
||||||
alu) ? NULL : pRegion;
|
alu, clientClipType)
|
||||||
|
? NULL : pRegion;
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
REGION_TRANSLATE(pScreen, pRegion, xoff, yoff);
|
||||||
|
@ -1032,12 +1033,9 @@ out:
|
||||||
* Based on fbFillRegionTiled(), fbTile().
|
* Based on fbFillRegionTiled(), fbTile().
|
||||||
*/
|
*/
|
||||||
Bool
|
Bool
|
||||||
exaFillRegionTiled (DrawablePtr pDrawable,
|
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
||||||
RegionPtr pRegion,
|
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
|
||||||
PixmapPtr pTile,
|
unsigned int clientClipType)
|
||||||
DDXPointPtr pPatOrg,
|
|
||||||
CARD32 planemask,
|
|
||||||
CARD32 alu)
|
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pDrawable->pScreen);
|
ExaScreenPriv(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
|
@ -1060,13 +1058,14 @@ exaFillRegionTiled (DrawablePtr pDrawable,
|
||||||
if (tileWidth == 1 && tileHeight == 1)
|
if (tileWidth == 1 && tileHeight == 1)
|
||||||
return exaFillRegionSolid(pDrawable, pRegion,
|
return exaFillRegionSolid(pDrawable, pRegion,
|
||||||
exaGetPixmapFirstPixel (pTile), planemask,
|
exaGetPixmapFirstPixel (pTile), planemask,
|
||||||
alu);
|
alu, clientClipType);
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
pixmaps[0].as_dst = TRUE;
|
||||||
pixmaps[0].as_src = FALSE;
|
pixmaps[0].as_src = FALSE;
|
||||||
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
pixmaps[0].pPix = pPixmap = exaGetDrawablePixmap (pDrawable);
|
||||||
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled,
|
pixmaps[0].pReg = exaGCReadsDestination(pDrawable, planemask, FillTiled,
|
||||||
alu) ? NULL : pRegion;
|
alu, clientClipType)
|
||||||
|
? NULL : pRegion;
|
||||||
pixmaps[1].as_dst = FALSE;
|
pixmaps[1].as_dst = FALSE;
|
||||||
pixmaps[1].as_src = TRUE;
|
pixmaps[1].as_src = TRUE;
|
||||||
pixmaps[1].pPix = pTile;
|
pixmaps[1].pPix = pTile;
|
||||||
|
|
|
@ -415,11 +415,12 @@ ExaCheckAddTraps (PicturePtr pPicture,
|
||||||
|
|
||||||
static _X_INLINE Bool
|
static _X_INLINE Bool
|
||||||
exaGCReadsDestination(DrawablePtr pDrawable, unsigned long planemask,
|
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 ||
|
alu != GXcopyInverted) || fillStyle == FillStippled ||
|
||||||
!EXA_PM_IS_SOLID(pDrawable, planemask));
|
clientClipType != CT_NONE || !EXA_PM_IS_SOLID(pDrawable, planemask));
|
||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
|
@ -427,7 +428,8 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc);
|
||||||
|
|
||||||
Bool
|
Bool
|
||||||
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
exaFillRegionTiled (DrawablePtr pDrawable, RegionPtr pRegion, PixmapPtr pTile,
|
||||||
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu);
|
DDXPointPtr pPatOrg, CARD32 planemask, CARD32 alu,
|
||||||
|
unsigned int clientClipType);
|
||||||
|
|
||||||
void
|
void
|
||||||
exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||||
|
|
|
@ -945,7 +945,7 @@ exaComposite(CARD8 op,
|
||||||
|
|
||||||
ret = exaFillRegionTiled(pDst->pDrawable, ®ion,
|
ret = exaFillRegionTiled(pDst->pDrawable, ®ion,
|
||||||
(PixmapPtr)pSrc->pDrawable,
|
(PixmapPtr)pSrc->pDrawable,
|
||||||
&patOrg, FB_ALLONES, GXcopy);
|
&patOrg, FB_ALLONES, GXcopy, CT_NONE);
|
||||||
|
|
||||||
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
REGION_UNINIT(pDst->pDrawable->pScreen, ®ion);
|
||||||
|
|
||||||
|
|
|
@ -106,7 +106,7 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
||||||
EXA_GC_PROLOGUE(pGC);
|
EXA_GC_PROLOGUE(pGC);
|
||||||
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
EXA_FALLBACK(("to %p (%c)\n", pDrawable, exaDrawableLocation(pDrawable)));
|
||||||
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
|
if (exaGCReadsDestination(pDrawable, pGC->planemask, pGC->fillStyle,
|
||||||
pGC->alu))
|
pGC->alu, pGC->clientClipType))
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
else
|
else
|
||||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
|
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
|
||||||
|
|
Loading…
Reference in New Issue