Use a smaller tolerance when chopping conics to quads
In most places we were using 0.25 (maximum distance between the actual
and approximated curves). In these few places, we were using 0.5, which
is enough to produce visible errors.
Added a GM that demonstrated the problem as reported - many of the arcs
with radius ~8 were previously closer to round-rects than circles.
Bug: chromium:888453
Change-Id: I7d22e27773f56174861526dd0223f52a93bf48eb
Reviewed-on: https://skia-review.googlesource.com/c/172060
Commit-Queue: Brian Osman <brianosman@google.com>
Reviewed-by: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ops/GrAAConvexPathRenderer.cpp b/src/gpu/ops/GrAAConvexPathRenderer.cpp
index 624c261..2921b3e 100644
--- a/src/gpu/ops/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/ops/GrAAConvexPathRenderer.cpp
@@ -316,7 +316,7 @@
m.mapPoints(pts, 3);
SkScalar weight = iter.conicWeight();
SkAutoConicToQuads converter;
- const SkPoint* quadPts = converter.computeQuads(pts, weight, 0.5f);
+ const SkPoint* quadPts = converter.computeQuads(pts, weight, 0.25f);
for (int i = 0; i < converter.countQuads(); ++i) {
update_degenerate_test(°enerateData, quadPts[2*i + 1]);
update_degenerate_test(°enerateData, quadPts[2*i + 2]);