diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-22 12:53:08 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-09-29 08:42:17 +0100 |
commit | 06b9f8fa2d179850cda8a0a103896bc011ce46d6 (patch) | |
tree | ba6166eb807ba768a75cb7f71b7d68256842ece4 /src/cairo-traps-private.h | |
parent | 5c03b20732b84370950f0c7e5648da86ef45a571 (diff) | |
download | cairo-06b9f8fa2d179850cda8a0a103896bc011ce46d6.tar.gz |
stroke,traps: Emit join without loss of precision
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>
Diffstat (limited to 'src/cairo-traps-private.h')
-rw-r--r-- | src/cairo-traps-private.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/cairo-traps-private.h b/src/cairo-traps-private.h index 7fef062a4..dcaf40d18 100644 --- a/src/cairo-traps-private.h +++ b/src/cairo-traps-private.h @@ -91,8 +91,9 @@ cairo_private void _cairo_traps_translate (cairo_traps_t *traps, int x, int y); cairo_private void -_cairo_traps_tessellate_triangle (cairo_traps_t *traps, - const cairo_point_t t[3]); +_cairo_traps_tessellate_triangle_with_edges (cairo_traps_t *traps, + const cairo_point_t t[3], + const cairo_point_t edges[4]); cairo_private void _cairo_traps_tessellate_convex_quad (cairo_traps_t *traps, @@ -106,7 +107,8 @@ _cairo_traps_tessellate_rectangle (cairo_traps_t *traps, cairo_private void _cairo_traps_add_trap (cairo_traps_t *traps, cairo_fixed_t top, cairo_fixed_t bottom, - cairo_line_t *left, cairo_line_t *right); + const cairo_line_t *left, + const cairo_line_t *right); cairo_private int _cairo_traps_contain (const cairo_traps_t *traps, |