AA GrTessellator: fix bevelling of acute angles.
authorStephen White <senorblanco@chromium.org>
Fri, 27 Jan 2017 15:53:15 +0000 (10:53 -0500)
committerSkia Commit-Bot <skia-commit-bot@chromium.org>
Fri, 27 Jan 2017 21:06:55 +0000 (21:06 +0000)
commit86cc841e23a81af69269de87224c57be274f40d1
treef3c28b044004a7dfeb3e085be7583e4757bf8542
parent2d0c238fcbd19d3b9e81352a9b88ca804e52d416
AA GrTessellator: fix bevelling of acute angles.

The code to handle acute outer angles in generated geometry was pretty
broken: it did a simple runnning average of consecutive acute vertices,
and didn't handle acute angles between the last and first edges.
Replaced it with something simpler that does proper bevelling for
angles less than 2.5 degrees.

This revealed a bug with thin path segments, exposed by the thinconcavepaths
test. This will be fixed by upcoming changes, but I've also dded a few more
test cases to make it clearer.

Change-Id: I23a628ab2e16acaab798c746a5fd87842cacbfab
Reviewed-on: https://skia-review.googlesource.com/7660
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephan White <senorblanco@chromium.org>
gm/thinconcavepaths.cpp
src/gpu/GrTessellator.cpp