GrTessellator: implement straight skeleton, phase 2.

This CL implements two major changes to the AA tessellating path
renderer:

1) Fix inverted edges after stroke and simplify. Instead of detecting
   and fixing edges which invert on stroking during the stroking pass, we
   run the full simplify pass on both inner and outer contours, then
   create edge collapse events for the overlap regions. We then process
   the edge events in a priority queue and process them in order of decreasing
   alpha (this is the "edge event" part of the straight skeleton
   algorithm). By doing it after simplification, we ensure that
   there's a full-alpha intersection vertex to join the collapse edge
   to (which may have <1 alpha), so no spurious gradients appear in
   the rendered path.

2) "Pointy" vertices (defined as those which meet at an acute angle less
   than 14 degrees) are now properly bevelled off during stroking.
   This removes antialiasing artifacts which extend beyond the path
   boundary.

Some ancillary changes:

The extracted boundaries which are input to stroking have their line
equations pre-normalized, and multiplied by winding.  This simplifies
a lot of code which was performing this computation on the fly.

The workaround for the "intruding vertex" problem was removed, since the
straight skeleton now moves the intruding vertex before it can cause
problems.

Bug: 756823
Change-Id: I271ed32be6847da55273b387e8c04bbf9b512b70
Reviewed-on: https://skia-review.googlesource.com/87341
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Stephen White <senorblanco@chromium.org>
2 files changed