diff options
author | bsalomon <bsalomon@google.com> | 2016-09-21 11:16:05 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-09-21 11:16:05 -0700 |
commit | 39ef7fb885d7be648b9f0ecd027bc400d1213cec (patch) | |
tree | dadf2a165d64b90cce680395b1c013e19c01bee7 /src/gpu/GrPathRendererChain.cpp | |
parent | 669983856d99b9312be3166b7dd1f8483a90c315 (diff) |
Add optional sw generated path coverage mask caching
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2335343008
All the bots except the painfully slow windows compiler have finished so,
NOTRY=true
Review-Url: https://codereview.chromium.org/2335343008
Diffstat (limited to 'src/gpu/GrPathRendererChain.cpp')
-rw-r--r-- | src/gpu/GrPathRendererChain.cpp | 46 |
1 files changed, 24 insertions, 22 deletions
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp index 12ad51e7f3..95105ba079 100644 --- a/src/gpu/GrPathRendererChain.cpp +++ b/src/gpu/GrPathRendererChain.cpp @@ -26,30 +26,32 @@ #include "batches/GrTessellatingPathRenderer.h" GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& options) { - const GrCaps& caps = *context->caps(); - this->addPathRenderer(new GrDashLinePathRenderer)->unref(); + if (!options.fDisableAllPathRenderers) { + const GrCaps& caps = *context->caps(); + this->addPathRenderer(new GrDashLinePathRenderer)->unref(); - if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->resourceProvider(), - caps)) { - this->addPathRenderer(pr)->unref(); - } -#ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK - if (caps.sampleShadingSupport()) { - this->addPathRenderer(new GrMSAAPathRenderer)->unref(); - } -#endif - this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); - this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); - this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); - if (caps.shaderCaps()->plsPathRenderingSupport()) { - this->addPathRenderer(new GrPLSPathRenderer)->unref(); - } - if (!options.fDisableDistanceFieldRenderer) { - this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); + if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(context->resourceProvider(), + caps)) { + this->addPathRenderer(pr)->unref(); + } + #ifndef SK_BUILD_FOR_ANDROID_FRAMEWORK + if (caps.sampleShadingSupport()) { + this->addPathRenderer(new GrMSAAPathRenderer)->unref(); + } + #endif + this->addPathRenderer(new GrAAHairLinePathRenderer)->unref(); + this->addPathRenderer(new GrAAConvexPathRenderer)->unref(); + this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref(); + if (caps.shaderCaps()->plsPathRenderingSupport()) { + this->addPathRenderer(new GrPLSPathRenderer)->unref(); + } + if (!options.fDisableDistanceFieldRenderer) { + this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); + } + this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); + this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(), + caps.stencilWrapOpsSupport()))->unref(); } - this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); - this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(), - caps.stencilWrapOpsSupport()))->unref(); } GrPathRendererChain::~GrPathRendererChain() { |