Bug 29124

Summary: cairo_clip_extents returns surface extents instead of empty rectangle when clip is empty
Product: cairo Reporter: Karl Tomlinson <bugs.freedesktop>
Component: generalAssignee: 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 all_clipped in _cairo_clip_get_extents

Description Karl Tomlinson 2010-07-16 16:45:54 UTC
If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped set
(and path NULL), then it returns the gstate target extents instead of an empty
rectangle.  If the target is infinite, then it says the clip is unbounded.

I'm guessing this worked better when surface_rect was used prior to
http://cgit.freedesktop.org/cairo/commit/?id=bed2701e1c89095878d549cbca8f22d84f3dda3c
Comment 1 Karl Tomlinson 2010-07-16 16:49:23 UTC
Created attachment 37143 [details] [review]
consider all_clipped in _cairo_clip_get_extents
Comment 2 Chris Wilson 2010-07-17 03:33:24 UTC
commit b79ea8a6cab8bd28aebecf6e1e8229d5ac017264
Author: Karl Tomlinson <karlt+@karlt.net>
Date:   Sat Jul 17 11:46:25 2010 +1200

    clip: consider all_clipped in _cairo_clip_get_extents
    
    If the gstate clip in _cairo_gstate_int_clip_extents() has all_clipped
    set (and path NULL), then it returns the gstate target extents instead of
    an empty rectangle.  If the target is infinite, then it says the clip is
    unbounded.
    
    Fixes https://bugs.freedesktop.org/show_bug.cgi?id=29124
    Tested-by test/get-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.