summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/cairo-composite-rectangles.c2
-rw-r--r--src/cairo-recording-surface.c2
2 files changed, 3 insertions, 1 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
index 0598ba69..439f453b 100644
--- a/src/cairo-composite-rectangles.c
+++ b/src/cairo-composite-rectangles.c
@@ -90,7 +90,7 @@ _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extent
return CAIRO_INT_STATUS_NOTHING_TO_DO;
}
- extents->mask = extents->bounded;
+ extents->mask = *unbounded;
extents->clip = _cairo_clip_reduce_for_composite (clip, extents);
if (_cairo_clip_is_all_clipped (extents->clip))
diff --git a/src/cairo-recording-surface.c b/src/cairo-recording-surface.c
index 478695f8..987395bf 100644
--- a/src/cairo-recording-surface.c
+++ b/src/cairo-recording-surface.c
@@ -587,6 +587,8 @@ _command_init (cairo_recording_surface_t *surface,
/* steal the clip */
command->clip = NULL;
if (! _cairo_clip_is_region (composite->clip) ||
+ composite->mask.width > composite->unbounded.width ||
+ composite->mask.height > composite->unbounded.height ||
cairo_region_contains_rectangle (_cairo_clip_get_region (composite->clip),
&composite->unbounded) != CAIRO_REGION_OVERLAP_IN)
{