[cairo-clip] Special case using an empty clip path.

Detect when the user calls cairo_clip() with an empty clip path and
mark the clip as all_clipped.
This commit is contained in:
Chris Wilson 2007-11-06 09:45:54 +00:00
parent 2f0867b43f
commit b4057b8643

View file

@ -537,6 +537,12 @@ _cairo_clip_clip (cairo_clip_t *clip,
if (clip->all_clipped)
return CAIRO_STATUS_SUCCESS;
/* catch the empty clip path */
if (! path->has_current_point) {
_cairo_clip_set_all_clipped (clip, target);
return CAIRO_STATUS_SUCCESS;
}
status = _cairo_clip_intersect_path (clip,
path, fill_rule, tolerance,
antialias);