diff options
author | Chris Dalton <csmartdalton@google.com> | 2017-09-08 16:25:08 -0600 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-12 20:04:20 +0000 |
commit | db91c6e7fbfc9d1d8fd203f7e08eefb602e4a0b9 (patch) | |
tree | cb13d0253d2161a7e995bc94fc8cedb85df7dd04 /src/gpu/GrPathRendererChain.cpp | |
parent | a640c49b7ecf667696542143edec96d10a940592 (diff) |
Improve heuristics for when to use ccpr
Gives the convex and tessellating renderers first claim on larger
paths, and the distance field renderer first claim on complex,
non-volatile paths. This also requires plumbing the clip bounds
through GrPathRenderer::CanDrawPathArgs.
Bug: skia:
Change-Id: I16e1d35ad5ee63251e33f113b1579cbba60456da
Reviewed-on: https://skia-review.googlesource.com/42224
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
Diffstat (limited to 'src/gpu/GrPathRendererChain.cpp')
-rw-r--r-- | src/gpu/GrPathRendererChain.cpp | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp index 4a39f256fe..466f90a890 100644 --- a/src/gpu/GrPathRendererChain.cpp +++ b/src/gpu/GrPathRendererChain.cpp @@ -50,6 +50,12 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti // AA hairline path renderer is very specialized - no other renderer can do this job well fChain.push_back(sk_make_sp<GrAAHairLinePathRenderer>()); + if (options.fGpuPathRenderers & GpuPathRenderers::kCoverageCounting) { + if (auto ccpr = GrCoverageCountingPathRenderer::CreateIfSupported(*context->caps())) { + context->contextPriv().addOnFlushCallbackObject(ccpr.get()); + fChain.push_back(std::move(ccpr)); + } + } if (options.fGpuPathRenderers & GpuPathRenderers::kAAConvex) { fChain.push_back(sk_make_sp<GrAAConvexPathRenderer>()); } @@ -59,12 +65,6 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& opti if (options.fGpuPathRenderers & GpuPathRenderers::kSmall) { fChain.push_back(sk_make_sp<GrSmallPathRenderer>()); } - if (options.fGpuPathRenderers & GpuPathRenderers::kCoverageCounting) { - if (auto ccpr = GrCoverageCountingPathRenderer::CreateIfSupported(*context->caps())) { - context->contextPriv().addOnFlushCallbackObject(ccpr.get()); - fChain.push_back(std::move(ccpr)); - } - } if (options.fGpuPathRenderers & GpuPathRenderers::kTessellating) { fChain.push_back(sk_make_sp<GrTessellatingPathRenderer>()); } |