mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-03-12 12:20:39 +01:00
image: Fix leak of white solid color for masked composition of CLEAR
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
bc97bcf0ef
commit
8a65d8e2de
1 changed files with 5 additions and 1 deletions
|
|
@ -480,6 +480,7 @@ composite_boxes (void *_dst,
|
|||
pixman_image_t *dst = to_pixman_image (_dst);
|
||||
pixman_image_t *src = ((cairo_image_source_t *)abstract_src)->pixman_image;
|
||||
pixman_image_t *mask = abstract_mask ? ((cairo_image_source_t *)abstract_mask)->pixman_image : NULL;
|
||||
pixman_image_t *free_src = NULL;
|
||||
struct _cairo_boxes_chunk *chunk;
|
||||
int i;
|
||||
|
||||
|
|
@ -496,7 +497,7 @@ composite_boxes (void *_dst,
|
|||
#if PIXMAN_HAS_OP_LERP
|
||||
op = PIXMAN_OP_LERP_CLEAR;
|
||||
#else
|
||||
src = _pixman_image_for_color (CAIRO_COLOR_WHITE);
|
||||
free_src = src = _pixman_image_for_color (CAIRO_COLOR_WHITE);
|
||||
op = PIXMAN_OP_OUT_REVERSE;
|
||||
#endif
|
||||
} else if (op == CAIRO_OPERATOR_SOURCE) {
|
||||
|
|
@ -527,6 +528,9 @@ composite_boxes (void *_dst,
|
|||
}
|
||||
}
|
||||
|
||||
if (free_src)
|
||||
pixman_image_unref (free_src);
|
||||
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue