Skip to content

Commit

Permalink
Prefer GrAAConvexPathRenderer over ccpr
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
csmartdalton86 authored and Skia Commit-Bot committed Nov 16, 2018
1 parent 68cfc5b commit c00e470
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/gpu/GrPathRendererChain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti
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(
Expand All @@ -46,9 +49,6 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti
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>());
}
Expand Down

0 comments on commit c00e470

Please sign in to comment.