mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 12:18:01 +02:00
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:
parent
3fde219487
commit
ab924b11a8
1 changed files with 2 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue