EXA: Don't use UTS/DFS directly for Put/GetImage when there's a system copy.
We want to save the result in the system memory copy, in case we'll need it again for subsequent software fallbacks. Signed-off-by: Michel Dänzer <daenzer@vmware.com> Acked-By: Maarten Maathuis <madman2003@gmail.com> Signed-off-by: Keith Packard <keithp@keithp.com>
This commit is contained in:
parent
f28ca728e9
commit
db2c6f7c91
|
@ -157,6 +157,10 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || !pExaScr->info->UploadToScreen)
|
if (pExaScr->fallback_counter || pExaPixmap->accel_blocked || !pExaScr->info->UploadToScreen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
|
/* If there's a system copy, we want to save the result there */
|
||||||
|
if (pExaPixmap->pDamage)
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
/* Don't bother with under 8bpp, XYPixmaps. */
|
/* Don't bother with under 8bpp, XYPixmaps. */
|
||||||
if (format != ZPixmap || bpp < 8)
|
if (format != ZPixmap || bpp < 8)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -168,17 +172,6 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
||||||
if (pExaScr->swappedOut)
|
if (pExaScr->swappedOut)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (pExaScr->do_migration) {
|
|
||||||
ExaMigrationRec pixmaps[1];
|
|
||||||
|
|
||||||
pixmaps[0].as_dst = 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);
|
||||||
|
|
||||||
if (!pPix)
|
if (!pPix)
|
||||||
|
@ -1261,35 +1254,16 @@ exaGetImage (DrawablePtr pDrawable, int x, int y, int w, int h,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
|
PixmapPtr pPix = exaGetDrawablePixmap (pDrawable);
|
||||||
|
ExaPixmapPriv(pPix);
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
Bool ok;
|
Bool ok;
|
||||||
|
|
||||||
if (pExaScr->fallback_counter || pExaScr->swappedOut)
|
if (pExaScr->fallback_counter || pExaScr->swappedOut)
|
||||||
goto fallback;
|
goto fallback;
|
||||||
|
|
||||||
exaGetDrawableDeltas (pDrawable, pPix, &xoff, &yoff);
|
/* If there's a system copy, we want to save the result there */
|
||||||
|
if (pExaPixmap->pDamage)
|
||||||
if (pExaScr->do_migration) {
|
goto fallback;
|
||||||
BoxRec Box;
|
|
||||||
RegionRec Reg;
|
|
||||||
ExaMigrationRec pixmaps[1];
|
|
||||||
|
|
||||||
Box.x1 = pDrawable->x + x + xoff;
|
|
||||||
Box.y1 = pDrawable->y + y + yoff;
|
|
||||||
Box.x2 = Box.x1 + w;
|
|
||||||
Box.y2 = Box.y1 + h;
|
|
||||||
|
|
||||||
REGION_INIT(pScreen, &Reg, &Box, 1);
|
|
||||||
|
|
||||||
pixmaps[0].as_dst = FALSE;
|
|
||||||
pixmaps[0].as_src = TRUE;
|
|
||||||
pixmaps[0].pPix = pPix;
|
|
||||||
pixmaps[0].pReg = &Reg;
|
|
||||||
|
|
||||||
exaDoMigration(pixmaps, 1, FALSE);
|
|
||||||
|
|
||||||
REGION_UNINIT(pScreen, &Reg);
|
|
||||||
}
|
|
||||||
|
|
||||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue