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:
Chris Wilson 2012-02-09 23:26:14 +00:00
parent 2886df60b0
commit 38bf7a6526

View file

@ -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;
}