summaryrefslogtreecommitdiff
authorMichel Dänzer <michel@tungstengraphics.com>2007-10-18 15:44:14 (GMT)
committer Michel Dänzer <michel@tungstengraphics.com>2007-10-18 15:44:14 (GMT)
commit5d74416740de883b7ef0994afea4bbd4d3901be0 (patch) (side-by-side diff)
treeb1f377b5057dbebd570905a2288c70b3ce37a4e7
parentfeac0759522cbdc3e61ccfa373df735903c5cb27 (diff)
downloadxserver-5d74416740de883b7ef0994afea4bbd4d3901be0.zip
xserver-5d74416740de883b7ef0994afea4bbd4d3901be0.tar.gz
EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
Diffstat (more/less context) (ignore whitespace changes)
-rw-r--r--exa/exa_accel.c3
-rw-r--r--exa/exa_migration.c3
-rw-r--r--exa/exa_render.c16
3 files changed, 20 insertions, 2 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c
index 8bbf036..52cc5c4 100644
--- a/exa/exa_accel.c
+++ b/exa/exa_accel.c
@@ -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;
diff --git a/exa/exa_migration.c b/exa/exa_migration.c
index 7968521..d69526b 100644
--- a/exa/exa_migration.c
+++ b/exa/exa_migration.c
@@ -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,
diff --git a/exa/exa_render.c b/exa/exa_render.c
index 2ad5304..65e67d8 100644
--- a/exa/exa_render.c
+++ b/exa/exa_render.c
@@ -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;