[graphite] Check miter limit for stroked rects

I had a flawed understanding of the miter limit and thought it's min
allowed value was sqrt(2) so 90 degree corners would never be a bevel.
That's not the case so this checks the miter limit before uploading the
final join style to the instance data.

I also noticed that the stroke_rect_shader GM was setting the miter
limit on the paint and then drawing a second row, so on the second
time through the original full-miter draw was still seeing the very
small miter limit and was becoming beveled. This is fixed so the
miter column matches across AA and non-AA.

I confirmed that in Graphite, the beveled-miter column now draws with
bevels instead of mitered.

Bug: b/266451994
Change-Id: Ia8f3a4d7c9ddb9b9b34f933d0787b967181e07c2
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/645040
Commit-Queue: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Auto-Submit: Michael Ludwig <michaelludwig@google.com>
2 files changed