Bug 19256

Summary: Gnome Foot in gnome-games rendered incorrectly
Product: cairo Reporter: Jacob Kroon <jacob.kroon>
Component: xlib backendAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: chpe
Version: 1.9.1   
Hardware: x86 (IA32)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments: Using Cairo 1.8.0
Using Cairo git-081223

Description Jacob Kroon 2008-12-23 06:33:25 UTC
Created attachment 21435 [details]
Using Cairo 1.8.0

The Gnome Foot on the back of the the cards in gnome-games is rendered incorrectly. Provided below are a screenshot using git 081223, and one using system version of cairo, version 1.8.0.
Comment 1 Jacob Kroon 2008-12-23 06:34:56 UTC
Created attachment 21436 [details]
Using Cairo git-081223
Comment 2 Chris Wilson 2008-12-23 17:58:17 UTC
*** Bug 19266 has been marked as a duplicate of this bug. ***
Comment 3 Christian Persch (GNOME) 2008-12-25 06:20:25 UTC
dea40e61babe608315b6d365094cf518814b134e is first bad commit
commit dea40e61babe608315b6d365094cf518814b134e
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Dec 18 11:50:00 2008 +0000

    [path] Return the fixed-point bounds of the path
    
    When analysing the stroke extents, we need the original fixed-point
    extents so that we do not incur an OBO when we round-to-integer a second
    time. We also need a more accurate estimate than simply using the control
    points of the curve, so pass in tolerance and decompose until someone
    discovers a cheaper algorithm to determine the precise aligned bounding
    box of a bezier curve.

:040000 040000 1eab368e82cc801cd2d71d3954ae1576c0febfe6 ee6ae064e06efc646515a4631dade0e7ad528958 M	src
Comment 4 Chris Wilson 2008-12-25 15:35:30 UTC
(In reply to comment #3)
> dea40e61babe608315b6d365094cf518814b134e is first bad commit

Yes, this was well known ;-) But what is less well known is how it fails! The problem apparently lies in a discrepancy with using the spline decomposition to add the points from the curves into the bounding box. Why doesn't _cairo_path_bounder_curve_to() work?
Comment 5 Chris Wilson 2008-12-27 03:32:56 UTC
commit 23d1fd7f5b67eb35134e2b15e0e00be19c6f5a7a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Sat Dec 27 11:29:15 2008 +0000

    [path] Initialise spline from current point
    
    Joonas spotted that the breakage with the curve bounds was the result of
    initialising the spline using the original move to point and not the
    current point.
    
    Fixes: Bug 19256 Gnome Foot in gnome-games rendered incorrectly
    (https://bugs.freedesktop.org/show_bug.cgi?id=19256)

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.