Bug 55799

Summary: Vector-based SurfacePattern not painted in PDFSurface with 1.12.4
Product: cairo Reporter: Simon Sapin <simon.sapin>
Component: generalAssignee: Chris Wilson <chris>
Status: RESOLVED FIXED QA Contact: cairo-bugs mailing list <cairo-bugs>
Severity: normal    
Priority: medium CC: simon.sapin, xovni
Version: 1.12.4   
Hardware: Other   
OS: All   
Whiteboard:
i915 platform: i915 features:
Attachments: 1.12.2 PDF output
1.12.2 PNG output
1.12.2 PDF trace
1.12.2 PNG trace
1.12.4 PDF output
1.12.4 PNG output
1.12.4 PDF trace
1.12.4 PNG trace

Description Simon Sapin 2012-10-09 10:41:37 UTC
Hi,

http://www.w3.org/TR/SVG/images/pservers/pattern01.svg is an SVG file containing a <pattern> with a vector triangle, used to fill an <ellipse>. Both rsvg and cairosvg, when rendering it with cairo, use a temporary surface in a repeated surface pattern.

This file renders fine with cairo 1.12.2, but the pattern is completely missing with 1.12.4 in PDF or PS output. (PNG output through ImageSurface is fine.)

Attached (later) are the traces and output generated by CairoSVG with both cairo version, in PDF and PNG output.
Comment 1 Simon Sapin 2012-10-09 10:42:14 UTC
Created attachment 68325 [details]
1.12.2 PDF output
Comment 2 Simon Sapin 2012-10-09 10:42:35 UTC
Created attachment 68326 [details]
1.12.2 PNG output
Comment 3 Simon Sapin 2012-10-09 10:44:01 UTC
Created attachment 68327 [details]
1.12.2 PDF trace
Comment 4 Simon Sapin 2012-10-09 10:44:18 UTC
Created attachment 68328 [details]
1.12.2 PNG trace
Comment 5 Simon Sapin 2012-10-09 10:44:48 UTC
Created attachment 68329 [details]
1.12.4 PDF output
Comment 6 Simon Sapin 2012-10-09 10:45:09 UTC
Created attachment 68330 [details]
1.12.4 PNG output
Comment 7 Simon Sapin 2012-10-09 10:45:28 UTC
Created attachment 68331 [details]
1.12.4 PDF trace
Comment 8 Simon Sapin 2012-10-09 10:46:05 UTC
Created attachment 68332 [details]
1.12.4 PNG trace
Comment 9 Adrian Johnson 2012-10-11 05:32:44 UTC
According to git bisect the offending commit is:

8020e0bc8cbd3e5ac188eb305b74ae1c1f362a31 is the first bad commit
commit 8020e0bc8cbd3e5ac188eb305b74ae1c1f362a31
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Wed Oct 3 17:01:41 2012 +0100

    recording: Perform an explicit during snapshot
    
    In order to avoid recursing upon our source mutex when doing a snapshot,
    we can perform an explicit copy of the command array. This should also
    be faster than performing a replay as well.
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=50443
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Comment 10 Guillaume Ayoub 2012-10-11 15:48:56 UTC
These patches fix the bug, at least for the example given in this report:
http://lists.cairographics.org/archives/cairo/2012-October/023618.html
Comment 11 Chris Wilson 2012-10-11 16:02:25 UTC
Thanks for testing those patches.

commit db488a1703d4ef3bcbd54138b51c01600a2f4d3a
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Thu Oct 11 17:00:57 2012 +0100

    recording: Copy across the is-clear? during snapshotting
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55799
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

commit ed720007ba6be17434eb68b604fd36bd91c0d894
Author: Henry Song <henry.song@samsung.com>
Date:   Thu Oct 11 16:57:57 2012 +0100

    recording: copy reverses its dst and src parameters
    
    Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=55799

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.