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

Unified Diff: src/gpu/GrPathRendererChain.cpp

Issue 1311673014: Remove GrAddPathRenderers_default (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks Created 5 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/GrPathRenderer.h ('k') | src/gpu/batches/GrAAHairLinePathRenderer.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 e408762d0aea0b147efc92506a1d21e100aec017..c2f395cac33c6ecd82b59096c5d1b2609fde8864 100644
--- a/src/gpu/GrPathRendererChain.cpp
+++ b/src/gpu/GrPathRendererChain.cpp
@@ -11,9 +11,17 @@
#include "GrCaps.h"
#include "GrContext.h"
-#include "GrDefaultPathRenderer.h"
#include "GrGpu.h"
+#include "batches/GrAAConvexPathRenderer.h"
+#include "batches/GrAADistanceFieldPathRenderer.h"
+#include "batches/GrAAHairLinePathRenderer.h"
+#include "batches/GrAALinearizingConvexPathRenderer.h"
+#include "batches/GrDashLinePathRenderer.h"
+#include "batches/GrDefaultPathRenderer.h"
+#include "batches/GrStencilAndCoverPathRenderer.h"
+#include "batches/GrTessellatingPathRenderer.h"
+
GrPathRendererChain::GrPathRendererChain(GrContext* context)
: fInit(false)
, fOwner(context) {
@@ -85,10 +93,19 @@ GrPathRenderer* GrPathRendererChain::getPathRenderer(const GrDrawTarget* target,
void GrPathRendererChain::init() {
SkASSERT(!fInit);
- const GrCaps* caps = fOwner->caps();
- bool twoSided = caps->twoSidedStencilSupport();
- bool wrapOp = caps->stencilWrapOpsSupport();
- GrPathRenderer::AddPathRenderers(fOwner, this);
- this->addPathRenderer(new GrDefaultPathRenderer(twoSided, wrapOp))->unref();
+ const GrCaps& caps = *fOwner->caps();
+ this->addPathRenderer(new GrDashLinePathRenderer)->unref();
+
+ if (GrPathRenderer* pr = GrStencilAndCoverPathRenderer::Create(fOwner->resourceProvider(),
+ caps)) {
+ this->addPathRenderer(pr)->unref();
+ }
+ this->addPathRenderer(new GrTessellatingPathRenderer)->unref();
+ this->addPathRenderer(new GrAAHairLinePathRenderer)->unref();
+ this->addPathRenderer(new GrAAConvexPathRenderer)->unref();
+ this->addPathRenderer(new GrAALinearizingConvexPathRenderer)->unref();
+ this->addPathRenderer(new GrAADistanceFieldPathRenderer)->unref();
+ this->addPathRenderer(new GrDefaultPathRenderer(caps.twoSidedStencilSupport(),
+ caps.stencilWrapOpsSupport()))->unref();
fInit = true;
}
« no previous file with comments | « src/gpu/GrPathRenderer.h ('k') | src/gpu/batches/GrAAHairLinePathRenderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698