diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-04 11:24:03 +0000 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-04 11:24:03 +0000 |
commit | 5dba7028cd5024282b601c41ddfc9081eaa1d189 (patch) | |
tree | 358ba5c5f444df6679f8bc1ddf399dee91ea0c4c | |
parent | 70c9e70f35af21de2b5b56d72f2a9e7fe9ed49d6 (diff) |
sna: Make sure the alpha map is accessible by the CPU on fallbacks
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_composite.c | 14 | ||||
-rw-r--r-- | src/sna/sna_glyphs.c | 7 |
2 files changed, 18 insertions, 3 deletions
diff --git a/src/sna/sna_composite.c b/src/sna/sna_composite.c index 7c599be3..725a3cf6 100644 --- a/src/sna/sna_composite.c +++ b/src/sna/sna_composite.c @@ -493,10 +493,18 @@ fallback: width, height)); dst_move_area_to_cpu(dst, op, ®ion.extents); - if (src->pDrawable) + if (dst->alphaMap) + sna_drawable_move_to_cpu(dst->alphaMap->pDrawable, true); + if (src->pDrawable) { sna_drawable_move_to_cpu(src->pDrawable, false); - if (mask && mask->pDrawable) + if (src->alphaMap) + sna_drawable_move_to_cpu(src->alphaMap->pDrawable, false); + } + if (mask && mask->pDrawable) { sna_drawable_move_to_cpu(mask->pDrawable, false); + if (mask->alphaMap) + sna_drawable_move_to_cpu(mask->alphaMap->pDrawable, false); + } DBG(("%s: fallback -- fbCompposite\n", __FUNCTION__)); fbComposite(op, src, mask, dst, @@ -733,6 +741,8 @@ sna_composite_rectangles(CARD8 op, fallback: DBG(("%s: fallback\n", __FUNCTION__)); sna_drawable_move_region_to_cpu(&pixmap->drawable, ®ion, true); + if (dst->alphaMap) + sna_drawable_move_to_cpu(dst->alphaMap->pDrawable, true); if (op == PictOpSrc || op == PictOpClear) { PixmapPtr pixmap = get_drawable_pixmap(dst->pDrawable); diff --git a/src/sna/sna_glyphs.c b/src/sna/sna_glyphs.c index 7c4b73f9..2a162995 100644 --- a/src/sna/sna_glyphs.c +++ b/src/sna/sna_glyphs.c @@ -941,8 +941,13 @@ glyphs_fallback(CARD8 op, return; sna_drawable_move_region_to_cpu(dst->pDrawable, ®ion, true); - if (src->pDrawable) + if (dst->alphaMap) + sna_drawable_move_to_cpu(dst->alphaMap->pDrawable, true); + if (src->pDrawable) { sna_drawable_move_to_cpu(src->pDrawable, false); + if (src->alphaMap) + sna_drawable_move_to_cpu(src->alphaMap->pDrawable, false); + } RegionTranslate(®ion, -dst->pDrawable->x, -dst->pDrawable->y); dst_image = image_from_pict(dst, TRUE, &x, &y); |