EXA: Don't attempt to move in pixmaps that can't be accelerated.

Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
This commit is contained in:
Michel Dänzer 2007-10-18 17:44:14 +02:00
parent feac075952
commit 5d74416740
3 changed files with 20 additions and 2 deletions

View File

@ -152,6 +152,9 @@ exaDoPutImage (DrawablePtr pDrawable, GCPtr pGC, int depth, int x, int y,
int bpp = pDrawable->bitsPerPixel;
Bool access_prepared = FALSE;
if (pExaPixmap->accel_blocked)
return FALSE;
/* Don't bother with under 8bpp, XYPixmaps. */
if (format != ZPixmap || bpp < 8)
return FALSE;

View File

@ -299,6 +299,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate)
if (pPixmap->drawable.bitsPerPixel < 8)
return;
if (pExaPixmap->accel_blocked)
return;
if (pExaPixmap->area == NULL) {
pExaPixmap->area =
exaOffscreenAlloc (pScreen, pExaPixmap->fb_size,

View File

@ -247,10 +247,24 @@ exaTryDriverSolidFill(PicturePtr pSrc,
int nbox;
int dst_off_x, dst_off_y;
PixmapPtr pSrcPix, pDstPix;
ExaPixmapPrivPtr pSrcExaPix, pDstExaPix;
CARD32 pixel;
CARD16 red, green, blue, alpha;
ExaMigrationRec pixmaps[1];
pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pSrcExaPix = ExaGetPixmapPriv(pSrcPix);
pDstExaPix = ExaGetPixmapPriv(pDstPix);
/* Check whether the accelerator can use these pixmaps.
*/
if (pSrcExaPix->accel_blocked || pDstExaPix->accel_blocked)
{
return -1;
}
xDst += pDst->pDrawable->x;
yDst += pDst->pDrawable->y;
xSrc += pSrc->pDrawable->x;
@ -261,12 +275,10 @@ exaTryDriverSolidFill(PicturePtr pSrc,
width, height))
return 1;
pDstPix = exaGetDrawablePixmap (pDst->pDrawable);
exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y);
REGION_TRANSLATE(pScreen, &region, dst_off_x, dst_off_y);
pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable);
pixel = exaGetPixmapFirstPixel (pSrcPix);
pixmaps[0].as_dst = TRUE;