mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-05 13:28:03 +02:00
[test/unbounded-operator] Propagate errors.
Use cairo_get_target() to propagate errors from secondary contexts.
This commit is contained in:
parent
4c8de6d99d
commit
21223cc12c
1 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue