summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2008-10-16 14:05:14 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2008-10-17 22:52:47 +0100
commitd48f9340514c258cfece1b72d2f7e3f7b2d3c7b1 (patch)
treeb55c345f01da01b2588a172f509fe844fb0cb6c6
parentd11014386f739f43ec5f290714d7c51cc638f172 (diff)
[test/clip-operator] Propagate error from secondary context.
Use the cairo_get_target() to propagate any errors from the secondary context.
-rw-r--r--test/clip-operator.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/test/clip-operator.c b/test/clip-operator.c
index d6e20c879..3c4bcbb6a 100644
--- a/test/clip-operator.c
+++ b/test/clip-operator.c
@@ -46,6 +46,7 @@ draw_mask (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_source_rgba (cr2, 0, 0, 0, 0); /* transparent */
@@ -58,11 +59,8 @@ draw_mask (cairo_t *cr, int x, int y)
cairo_arc (cr2, 0.5 * width, 0.5 * height, 0.45 * height, 0, 2 * M_PI);
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