diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-14 23:29:13 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2010-05-14 23:31:57 +0100 |
commit | f7bbcc492a05f0801c64ee884798cf1a7ebb71c2 (patch) | |
tree | 9f3dd8208ff88f30be516242c7840721efda7f63 /uxa/uxa-render.c | |
parent | 4be8d7eb89e61ffb2ceb19f1f84260e581187692 (diff) |
Split the prepare blitter functions into check + prepare.
Allow us to check whether we can handle the operation using the blitter
prior to doing any work.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r-- | uxa/uxa-render.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index cf643e3b..883145f2 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -349,7 +349,12 @@ uxa_try_driver_solid_fill(PicturePtr pSrc, PixmapPtr pSrcPix = NULL, pDstPix; CARD32 pixel; - pDstPix = uxa_get_drawable_pixmap(pDst->pDrawable); + if (uxa_screen->info->check_solid && !uxa_screen->info->check_solid(pDst->pDrawable, GXcopy, 0xffffffff)) + return -1; + + pDstPix = uxa_get_offscreen_pixmap(pDst->pDrawable, &dst_off_x, &dst_off_y); + if (!pDstPix) + return -1; xDst += pDst->pDrawable->x; yDst += pDst->pDrawable->y; @@ -365,16 +370,8 @@ uxa_try_driver_solid_fill(PicturePtr pSrc, width, height)) return 1; - uxa_get_drawable_deltas(pDst->pDrawable, pDstPix, &dst_off_x, - &dst_off_y); - REGION_TRANSLATE(pScreen, ®ion, dst_off_x, dst_off_y); - if (!uxa_pixmap_is_offscreen(pDstPix)) { - REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); - return 0; - } - if (pSrcPix) { if (! uxa_get_color_for_pixmap (pSrcPix, pSrc->format, pDst->format, &pixel)) { REGION_UNINIT(pDst->pDrawable->pScreen, ®ion); |