Bug 54991 - Strokes aren't fully rendered at ends
Summary: Strokes aren't fully rendered at ends
Alias: None
Product: cairo
Classification: Unclassified
Component: general (show other bugs)
Version: 1.12.0
Hardware: Other All
: medium normal
Assignee: Carl Worth
QA Contact: cairo-bugs mailing list
Depends on:
Blocks: cairo-1.16
  Show dependency treegraph
Reported: 2012-09-16 19:09 UTC by Ruslan Kabatsayev
Modified: 2014-09-28 08:28 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:

Comparison of new and old cairo renders (6.74 KB, image/png)
2012-09-16 19:09 UTC, Ruslan Kabatsayev

Description Ruslan Kabatsayev 2012-09-16 19:09:19 UTC
Created attachment 67254 [details]
Comparison of new and old cairo renders

I'm developing oxygen-gtk, and it uses cairo for all its rendering. After I updated to cairo-1.12 series, windeco button icons stopped rendering correctly.
See screenshot - in lowest example the lines seem shorter than in the middle one. The upper example shows QPainter rendering which uses the same coords and is the reference (qt-)oxygen implementation. This used to work correctly in cairo-1.8 series.

How to reproduce:
1. compile oxygen-gtk with passing "-DBUILD_DECO_TEST=1" to cmake
2. install oxygen-gtk, run oxygen-gtk-deco
3. compare to renders in the screenshot

I've used git-bisect, here's the result:
545f30856aac98199a49cf66c72dbcb66c1f3a4f is the first bad commit
commit 545f30856aac98199a49cf66c72dbcb66c1f3a4f
Author: Chris Wilson <chris@chris-wilson.co.uk>
Date:   Mon Aug 15 09:44:03 2011 +0100

    stroke: Convert the outlines into contour and then into a polygon
    In step 1 of speeding up stroking, we introduce contours as a means for
    tracking the connected edges around the stroke. By keeping track of
    these chains, we can analyse the edges as we proceed and eliminate
    redundant vertices speeding up rasterisation.
    Coincidentally fixes line-width-tolerance (looks like a combination of
    using spline tangent vectors and tolerance).
    Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>

:040000 040000 288e083453c8201e22857190f04dc1dab7b1d715 d4ae5bd2c4569e3c80fc0b0e2ec8cd22a475b635 M      src
:040000 040000 44d5f22dbd42f0b41134031027314caafe92add3 9f05f71a73c59936de4ef23b5c5d710542787d5b M      util
Comment 1 Bryce Harrington 2014-09-16 17:57:55 UTC
Mind providing a simple test case that reproduces this bug?
Comment 2 Bryce Harrington 2014-09-22 19:19:17 UTC
Moving from 1.14 tracker to 1.16 tracker
Comment 3 Ruslan Kabatsayev 2014-09-28 08:28:06 UTC
I can't seem to reproduce this with cairo-1.13.1 on Kubuntu 14.04.

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.