EXA: Make sure damage tracking code is inactive if the driver manages pixmaps.
It was always supposed to be like that... It was only recently pointed out (in a rather convoluted way) that it was not in fact the case.
This commit is contained in:
parent
073116cc44
commit
4212599c92
28
exa/exa.c
28
exa/exa.c
|
@ -159,7 +159,7 @@ exaPixmapDirty (PixmapPtr pPix, int x1, int y1, int x2, int y2)
|
||||||
RegionPtr pDamageReg;
|
RegionPtr pDamageReg;
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
|
|
||||||
if (!pExaPixmap)
|
if (!pExaPixmap || !pExaPixmap->pDamage)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
box.x1 = max(x1, 0);
|
box.x1 = max(x1, 0);
|
||||||
|
@ -334,6 +334,7 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
|
||||||
paddedWidth, NULL);
|
paddedWidth, NULL);
|
||||||
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
pExaPixmap->fb_ptr = NULL;
|
pExaPixmap->fb_ptr = NULL;
|
||||||
|
pExaPixmap->pDamage = NULL;
|
||||||
} else {
|
} else {
|
||||||
pExaPixmap->driverPriv = NULL;
|
pExaPixmap->driverPriv = NULL;
|
||||||
/* Scratch pixmaps may have w/h equal to zero, and may not be
|
/* Scratch pixmaps may have w/h equal to zero, and may not be
|
||||||
|
@ -358,22 +359,23 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth,
|
||||||
fbDestroyPixmap(pPixmap);
|
fbDestroyPixmap(pPixmap);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Set up damage tracking */
|
||||||
|
pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL,
|
||||||
|
DamageReportRawRegion, TRUE,
|
||||||
|
pScreen, pPixmap);
|
||||||
|
|
||||||
|
if (pExaPixmap->pDamage == NULL) {
|
||||||
|
fbDestroyPixmap (pPixmap);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
|
DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
|
||||||
|
DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
|
||||||
}
|
}
|
||||||
|
|
||||||
pExaPixmap->area = NULL;
|
pExaPixmap->area = NULL;
|
||||||
|
|
||||||
/* Set up damage tracking */
|
|
||||||
pExaPixmap->pDamage = DamageCreate (ExaDamageReport, NULL, DamageReportRawRegion, TRUE,
|
|
||||||
pScreen, pPixmap);
|
|
||||||
|
|
||||||
if (pExaPixmap->pDamage == NULL) {
|
|
||||||
fbDestroyPixmap (pPixmap);
|
|
||||||
return NULL;
|
|
||||||
}
|
|
||||||
|
|
||||||
DamageRegister (&pPixmap->drawable, pExaPixmap->pDamage);
|
|
||||||
DamageSetReportAfterOp (pExaPixmap->pDamage, TRUE);
|
|
||||||
|
|
||||||
/* None of the pixmap bits are valid initially */
|
/* None of the pixmap bits are valid initially */
|
||||||
REGION_NULL(pScreen, &pExaPixmap->validSys);
|
REGION_NULL(pScreen, &pExaPixmap->validSys);
|
||||||
REGION_NULL(pScreen, &pExaPixmap->validFB);
|
REGION_NULL(pScreen, &pExaPixmap->validFB);
|
||||||
|
|
|
@ -144,7 +144,6 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
|
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
|
||||||
ExaPixmapPriv(pPix);
|
ExaPixmapPriv(pPix);
|
||||||
ExaMigrationRec pixmaps[1];
|
|
||||||
RegionPtr pClip;
|
RegionPtr pClip;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -166,11 +165,16 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
if (pExaScr->swappedOut)
|
if (pExaScr->swappedOut)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
pixmaps[0].as_dst = TRUE;
|
if (pExaPixmap->pDamage) {
|
||||||
pixmaps[0].as_src = FALSE;
|
ExaMigrationRec pixmaps[1];
|
||||||
pixmaps[0].pPix = pPix;
|
|
||||||
pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage);
|
pixmaps[0].as_dst = TRUE;
|
||||||
exaDoMigration (pixmaps, 1, TRUE);
|
pixmaps[0].as_src = FALSE;
|
||||||
|
pixmaps[0].pPix = pPix;
|
||||||
|
pixmaps[0].pReg = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
|
||||||
|
exaDoMigration (pixmaps, 1, TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||||
|
|
||||||
|
@ -297,14 +301,19 @@ exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
|
||||||
.x2 = pDrawable->x + dx + sw, .y2 = pDrawable->y + dy + sh };
|
.x2 = pDrawable->x + dx + sw, .y2 = pDrawable->y + dy + sh };
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
RegionPtr pending_damage = NULL;
|
||||||
|
|
||||||
REGION_INIT(pScreen, ®ion, &box, 1);
|
if (pExaPixmap->pDamage)
|
||||||
|
pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
if (pending_damage) {
|
||||||
|
REGION_INIT(pScreen, ®ion, &box, 1);
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
exaGetDrawableDeltas(pDrawable, pPixmap, &xoff, &yoff);
|
||||||
REGION_UNION(pScreen, pending_damage, pending_damage, ®ion);
|
|
||||||
|
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
||||||
|
REGION_UNION(pScreen, pending_damage, pending_damage, ®ion);
|
||||||
|
}
|
||||||
|
|
||||||
if (!exaDoShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh,
|
if (!exaDoShmPutImage(pDrawable, pGC, depth, format, w, h, sx, sy, sw, sh,
|
||||||
dx, dy, data)) {
|
dx, dy, data)) {
|
||||||
|
@ -318,10 +327,12 @@ exaShmPutImage(DrawablePtr pDrawable, GCPtr pGC, int depth, unsigned int format,
|
||||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, ®ion, -xoff, -yoff);
|
if (pending_damage) {
|
||||||
DamageDamageRegion(pDrawable, ®ion);
|
REGION_TRANSLATE(pScreen, ®ion, -xoff, -yoff);
|
||||||
|
DamageDamageRegion(pDrawable, ®ion);
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
REGION_UNINIT(pScreen, ®ion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ShmFuncs exaShmFuncs = { NULL, exaShmPutImage };
|
ShmFuncs exaShmFuncs = { NULL, exaShmPutImage };
|
||||||
|
@ -968,16 +979,23 @@ exaImageGlyphBlt (DrawablePtr pDrawable,
|
||||||
FbBits depthMask;
|
FbBits depthMask;
|
||||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDrawable);
|
||||||
ExaPixmapPriv(pPixmap);
|
ExaPixmapPriv(pPixmap);
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
RegionPtr pending_damage = NULL;
|
||||||
BoxRec extents = *REGION_EXTENTS(pScreen, pending_damage);
|
BoxRec extents;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
|
|
||||||
if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
|
if (pExaPixmap->pDamage)
|
||||||
return;
|
pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
|
||||||
depthMask = FbFullMask(pDrawable->depth);
|
if (pending_damage) {
|
||||||
|
extents = *REGION_EXTENTS(pScreen, pending_damage);
|
||||||
|
|
||||||
if ((pGC->planemask & depthMask) != depthMask)
|
if (extents.x1 >= extents.x2 || extents.y1 >= extents.y2)
|
||||||
|
return;
|
||||||
|
|
||||||
|
depthMask = FbFullMask(pDrawable->depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!pending_damage || (pGC->planemask & depthMask) != depthMask)
|
||||||
{
|
{
|
||||||
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
|
ExaCheckImageGlyphBlt(pDrawable, pGC, x, y, nglyph, ppciInit, pglyphBase);
|
||||||
return;
|
return;
|
||||||
|
|
178
exa/exa_render.c
178
exa/exa_render.c
|
@ -466,66 +466,68 @@ exaCompositeRects(CARD8 op,
|
||||||
{
|
{
|
||||||
PixmapPtr pPixmap = exaGetDrawablePixmap(pDst->pDrawable);
|
PixmapPtr pPixmap = exaGetDrawablePixmap(pDst->pDrawable);
|
||||||
ExaPixmapPriv(pPixmap);
|
ExaPixmapPriv(pPixmap);
|
||||||
|
|
||||||
int xoff, yoff;
|
|
||||||
int x1 = MAXSHORT;
|
|
||||||
int y1 = MAXSHORT;
|
|
||||||
int x2 = MINSHORT;
|
|
||||||
int y2 = MINSHORT;
|
|
||||||
RegionRec region;
|
RegionRec region;
|
||||||
RegionPtr pending_damage;
|
|
||||||
BoxRec box;
|
|
||||||
int n;
|
int n;
|
||||||
ExaCompositeRectPtr r;
|
ExaCompositeRectPtr r;
|
||||||
|
|
||||||
/* We have to manage the damage ourselves, since CompositeRects isn't
|
if (pExaPixmap->pDamage) {
|
||||||
* something in the screen that can be managed by the damage extension,
|
int xoff, yoff;
|
||||||
* and EXA depends on damage to track what needs to be migrated between
|
int x1 = MAXSHORT;
|
||||||
* offscreen and onscreen.
|
int y1 = MAXSHORT;
|
||||||
*/
|
int x2 = MINSHORT;
|
||||||
|
int y2 = MINSHORT;
|
||||||
|
RegionPtr pending_damage;
|
||||||
|
BoxRec box;
|
||||||
|
|
||||||
/* Compute the overall extents of the composited region - we're making
|
/* We have to manage the damage ourselves, since CompositeRects isn't
|
||||||
* the assumption here that we are compositing a bunch of glyphs that
|
* something in the screen that can be managed by the damage extension,
|
||||||
* cluster closely together and damaging each glyph individually would
|
* and EXA depends on damage to track what needs to be migrated between
|
||||||
* be a loss compared to damaging the bounding box.
|
* offscreen and onscreen.
|
||||||
*/
|
*/
|
||||||
n = nrect;
|
|
||||||
r = rects;
|
|
||||||
while (n--) {
|
|
||||||
int rect_x2 = r->xDst + r->width;
|
|
||||||
int rect_y2 = r->yDst + r->width;
|
|
||||||
|
|
||||||
if (r->xDst < x1) x1 = r->xDst;
|
/* Compute the overall extents of the composited region - we're making
|
||||||
if (r->xDst < y1) y1 = r->xDst;
|
* the assumption here that we are compositing a bunch of glyphs that
|
||||||
if (rect_x2 > x2) x2 = rect_x2;
|
* cluster closely together and damaging each glyph individually would
|
||||||
if (rect_y2 > y2) y2 = rect_y2;
|
* be a loss compared to damaging the bounding box.
|
||||||
|
*/
|
||||||
|
n = nrect;
|
||||||
|
r = rects;
|
||||||
|
while (n--) {
|
||||||
|
int rect_x2 = r->xDst + r->width;
|
||||||
|
int rect_y2 = r->yDst + r->width;
|
||||||
|
|
||||||
r++;
|
if (r->xDst < x1) x1 = r->xDst;
|
||||||
|
if (r->xDst < y1) y1 = r->xDst;
|
||||||
|
if (rect_x2 > x2) x2 = rect_x2;
|
||||||
|
if (rect_y2 > y2) y2 = rect_y2;
|
||||||
|
|
||||||
|
r++;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (x2 <= x1 && y2 <= y1)
|
||||||
|
return;
|
||||||
|
|
||||||
|
box.x1 = x1;
|
||||||
|
box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT;
|
||||||
|
box.y1 = y1;
|
||||||
|
box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
|
||||||
|
|
||||||
|
/* The pixmap migration code relies on pendingDamage indicating
|
||||||
|
* the bounds of the current rendering, so we need to force
|
||||||
|
* the actual damage into that region before we do anything, and
|
||||||
|
* (see use of DamagePendingRegion in exaCopyDirty)
|
||||||
|
*/
|
||||||
|
|
||||||
|
REGION_INIT(pScreen, ®ion, &box, 1);
|
||||||
|
|
||||||
|
exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
|
||||||
|
|
||||||
|
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
||||||
|
pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
REGION_UNION(pScreen, pending_damage, pending_damage, ®ion);
|
||||||
|
REGION_TRANSLATE(pScreen, ®ion, -xoff, -yoff);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (x2 <= x1 && y2 <= y1)
|
|
||||||
return;
|
|
||||||
|
|
||||||
box.x1 = x1;
|
|
||||||
box.x2 = x2 < MAXSHORT ? x2 : MAXSHORT;
|
|
||||||
box.y1 = y1;
|
|
||||||
box.y2 = y2 < MAXSHORT ? y2 : MAXSHORT;
|
|
||||||
|
|
||||||
/* The pixmap migration code relies on pendingDamage indicating
|
|
||||||
* the bounds of the current rendering, so we need to force
|
|
||||||
* the actual damage into that region before we do anything, and
|
|
||||||
* (see use of DamagePendingRegion in exaCopyDirty)
|
|
||||||
*/
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, ®ion, &box, 1);
|
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDst->pDrawable, pPixmap, &xoff, &yoff);
|
|
||||||
|
|
||||||
REGION_TRANSLATE(pScreen, ®ion, xoff, yoff);
|
|
||||||
pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
|
||||||
REGION_UNION(pScreen, pending_damage, pending_damage, ®ion);
|
|
||||||
REGION_TRANSLATE(pScreen, ®ion, -xoff, -yoff);
|
|
||||||
|
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
ValidatePicture (pSrc);
|
ValidatePicture (pSrc);
|
||||||
|
@ -546,14 +548,16 @@ exaCompositeRects(CARD8 op,
|
||||||
|
|
||||||
/************************************************************/
|
/************************************************************/
|
||||||
|
|
||||||
/* Now we have to flush the damage out from pendingDamage => damage
|
if (pExaPixmap->pDamage) {
|
||||||
* Calling DamageDamageRegion has that effect. (We could pass
|
/* Now we have to flush the damage out from pendingDamage => damage
|
||||||
* in an empty region here, but we pass in the same region we
|
* Calling DamageDamageRegion has that effect. (We could pass
|
||||||
* use above; the effect is the same.)
|
* in an empty region here, but we pass in the same region we
|
||||||
*/
|
* use above; the effect is the same.)
|
||||||
|
*/
|
||||||
|
|
||||||
DamageDamageRegion(pDst->pDrawable, ®ion);
|
DamageDamageRegion(pDst->pDrawable, ®ion);
|
||||||
REGION_UNINIT(pScreen, ®ion);
|
REGION_UNINIT(pScreen, ®ion);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
|
@ -1067,23 +1071,26 @@ exaTrapezoids (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
DrawablePtr pDraw = pDst->pDrawable;
|
DrawablePtr pDraw = pDst->pDrawable;
|
||||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||||
ExaPixmapPriv (pixmap);
|
ExaPixmapPriv (pixmap);
|
||||||
RegionRec migration;
|
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
|
||||||
int xoff, yoff;
|
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
if (pExaPixmap->pDamage) {
|
||||||
|
RegionRec migration;
|
||||||
|
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
xoff += pDraw->x;
|
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
||||||
yoff += pDraw->y;
|
|
||||||
|
|
||||||
bounds.x1 += xoff;
|
xoff += pDraw->x;
|
||||||
bounds.y1 += yoff;
|
yoff += pDraw->y;
|
||||||
bounds.x2 += xoff;
|
|
||||||
bounds.y2 += yoff;
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, &migration, &bounds, 1);
|
bounds.x1 += xoff;
|
||||||
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
bounds.y1 += yoff;
|
||||||
REGION_UNINIT(pScreen, &migration);
|
bounds.x2 += xoff;
|
||||||
|
bounds.y2 += yoff;
|
||||||
|
|
||||||
|
REGION_INIT(pScreen, &migration, &bounds, 1);
|
||||||
|
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
||||||
|
REGION_UNINIT(pScreen, &migration);
|
||||||
|
}
|
||||||
|
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
|
|
||||||
|
@ -1170,23 +1177,26 @@ exaTriangles (CARD8 op, PicturePtr pSrc, PicturePtr pDst,
|
||||||
DrawablePtr pDraw = pDst->pDrawable;
|
DrawablePtr pDraw = pDst->pDrawable;
|
||||||
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
PixmapPtr pixmap = exaGetDrawablePixmap (pDraw);
|
||||||
ExaPixmapPriv (pixmap);
|
ExaPixmapPriv (pixmap);
|
||||||
RegionRec migration;
|
|
||||||
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
|
||||||
int xoff, yoff;
|
|
||||||
|
|
||||||
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
if (pExaPixmap->pDamage) {
|
||||||
|
RegionRec migration;
|
||||||
|
RegionPtr pending_damage = DamagePendingRegion(pExaPixmap->pDamage);
|
||||||
|
int xoff, yoff;
|
||||||
|
|
||||||
xoff += pDraw->x;
|
exaGetDrawableDeltas(pDraw, pixmap, &xoff, &yoff);
|
||||||
yoff += pDraw->y;
|
|
||||||
|
|
||||||
bounds.x1 += xoff;
|
xoff += pDraw->x;
|
||||||
bounds.y1 += yoff;
|
yoff += pDraw->y;
|
||||||
bounds.x2 += xoff;
|
|
||||||
bounds.y2 += yoff;
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, &migration, &bounds, 1);
|
bounds.x1 += xoff;
|
||||||
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
bounds.y1 += yoff;
|
||||||
REGION_UNINIT(pScreen, &migration);
|
bounds.x2 += xoff;
|
||||||
|
bounds.y2 += yoff;
|
||||||
|
|
||||||
|
REGION_INIT(pScreen, &migration, &bounds, 1);
|
||||||
|
REGION_UNION(pScreen, pending_damage, pending_damage, &migration);
|
||||||
|
REGION_UNINIT(pScreen, &migration);
|
||||||
|
}
|
||||||
|
|
||||||
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
exaPrepareAccess(pDraw, EXA_PREPARE_DEST);
|
||||||
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
|
(*ps->AddTriangles) (pDst, 0, 0, ntri, tris);
|
||||||
|
|
|
@ -104,8 +104,8 @@ ExaCheckPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth,
|
||||||
pGC->alu))
|
pGC->alu))
|
||||||
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
exaPrepareAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
else
|
else
|
||||||
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST,
|
exaPrepareAccessReg (pDrawable, EXA_PREPARE_DEST, pExaPixmap->pDamage ?
|
||||||
DamagePendingRegion(pExaPixmap->pDamage));
|
DamagePendingRegion(pExaPixmap->pDamage) : NULL);
|
||||||
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
fbPutImage (pDrawable, pGC, depth, x, y, w, h, leftPad, format, bits);
|
||||||
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
exaFinishAccess (pDrawable, EXA_PREPARE_DEST);
|
||||||
}
|
}
|
||||||
|
@ -362,23 +362,22 @@ ExaCheckComposite (CARD8 op,
|
||||||
CARD32
|
CARD32
|
||||||
exaGetPixmapFirstPixel (PixmapPtr pPixmap)
|
exaGetPixmapFirstPixel (PixmapPtr pPixmap)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pPixmap->drawable.pScreen);
|
|
||||||
CARD32 pixel;
|
CARD32 pixel;
|
||||||
void *fb;
|
void *fb;
|
||||||
Bool need_finish = FALSE;
|
Bool need_finish = FALSE;
|
||||||
BoxRec box;
|
BoxRec box;
|
||||||
RegionRec migration;
|
RegionRec migration;
|
||||||
ExaPixmapPriv (pPixmap);
|
ExaPixmapPriv (pPixmap);
|
||||||
Bool sys_valid = !miPointInRegion(&pExaPixmap->validSys, 0, 0, &box);
|
Bool sys_valid = pExaPixmap->pDamage &&
|
||||||
Bool damaged = miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0,
|
!miPointInRegion(&pExaPixmap->validSys, 0, 0, &box);
|
||||||
&box);
|
Bool damaged = pExaPixmap->pDamage &&
|
||||||
|
miPointInRegion(DamageRegion(pExaPixmap->pDamage), 0, 0, &box);
|
||||||
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
|
Bool offscreen = exaPixmapIsOffscreen(pPixmap);
|
||||||
|
|
||||||
fb = pExaPixmap->sys_ptr;
|
fb = pExaPixmap->sys_ptr;
|
||||||
|
|
||||||
/* Try to avoid framebuffer readbacks */
|
/* Try to avoid framebuffer readbacks */
|
||||||
if (pExaScr->info->CreatePixmap ||
|
if ((!offscreen && !sys_valid && !damaged) ||
|
||||||
(!offscreen && !sys_valid && !damaged) ||
|
|
||||||
(offscreen && (!sys_valid || damaged)))
|
(offscreen && (!sys_valid || damaged)))
|
||||||
{
|
{
|
||||||
box.x1 = 0;
|
box.x1 = 0;
|
||||||
|
|
Loading…
Reference in New Issue