sna: Make sure the alpha map is accessible by the CPU on fallbacks

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-11-04 11:24:03 +00:00
parent 70c9e70f35
commit 5dba7028cd
2 changed files with 18 additions and 3 deletions

View File

@ -493,10 +493,18 @@ fallback:
width, height));
dst_move_area_to_cpu(dst, op, &region.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, &region, 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);

View File

@ -941,8 +941,13 @@ glyphs_fallback(CARD8 op,
return;
sna_drawable_move_region_to_cpu(dst->pDrawable, &region, 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(&region, -dst->pDrawable->x, -dst->pDrawable->y);
dst_image = image_from_pict(dst, TRUE, &x, &y);