[graphite] Support hairlines/subpixel fills/strokes in AnalyticRoundRectRenderStep

The largest functional change in this CL is that a ring of vertices that
had been placed along the base shape (no stroke inset or outset) is
removed. In order to handle the coverage for both the inner and outer
edges, the VS now interpolates two opposing distances instead of
relying on the now-removed vertices to change the interpolation
direction. This reduces the vertex and triangle count of the instance
mesh, and simplifies some of the vertex placement complexities when
there are more complex interiors for strokes.

Importantly, it also lets strokes and fills support hairline and
subpixel scaling+biasing of the coverage values to improve rendering
quality. For fills, there is no opposing distance to interpolate, so
the 2nd edgeDistance varying stores the orthogonal dimension of the
shape to act as a coverage clamp when the shape is very long in one
direction but less than a single pixel on the other axis.

This CL also corrects some incorrect placement of inner and fill
vertices when the stroke had an interior miter and the rectangles had a
large aspect ratio. The inner vertices are placed on the actual miter
instead of snapping to the center when the AA insets overlap. There
are remaining issues with inner corner curves intersecting each other
(detected on the CPU but not handled in the VS yet), as well as subtle
limitations with interpolating opposing distances along one axis when
the interior is mitered (very skinny strokes due to perspective can
bleed beyond the corner).

Bug: b/260713170
Change-Id: I7ca75ce0b96c6ef82cd946c1f6c4778687d6e555
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/631399
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
4 files changed