diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-05 18:21:26 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-08-05 18:23:21 +0100 |
commit | 9ef003c5fce30956fefb2f4d9a1ded85cb296b4f (patch) | |
tree | 2ba6dd7dd84545826c5e24386ea6b23f755803e6 /src/cairo-surface-clipper.c | |
parent | 3424e91ec767c8a8f1c4adb3917759e6c59d409a (diff) | |
download | cairo-9ef003c5fce30956fefb2f4d9a1ded85cb296b4f.tar.gz |
clipper: Don't emit an empty clip-path for no clip boxes
If there are no clip boxes, we do not need to emit an empty clip which
only confuses the users of the surface-clipper.
Spotted by Andrea Canciani and cairo-quartz
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'src/cairo-surface-clipper.c')
-rw-r--r-- | src/cairo-surface-clipper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/cairo-surface-clipper.c b/src/cairo-surface-clipper.c index bbc286b0f..8429db77d 100644 --- a/src/cairo-surface-clipper.c +++ b/src/cairo-surface-clipper.c @@ -74,6 +74,9 @@ _cairo_surface_clipper_intersect_clip_boxes (cairo_surface_clipper_t *clipper, cairo_status_t status; int i; + if (clip->num_boxes == 0) + return CAIRO_STATUS_SUCCESS; + /* Reconstruct the path for the clip boxes. * XXX maybe a new clipper callback? */ |