[test/unbounded-operator] Propagate errors.

Use cairo_get_target() to propagate errors from secondary contexts.
This commit is contained in:
Chris Wilson 2008-10-21 11:29:12 +01:00
parent 4c8de6d99d
commit 21223cc12c

View file

@ -47,6 +47,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 */
@ -59,11 +60,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