summaryrefslogtreecommitdiff
path: root/src/cairo-path-stroke-traps.c
AgeCommit message (Collapse)AuthorFilesLines
2017-05-13Revert "stroker: Check for scaling overflow in computing half line widths"Uli Schlachter1-1/+0
This reverts commit 91b25005d62fe4ca178f45d349374e42c29a5e11 because it causes lots of new crashes due to assertion failures.
2017-05-04stroker: Check for scaling overflow in computing half line widthsChris Wilson1-0/+1
Given a combination of a large scaling matrix and a large line, we can easily generate a half line width that is unrepresentable in our 24.8 fixed-point. This leads to spurious errors later, such as generating negative height boxes, and so asking pixman to fill to infinity. To avoid this, we can check for overflow in calculating the half line with, though we still lack adequate range checking on the final stroke path. References: https://bugs.webkit.org/show_bug.cgi?id=16793 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Cc: magomez@igalia.com Tested-by: Bryce Harrington <bryce@osg.samsung.com> Acked-by: Bryce Harrington <bryce@osg.samsung.com>
2014-11-20win32: Fix compilation of 'cairo-path-stroke-traps.c' with MSVC8Hans Breuer1-4/+6
"The issue here is that Visual Studio 2005+ is quite strict on type conversions (so it wants code to be clear enough on conversions)." Fixes: https://bugs.freedesktop.org/show_bug.cgi?id=84908
2014-09-29stroke,traps: Emit join without loss of precisionChris Wilson1-15/+40
As the target renderers operate at a different sample resolution then we use internally for coordinate representation, there is always a potential for discrepancies in the line gradients when passing around trapezoids. To overcome this, the protocol specification of trapezoids uses the full lines and vertical range as opposed to vertices and so long as we always use the same lines for conjoint trapezoids, they remain abutting in the rasteriser. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=84115 Testcase: bug-84115 Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-10-31Fixes stroke-clipped, i.c. of a dashed strokeegag1-1/+1
Similar to 1f4d05b55c96347aa4240190fda27f951b00c539 'Fix calling '_cairo_spline_intersect' for in-bounds checking of splines' Reviewed-by: Bryce Harrington <b.harrington@samsung.com>
2013-01-09stroke: Flip the dev slope as well for computing the cusp on a degeneracyChris Wilson1-0/+2
Otherwise, the join think it starts and end in exactly the same direction and elimiates the round capping. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
2013-01-03stroke: Make the incremental trapezoid stroker optionally available againChris Wilson1-0/+1120
Whilst it cannot handle self-intersecting strokes (which includes the antialias region of neighbouring lines and joints), it is about 3x faster to use than the more robust algorithm. As some backends delegate the rendering, the quality may still be preserved and so they should be responsible for choosing the appropriate method for generation of the stroke geometry. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>