diff options
author | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-18 17:44:14 +0200 |
---|---|---|
committer | Michel Dänzer <michel@tungstengraphics.com> | 2007-10-18 17:44:14 +0200 |
commit | 5d74416740de883b7ef0994afea4bbd4d3901be0 (patch) | |
tree | b1f377b5057dbebd570905a2288c70b3ce37a4e7 /exa/exa_render.c | |
parent | feac0759522cbdc3e61ccfa373df735903c5cb27 (diff) |
EXA: Don't attempt to move in pixmaps that can't be accelerated.
Fixes https://bugs.freedesktop.org/show_bug.cgi?id=12815 .
Diffstat (limited to 'exa/exa_render.c')
-rw-r--r-- | exa/exa_render.c | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/exa/exa_render.c b/exa/exa_render.c index 2ad53041a..65e67d8d9 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, ®ion, dst_off_x, dst_off_y); - pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); pixel = exaGetPixmapFirstPixel (pSrcPix); pixmaps[0].as_dst = TRUE; |