image: Use A8 for creating a mask from a recording surface

When applying masks, typically it is useful to have an alpha channel.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2011-09-16 19:29:27 +01:00
parent 3fde219487
commit ab924b11a8

View file

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