[graphite] Simplify winding in AnalyticAARRectRenderStep

The old vertex mesh had been swapping the order of X and Y dominant
vertices between corners, and then in the vertex shader it was also
swapping the computed xAxis and yAxis to correct local coord
calculations, and computed a winding sign to correct device normal

If the corner template is replicated and we don't swap the xAxis or
yAxis, everything works out because the shape has an entirely
consistent winding. However, for edge AA quads, the input points aren't
guaranteed to be provided in clockwise order (which is the constructed
order for every other shape type). This adds a check on upload to
change the coordinate order to let the vertex shader assume all
points in local coords are clockwise.

Several other branches and conditions were consolidated or removed.
I couldn't completely remove the cornerID % 2 check because we do
have to make the X and Y radii consistent with the winding of the
corners. Way back this used to be done on upload, but now the frag
shader operates in the local coordinate system so the only place that
uses the swapped radii is vertex placement. Keeping the upload as-is
means the radii can still be moved to uniforms in a subsequent CL.

Bug: b/241403145
Change-Id: Ia8f330d1923c2090f1acd257361128cdf5054546
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/657281
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
1 file changed