Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1068)

Unified Diff: src/gpu/GrPathRendererChain.cpp

Issue 2335343008: Add optional sw generated path coverage mask caching (Closed)
Patch Set: Add .fs to literals in new gm Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/gpu/GrPathRendererChain.h ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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() {
« no previous file with comments | « src/gpu/GrPathRendererChain.h ('k') | src/gpu/GrSWMaskHelper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698