mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-05-02 06:08:01 +02:00
[test/mask] Propagate error from secondary context.
Use cairo_get_target() to infect the primary context with any errors raised whilst drawing the mask.
This commit is contained in:
parent
eaec1caa94
commit
4a9e0f0e5b
1 changed files with 2 additions and 4 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue