Bug 41583 - Current git: cairo_recording_surface_ink_extents() gives wrong result
Summary: Current git: cairo_recording_surface_ink_extents() gives wrong result
Status: RESOLVED FIXED
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.10.3
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: cairo-1.12
  Show dependency treegraph
 
Reported: 2011-10-08 02:06 UTC by Uli Schlachter
Modified: 2012-02-10 09:11 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Test showing the wrong behavior (610 bytes, text/plain)
2011-10-08 02:06 UTC, Uli Schlachter
Details
Kind-of patch which fixes this bug for me (1.36 KB, patch)
2012-01-29 11:14 UTC, Uli Schlachter
Details | Splinter Review

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.