Bug 19240

Summary: [librsvg] misrendering of aisleriot card theme bellot.svg
Product: cairo Reporter: Christian Persch (GNOME) <chpe>
Component: generalAssignee: Carl Worth <cworth>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium    
Version: 1.9.1   
Hardware: Other   
OS: All   
URL: http://svn.gnome.org/svn/gnome-games-extra-data/trunk/cards/bellot.svg
Whiteboard:
i915 platform: i915 features:
Attachments: Test case for open subpaths not being closed when filling.

Description Christian Persch (GNOME) 2008-12-22 14:28:38 UTC
Using librsvg trunk [http://svn.gnome.org/svn/gnome-games-extra-data/trunk/cards/bellot.svg] and cairo git master, http://svn.gnome.org/svn/gnome-games-extra-data/trunk/cards/bellot.svg misrenders the diamond cards (obvious in the screenshot at http://www.gnome.org/~chpe/images/cairo-bellot-svg-bug.png ). 
It works with cairo 1.8.0.

Bisecting...

18634c37026a2d6147443cb6d991576f62b07e6d is first bad commit
commit 18634c37026a2d6147443cb6d991576f62b07e6d
Author: M Joonas Pihlaja <jpihlaja@cc.helsinki.fi>
Date:   Thu Jul 24 20:47:14 2008 +0300

    [cairo-spans] Hook up filling paths with spans to cairo-surface-fallback.c.
    
    This speeds up the mask generation step in cairo_fill() for the image
    surface by up to 10x in especially favourable cases.
    
    image-rgba                              twin-800 7757.80 0.20% -> 749.41 0.29%: 10.36x speedup
    image-rgba spiral-diag-pixalign-nonzero-fill-512   15.16 0.44% ->   3.45 8.80%:  5.54x speedup
    
    More typical simple non-rectilinear geometries are sped up by 30-50%.
    This patch does not affect any stroking operations or any fill
    operations of pixel aligned rectilinear geometries; those are still
    rendered using trapezoids.

:040000 040000 4ecec5d1cb25dca4e973853b3a1b97f7171ae82a 437b9c876962d4f3d14dffe6dbef0068a90cd8ee M	src
:040000 040000 9f92e55ba422b839ff7119e4394ab078f2c5fae0 298126b16e0b76cc0e11d4e7d2c7211009ab7018 M	test
Comment 1 M Joonas Pihlaja 2008-12-22 17:36:32 UTC
Created attachment 21418 [details]
Test case for open subpaths not being closed when filling.

Thanks for the bug report.  The problem was that open subpaths weren't being closed before filling when rendering to the image surface with a scan converter.  This is now fixed in master.

Attached is a smaller test case extracted from bellot.svg to exercise the bug.

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.