Summary: | applying a clip can increase the region returned by cairo_copy_clip_rectangle_list | ||
---|---|---|---|
Product: | cairo | Reporter: | Karl Tomlinson <bugs.freedesktop> |
Component: | general | Assignee: | Karl Tomlinson <bugs.freedesktop> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 1.9.13 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: | consider gstate target extents in _cairo_gstate_copy_clip_rectangle_list |
Description
Karl Tomlinson
2010-07-16 18:09:55 UTC
Created attachment 37145 [details] [review] consider gstate target extents in _cairo_gstate_copy_clip_rectangle_list Intersecting the clip path with the target surface extents before getting the region seems better than trying to get a region and then intersecting with the target extents. With the later approach, some portion of the clip path beyond the target could prevent successful generation of the region (or at least cause unnecessary conversions to rectangles). I could have left a fast path for unbounded clips but went with the less-code approach. There was some inconsistency where lists with zero-rectangles were returned both for empty clips and unbounded clips. The tests expect zero rectangles for empty clips so unbounded clips (on infinite targets) now return CAIRO_STATUS_CLIP_NOT_REPRESENTABLE. commit 108b1c7825116ed3f93aa57384bbd3290cdc9181 Author: Karl Tomlinson <karlt+@karlt.net> Date: Sat Jul 17 13:08:53 2010 +1200 clip: consider gstate target extents in _cairo_gstate_copy_clip_rectangle_list Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29125 To be consistent with _cairo_gstate_clip_extents, the context's clip should be intersected with the target surface extents (instead of only using them when there is no clip). Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk> |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.