mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-21 18:51:34 +01:00
gl: Transfer ownership of trapezoid mask to operand
Signed-off-by: Henry (Yu) Song <hsong@sisa.samsung.com> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
2886df60b0
commit
38bf7a6526
1 changed files with 10 additions and 5 deletions
|
|
@ -310,10 +310,8 @@ traps_to_operand (void *_dst,
|
|||
extents->width, extents->height,
|
||||
0, 0);
|
||||
cairo_surface_destroy (image);
|
||||
if (unlikely (status)) {
|
||||
cairo_surface_destroy (mask);
|
||||
return status;
|
||||
}
|
||||
if (unlikely (status))
|
||||
goto error;
|
||||
|
||||
_cairo_pattern_init_for_surface (&pattern, mask);
|
||||
cairo_matrix_init_translate (&pattern.base.matrix,
|
||||
|
|
@ -324,8 +322,15 @@ traps_to_operand (void *_dst,
|
|||
&_cairo_unbounded_rectangle,
|
||||
&_cairo_unbounded_rectangle);
|
||||
_cairo_pattern_fini (&pattern.base);
|
||||
cairo_surface_destroy (mask);
|
||||
|
||||
if (unlikely (status))
|
||||
goto error;
|
||||
|
||||
operand->texture.owns_surface = mask;
|
||||
return CAIRO_STATUS_SUCCESS;
|
||||
|
||||
error:
|
||||
cairo_surface_destroy (mask);
|
||||
return status;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue