summaryrefslogtreecommitdiff
path: root/src/cairo-ps-surface.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-08-13 12:33:21 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-08-13 13:15:36 +0100
commit279f6ceb595412bef165a808f05caa3044ef102c (patch)
treeb94702c96796dc524402ba8330b6722f08761187 /src/cairo-ps-surface.c
parentd391f0908c404344aa6873fbca2b7bd6499009e0 (diff)
Only reduce the clip if it is not in active use for the operation
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-ps-surface.c')
-rw-r--r--src/cairo-ps-surface.c18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/cairo-ps-surface.c b/src/cairo-ps-surface.c
index 267fd59d..a9961fe3 100644
--- a/src/cairo-ps-surface.c
+++ b/src/cairo-ps-surface.c
@@ -3617,28 +3617,18 @@ _cairo_ps_surface_set_clip (cairo_ps_surface_t *surface,
{
cairo_clip_t *clip = composite->clip;
- if (_cairo_clip_is_region (clip) &&
- cairo_region_contains_rectangle (_cairo_clip_get_region (clip),
- &composite->unbounded) == CAIRO_REGION_OVERLAP_IN)
- {
- clip = NULL;
- }
+ if (_cairo_composite_rectangles_can_reduce_clip (composite, clip))
+ clip = NULL;
if (clip == NULL) {
- cairo_clip_t *current = surface->clipper.clip;
-
- if (current && _cairo_clip_is_region (current) &&
- cairo_region_contains_rectangle (_cairo_clip_get_region (current),
- &composite->unbounded) == CAIRO_REGION_OVERLAP_IN)
- {
+ if (_cairo_composite_rectangles_can_reduce_clip (composite,
+ surface->clipper.clip))
return CAIRO_STATUS_SUCCESS;
- }
}
return _cairo_surface_clipper_set_clip (&surface->clipper, clip);
}
-
static cairo_int_status_t
_cairo_ps_surface_paint (void *abstract_surface,
cairo_operator_t op,