Bug 41583

Summary: Current git: cairo_recording_surface_ink_extents() gives wrong result
Product: cairo Reporter: Uli Schlachter <psychon>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.10.3   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 44797    
Attachments: Test showing the wrong behavior
Kind-of patch which fixes this bug for me

Description Uli Schlachter 2011-10-08 02:06:38 UTC
Created attachment 52111 [details]
Test showing the wrong behavior

Hi,

with current git, a recording surface always returns 0, 0 for x,y in cairo_recording_surface_ink_extents(). The width/height is the correct value, so it didn't translate the result or something like that.

Attached is a test which shows this behavior. I'd expect both lines of output to show the same results, but they don't.

Uli
Comment 1 Uli Schlachter 2012-01-29 11:14:33 UTC
Created attachment 56300 [details] [review]
Kind-of patch which fixes this bug for me

The attached patch fixes the problem for me (ignore my printf-debugging output).

Could someone check if that _cairo_clip_translate() really is wrong and remove it?
Comment 2 Chris Wilson 2012-02-09 16:29:20 UTC
I think you are right and that code is superfluous; a result of my confused thinking. I was confusing extents with device transform, and trying to use the extents to place the origin (0,0) of the surface at a random point in device space. Unbounded coordinates make me nervous...

Uli, please go ahead and push the cleaned up version with a Reviewed-by: Chris Wilson <chris@chris-wilson.co.uk>, so you can always blame me for bad advice later. ;-)
Comment 3 Uli Schlachter 2012-02-10 09:11:01 UTC
Thanks Chris. Fixed in commit f7eaf37f0432952c.

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.