image: Use the recording surface content for the recording source

The previous commit should have been a enormous warning that something
was horribly wrong. I was determined to preserve the optimisation of
replaying onto the matching format, however, we need to provide an alpha
channel if required.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-09-16 21:55:05 +01:00
parent ab924b11a8
commit 242fbb010e

View file

@ -642,8 +642,13 @@ _pixman_image_for_recording (cairo_image_surface_t *dst,
if (extend == CAIRO_EXTEND_NONE)
limit = *extents;
clone = cairo_image_surface_create (is_mask ? CAIRO_FORMAT_A8 : dst->format,
limit.width, limit.height);
if (dst->base.content == source->content)
clone = cairo_image_surface_create (dst->format,
limit.width, limit.height);
else
clone = _cairo_image_surface_create_with_content (source->content,
limit.width,
limit.height);
cairo_surface_set_device_offset (clone, limit.x, limit.y);
m = NULL;