As reported on cairo graphics mailing list (here: http://lists.cairographics.org/archives/cairo/2014-September/025623.html ), it looks like that the accelerated line drawing is broken while drawing arcs with cairo, and this is visible when the line width is way bigger than 1 pixel. Using UXA the beginning of the arc is not straight, as shown here: http://jidesk.net/sypy/strangearc2.jpg Using SNA there is also a seaming issue as shown here: http://jidesk.net/sypy/strangearc-bryce.png After consulting users on #cairo on FreeNode, the issue is confirmed, and they suggested me to report here, since it looks like it is related to intel's X acceleration on newer drivers. I am using a i5-3570K for graphics too, which is an Ivy Bridge architecture, but I suppose that the problem affects Sandy Bridge architectures also. Unfortunally I am no programmer, so I am just supposing a lot of things figuring out techno-babble I barely understand. I'm pretty sure that you could find the source of this issue anyway, and eventually bounce back to cairo developers if you find out that this is only a cairo related bug. Thanks, Maurizio
The essential of the problem looks to be that the stroke geometry I create in cairo is not accurate, with the error scaling up with line width.
Created attachment 106572 [details] Bad strokes
To demonstrate the problematic path: diff --git a/src/cairo-traps-compositor.c b/src/cairo-traps-compositor.c index 3414fc2..9618e5d 100644 --- a/src/cairo-traps-compositor.c +++ b/src/cairo-traps-compositor.c @@ -2188,7 +2188,7 @@ _cairo_traps_compositor_stroke (const cairo_compositor_t *_compositor, composite_traps_info_t info; unsigned flags; - if (antialias == CAIRO_ANTIALIAS_BEST || antialias == CAIRO_ANTIALIAS_GOOD) { + if (antialias == CAIRO_ANTIALIAS_BEST || antialias == CAIRO_ANTIALIAS_GOOD || 1) { func = _cairo_path_fixed_stroke_polygon_to_traps; flags = 0; } else { i.e. _cairo_path_fixed_stroke_to_traps() is not precise enough.
Created attachment 106672 [details] [review] Eliminate precision loss when emitting spline joins
Created attachment 106708 [details] [review] Eliminate precision loss when emitting line joins Better patch, now generates strictly correct trapezoids (i.e works with pixman as well this time)!
I captured both issues with: commit 80359e73d821516f411b25b977b442869fa5d0ad Author: Chris Wilson <chris@chris-wilson.co.uk> Date: Tue Sep 23 12:58:27 2014 +0100 test: Exercise stroking bugs with xlib/trapezoids Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84115 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
If I'm understanding correctly, both the test case and the fix have landed in the codebase (as commits 80359e73 and 06b9f8fa respectively), and so this bug can be closed. Please reopen if this is incorrect.
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.