summaryrefslogtreecommitdiff
path: root/src/cairo-composite-rectangles.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/cairo-composite-rectangles.c')
-rw-r--r--src/cairo-composite-rectangles.c17
1 files changed, 16 insertions, 1 deletions
diff --git a/src/cairo-composite-rectangles.c b/src/cairo-composite-rectangles.c
index c358671f..c792985b 100644
--- a/src/cairo-composite-rectangles.c
+++ b/src/cairo-composite-rectangles.c
@@ -130,6 +130,10 @@ _cairo_composite_rectangles_init_for_paint (cairo_composite_rectangles_t *extent
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -159,6 +163,10 @@ _cairo_composite_rectangles_intersect (cairo_composite_rectangles_t *extents,
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -219,6 +227,10 @@ _cairo_composite_rectangles_intersect_source_extents (cairo_composite_rectangles
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -277,6 +289,10 @@ _cairo_composite_rectangles_intersect_mask_extents (cairo_composite_rectangles_t
if (_cairo_clip_is_all_clipped (extents->clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
+ if (! _cairo_rectangle_intersect (&extents->unbounded,
+ _cairo_clip_get_extents (extents->clip)))
+ return CAIRO_INT_STATUS_NOTHING_TO_DO;
+
if (extents->source_pattern.base.type != CAIRO_PATTERN_TYPE_SOLID)
_cairo_pattern_sampled_area (&extents->source_pattern.base,
&extents->bounded,
@@ -307,7 +323,6 @@ _cairo_composite_rectangles_init_for_mask (cairo_composite_rectangles_t *extents
return CAIRO_INT_STATUS_NOTHING_TO_DO;
}
-
extents->original_mask_pattern = mask;
_cairo_composite_reduce_pattern (mask, &extents->mask_pattern);
_cairo_pattern_get_extents (&extents->mask_pattern.base, &extents->mask);