[graphite] Tighter bounds for stroked [r]rects
The miter limit and cap outset can be significant, which must be
accounted for in arbitrary stroked path bounds, but it can easily cause
stroked [r]rects and lines to be clipped when they shouldn't be.
This was noticed while investigating the performance regressions from
https://skia-review.googlesource.com/c/skia/+/1015960. While the bounds
issue was always present, the tight scissor avoided analytic clipping
and with a loose scissor, it triggered more costly clipping. With tight
bounds, it correctly detects that no clipping is needed.
Bug: b/424510276
Change-Id: I980f2a8c7d904155f6d6de060147607bed628bea
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/1023317
Commit-Queue: Michael Ludwig <michaelludwig@google.com>
Reviewed-by: Thomas Smith <thomsmit@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
1 file changed