stroke,traps: Emit join without loss of precision

Graphics / Cairo - Chris Wilson [chris-wilson.co.uk] - 29 September 2014 02:42 UTC

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

06b9f8f stroke,traps: Emit join without loss of precision
src/Makefile.sources | 3 +
src/cairo-bentley-ottmann.c | 232 +------------------------------
src/cairo-line-inline.h | 48 +++++++
src/cairo-line-private.h | 50 +++++++
src/cairo-line.c | 306 +++++++++++++++++++++++++++++++++++++++++
src/cairo-path-stroke-traps.c | 55 ++++++--
src/cairo-traps-private.h | 8 +-
src/cairo-traps.c | 85 ++++++++++--
8 files changed, 530 insertions(+), 257 deletions(-)

Upstream: cgit.freedesktop.org


  • Share