diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-16 21:55:05 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-09-16 21:56:52 +0100 |
commit | 242fbb010efffb3a75f2e824bbdbb3a75ad51d12 (patch) | |
tree | 6c04f74453b62b73447089703958c08e0ff485c3 /src/cairo-image-source.c | |
parent | ab924b11a805caaa6e7a1e39ce69f0a9a31e1405 (diff) | |
download | cairo-242fbb010efffb3a75f2e824bbdbb3a75ad51d12.tar.gz |
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>
Diffstat (limited to 'src/cairo-image-source.c')
-rw-r--r-- | src/cairo-image-source.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/cairo-image-source.c b/src/cairo-image-source.c index 53423ef03..c6c53457e 100644 --- a/src/cairo-image-source.c +++ b/src/cairo-image-source.c @@ -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; |