spans,traps-compositor: Check for all-clipped after intersecting clip with boxes

If the mask does not intersect the clip, then there is no drawing to be
performed and we can report NOTHING_TO_DO.

Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
Chris Wilson 2012-02-29 14:38:13 +00:00
parent 300e32a4a9
commit cdbf4c60fe
2 changed files with 6 additions and 0 deletions

View file

@ -717,6 +717,9 @@ clip_and_composite_boxes (const cairo_spans_compositor_t *compositor,
clip = _cairo_clip_copy (extents->clip);
clip = _cairo_clip_intersect_boxes (clip, boxes);
if (_cairo_clip_is_all_clipped (clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
status = _cairo_clip_get_polygon (clip, &polygon,
&fill_rule, &antialias);
_cairo_clip_path_destroy (clip->path);

View file

@ -1635,6 +1635,9 @@ clip_and_composite_boxes (const cairo_traps_compositor_t *compositor,
clip = _cairo_clip_copy (extents->clip);
clip = _cairo_clip_intersect_boxes (clip, boxes);
if (_cairo_clip_is_all_clipped (clip))
return CAIRO_INT_STATUS_NOTHING_TO_DO;
status = _cairo_clip_get_polygon (clip, &polygon,
&fill_rule, &antialias);
_cairo_clip_path_destroy (clip->path);