Index: src/gpu/GrPathRendererChain.cpp |
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp |
index ac1c4a6cdcc55d6ca6f0c1f9e72425729b713c25..12ad51e7f326088656e4fadbf733a3107e8854b8 100644 |
--- a/src/gpu/GrPathRendererChain.cpp |
+++ b/src/gpu/GrPathRendererChain.cpp |
@@ -25,7 +25,7 @@ |
#include "batches/GrStencilAndCoverPathRenderer.h" |
#include "batches/GrTessellatingPathRenderer.h" |
-GrPathRendererChain::GrPathRendererChain(GrContext* context) { |
+GrPathRendererChain::GrPathRendererChain(GrContext* context, const Options& options) { |
const GrCaps& caps = *context->caps(); |
this->addPathRenderer(new GrDashLinePathRenderer)->unref(); |
@@ -44,7 +44,9 @@ GrPathRendererChain::GrPathRendererChain(GrContext* context) { |
if (caps.shaderCaps()->plsPathRenderingSupport()) { |
this->addPathRenderer(new GrPLSPathRenderer)->unref(); |
} |
- this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); |
+ if (!options.fDisableDistanceFieldRenderer) { |
+ this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref(); |
+ } |
this->addPathRenderer(new GrTessellatingPathRenderer)->unref(); |
this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(), |
caps.stencilWrapOpsSupport()))->unref(); |