mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-02-21 19:10:33 +01:00
{mask,traps}-composite: Restore unsetting of the is-clear flags for the mask
I forgot that creating any image by defaults results in pixman calloc'ing the pixel data and so cairo helpfully sets the is-clear flag on the surface. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
b079f18fad
commit
080bcfcb1a
2 changed files with 4 additions and 2 deletions
|
|
@ -174,7 +174,7 @@ create_composite_mask (const cairo_mask_compositor_t *compositor,
|
|||
return _cairo_surface_create_in_error (status);
|
||||
}
|
||||
|
||||
{
|
||||
if (!surface->is_clear) {
|
||||
cairo_rectangle_int_t rect;
|
||||
|
||||
rect.x = rect.y = 0;
|
||||
|
|
@ -231,6 +231,7 @@ create_composite_mask (const cairo_mask_compositor_t *compositor,
|
|||
|
||||
out:
|
||||
compositor->release (surface);
|
||||
surface->is_clear = FALSE;
|
||||
return surface;
|
||||
|
||||
error:
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@ create_composite_mask (const cairo_traps_compositor_t *compositor,
|
|||
return _cairo_surface_create_in_error (status);
|
||||
}
|
||||
|
||||
{
|
||||
if (!surface->is_clear) {
|
||||
cairo_boxes_t clear;
|
||||
|
||||
_cairo_boxes_init_from_rectangle (&clear,
|
||||
|
|
@ -423,6 +423,7 @@ create_composite_mask (const cairo_traps_compositor_t *compositor,
|
|||
out:
|
||||
compositor->release (surface);
|
||||
cairo_surface_destroy (src);
|
||||
surface->is_clear = FALSE;
|
||||
return surface;
|
||||
|
||||
error:
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue