EXA: Bail earlier from exaDoPutImage if the driver has no UploadToScreen hook.
Also remove dead code associated with access_prepared local variable.
This commit is contained in:
parent
00fe4a2977
commit
2415e2dce9
@ -149,10 +149,9 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||||||
int nbox;
|
int nbox;
|
||||||
int xoff, yoff;
|
int xoff, yoff;
|
||||||
int bpp = pDrawable->bitsPerPixel;
|
int bpp = pDrawable->bitsPerPixel;
|
||||||
Bool access_prepared = FALSE;
|
|
||||||
Bool ret = TRUE;
|
Bool ret = TRUE;
|
||||||
|
|
||||||
if (pExaPixmap->accel_blocked)
|
if (pExaPixmap->accel_blocked || !pExaScr->info->UploadToScreen)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
/* Don't bother with under 8bpp, XYPixmaps. */
|
/* Don't bother with under 8bpp, XYPixmaps. */
|
||||||
@ -179,7 +178,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||||||
|
|
||||||
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
pPix = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff);
|
||||||
|
|
||||||
if (!pPix || !pExaScr->info->UploadToScreen)
|
if (!pPix)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
x += pDrawable->x;
|
x += pDrawable->x;
|
||||||
@ -221,9 +220,7 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (access_prepared)
|
if (ret)
|
||||||
exaFinishAccess(pDrawable, EXA_PREPARE_DEST);
|
|
||||||
else
|
|
||||||
exaMarkSync(pDrawable->pScreen);
|
exaMarkSync(pDrawable->pScreen);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
Loading…
Reference in New Issue
Block a user