Reland "Prefer GrAAConvexPathRenderer over ccpr"
This is a reland of c00e47054744c4b6733a129b9cfc372d2085899e
Original change's description:
> Prefer GrAAConvexPathRenderer over ccpr
>
> Even though ccpr can be faster than the convex renderer for small
> paths, there is value in a simpler, more consistent approach. The
> convex renderer is single-pass, doesn't deal with caching, and is
> unaffected by the less favorable flush pattern in Chrome. We can
> address the regressions from this CL by optimizing single-pass convex
> path rendering, rather than trying to use ccpr more.
>
> Bug: chromium:860021
> Change-Id: I44ceefa43cdad7fb25c620faed8b525901fb1f0c
> Reviewed-on: https://skia-review.googlesource.com/c/171525
> Reviewed-by: Chris Dalton <csmartdalton@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Chris Dalton <csmartdalton@google.com>
Bug: chromium:860021
Change-Id: I37c2244f8a054614389cc35854706cbebf5d2e7c
Reviewed-on: https://skia-review.googlesource.com/c/173199
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp
index 60c935a..a6ad513 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -34,6 +34,9 @@
fChain.push_back(std::move(pr));
}
}
+ if (options.fGpuPathRenderers & GpuPathRenderers::kAAConvex) {
+ fChain.push_back(sk_make_sp<GrAAConvexPathRenderer>());
+ }
if (options.fGpuPathRenderers & GpuPathRenderers::kCoverageCounting) {
using AllowCaching = GrCoverageCountingPathRenderer::AllowCaching;
if (auto ccpr = GrCoverageCountingPathRenderer::CreateIfSupported(
@@ -46,9 +49,6 @@
if (options.fGpuPathRenderers & GpuPathRenderers::kAAHairline) {
fChain.push_back(sk_make_sp<GrAAHairLinePathRenderer>());
}
- if (options.fGpuPathRenderers & GpuPathRenderers::kAAConvex) {
- fChain.push_back(sk_make_sp<GrAAConvexPathRenderer>());
- }
if (options.fGpuPathRenderers & GpuPathRenderers::kAALinearizing) {
fChain.push_back(sk_make_sp<GrAALinearizingConvexPathRenderer>());
}