diff --git a/src/cairo-clip-boxes.c b/src/cairo-clip-boxes.c index bbb4197..4cdc3e5 100644 --- a/src/cairo-clip-boxes.c +++ b/src/cairo-clip-boxes.c @@ -159,6 +159,8 @@ _cairo_clip_intersect_rectangle_box (cairo_clip_t *clip, cairo_bool_t changed = FALSE; int i, j; + assert (! _cairo_clip_is_all_clipped (clip)); + if (clip == NULL) { clip = _cairo_clip_create (); if (clip == NULL) @@ -258,6 +260,9 @@ _cairo_clip_intersect_box (cairo_clip_t *clip, { cairo_rectangle_int_t r; + if (_cairo_clip_is_all_clipped (clip)) + return clip; + _cairo_box_round_to_rectangle (box, &r); if (r.width == 0 || r.height == 0) return _cairo_clip_set_all_clipped (clip);