diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-16 16:50:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2008-10-18 09:55:06 +0100 |
commit | 4a9e0f0e5ba17a322bbf0f38b2fb418211571d48 (patch) | |
tree | dc6065e32d9a96494bf92d427250d1a73d95a425 /test/mask.c | |
parent | eaec1caa94ac871eb881ac354c4442ddd2a308ea (diff) | |
download | cairo-4a9e0f0e5ba17a322bbf0f38b2fb418211571d48.tar.gz |
[test/mask] Propagate error from secondary context.
Use cairo_get_target() to infect the primary context with any errors
raised whilst drawing the mask.
Diffstat (limited to 'test/mask.c')
-rw-r--r-- | test/mask.c | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/test/mask.c b/test/mask.c index 711c3eb74..44bed8787 100644 --- a/test/mask.c +++ b/test/mask.c @@ -79,6 +79,7 @@ mask_polygon (cairo_t *cr, int x, int y) CAIRO_CONTENT_ALPHA, WIDTH, HEIGHT); cr2 = cairo_create (mask_surface); + cairo_surface_destroy (mask_surface); cairo_save (cr2); cairo_set_operator (cr2, CAIRO_OPERATOR_CLEAR); @@ -97,11 +98,8 @@ mask_polygon (cairo_t *cr, int x, int y) cairo_close_path (cr2); cairo_fill (cr2); + cairo_mask_surface (cr, cairo_get_target (cr2), x, y); cairo_destroy (cr2); - - cairo_mask_surface (cr, mask_surface, x, y); - - cairo_surface_destroy (mask_surface); } static void |