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 | |
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 .
-rw-r--r-- | exa/exa_accel.c | 3 | ||||
-rw-r--r-- | exa/exa_migration.c | 3 | ||||
-rw-r--r-- | exa/exa_render.c | 16 |
3 files changed, 20 insertions, 2 deletions
diff --git a/exa/exa_accel.c b/exa/exa_accel.c index 8bbf036e4..52cc5c40a 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, | |||
152 | int bpp = pDrawable->bitsPerPixel; | 152 | int bpp = pDrawable->bitsPerPixel; |
153 | Bool access_prepared = FALSE; | 153 | Bool access_prepared = FALSE; |
154 | 154 | ||
155 | if (pExaPixmap->accel_blocked) | ||
156 | return FALSE; | ||
157 | |||
155 | /* Don't bother with under 8bpp, XYPixmaps. */ | 158 | /* Don't bother with under 8bpp, XYPixmaps. */ |
156 | if (format != ZPixmap || bpp < 8) | 159 | if (format != ZPixmap || bpp < 8) |
157 | return FALSE; | 160 | return FALSE; |
diff --git a/exa/exa_migration.c b/exa/exa_migration.c index 7968521c5..d69526b7f 100644 --- a/exa/exa_migration.c +++ b/exa/exa_migration.c | |||
@@ -299,6 +299,9 @@ exaDoMoveInPixmap (ExaMigrationPtr migrate) | |||
299 | if (pPixmap->drawable.bitsPerPixel < 8) | 299 | if (pPixmap->drawable.bitsPerPixel < 8) |
300 | return; | 300 | return; |
301 | 301 | ||
302 | if (pExaPixmap->accel_blocked) | ||
303 | return; | ||
304 | |||
302 | if (pExaPixmap->area == NULL) { | 305 | if (pExaPixmap->area == NULL) { |
303 | pExaPixmap->area = | 306 | pExaPixmap->area = |
304 | exaOffscreenAlloc (pScreen, pExaPixmap->fb_size, | 307 | exaOffscreenAlloc (pScreen, pExaPixmap->fb_size, |
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, | |||
247 | int nbox; | 247 | int nbox; |
248 | int dst_off_x, dst_off_y; | 248 | int dst_off_x, dst_off_y; |
249 | PixmapPtr pSrcPix, pDstPix; | 249 | PixmapPtr pSrcPix, pDstPix; |
250 | ExaPixmapPrivPtr pSrcExaPix, pDstExaPix; | ||
250 | CARD32 pixel; | 251 | CARD32 pixel; |
251 | CARD16 red, green, blue, alpha; | 252 | CARD16 red, green, blue, alpha; |
252 | ExaMigrationRec pixmaps[1]; | 253 | ExaMigrationRec pixmaps[1]; |
253 | 254 | ||
255 | pDstPix = exaGetDrawablePixmap (pDst->pDrawable); | ||
256 | pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); | ||
257 | |||
258 | pSrcExaPix = ExaGetPixmapPriv(pSrcPix); | ||
259 | pDstExaPix = ExaGetPixmapPriv(pDstPix); | ||
260 | |||
261 | /* Check whether the accelerator can use these pixmaps. | ||
262 | */ | ||
263 | if (pSrcExaPix->accel_blocked || pDstExaPix->accel_blocked) | ||
264 | { | ||
265 | return -1; | ||
266 | } | ||
267 | |||
254 | xDst += pDst->pDrawable->x; | 268 | xDst += pDst->pDrawable->x; |
255 | yDst += pDst->pDrawable->y; | 269 | yDst += pDst->pDrawable->y; |
256 | xSrc += pSrc->pDrawable->x; | 270 | xSrc += pSrc->pDrawable->x; |
@@ -261,12 +275,10 @@ exaTryDriverSolidFill(PicturePtr pSrc, | |||
261 | width, height)) | 275 | width, height)) |
262 | return 1; | 276 | return 1; |
263 | 277 | ||
264 | pDstPix = exaGetDrawablePixmap (pDst->pDrawable); | ||
265 | exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); | 278 | exaGetDrawableDeltas (pDst->pDrawable, pDstPix, &dst_off_x, &dst_off_y); |
266 | 279 | ||
267 | REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); | 280 | REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); |
268 | 281 | ||
269 | pSrcPix = exaGetDrawablePixmap (pSrc->pDrawable); | ||
270 | pixel = exaGetPixmapFirstPixel (pSrcPix); | 282 | pixel = exaGetPixmapFirstPixel (pSrcPix); |
271 | 283 | ||
272 | pixmaps[0].as_dst = TRUE; | 284 | pixmaps[0].as_dst = TRUE; |