Index: src/gpu/GrPathRendererChain.cpp |
diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp |
index 12ad51e7f326088656e4fadbf733a3107e8854b8..95105ba079bf42176ebfc364886872934d69b7fa 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() { |