mirror of
https://gitlab.freedesktop.org/cairo/cairo.git
synced 2026-01-19 14:00:53 +01:00
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:
parent
300e32a4a9
commit
cdbf4c60fe
2 changed files with 6 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue