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

Unified Diff: src/gpu/batches/GrStencilAndCoverPathRenderer.cpp

Issue 1337513002: Late creation of GrPathProcessor (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/batches/GrDrawPathBatch.cpp ('k') | src/gpu/gl/GrGLPathProcessor.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index 1a32e3fb75647c155f9ca97d74a9d4de4ccc7143..720c1c34f6544dc7aa7881e8806ee4a020f3cdce 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -79,9 +79,8 @@ static GrPath* get_gr_path(GrResourceProvider* resourceProvider, const SkPath& s
void GrStencilAndCoverPathRenderer::onStencilPath(const StencilPathArgs& args) {
SkASSERT(!args.fPath->isInverseFillType());
- SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(GrColor_WHITE, *args.fViewMatrix));
SkAutoTUnref<GrPath> p(get_gr_path(fResourceProvider, *args.fPath, *args.fStroke));
- args.fTarget->stencilPath(*args.fPipelineBuilder, pp, p,
+ args.fTarget->stencilPath(*args.fPipelineBuilder, *args.fViewMatrix, p,
convert_skpath_filltype(args.fPath->getFillType()));
}
@@ -115,8 +114,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
pipelineBuilder->setStencil(kInvertedStencilPass);
// fake inverse with a stencil and cover
- SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(GrColor_WHITE, viewMatrix));
- args.fTarget->stencilPath(*pipelineBuilder, pp, p,
+ args.fTarget->stencilPath(*pipelineBuilder, viewMatrix, p,
convert_skpath_filltype(path.getFillType()));
SkMatrix invert = SkMatrix::I();
@@ -148,8 +146,7 @@ bool GrStencilAndCoverPathRenderer::onDrawPath(const DrawPathArgs& args) {
0xffff);
pipelineBuilder->setStencil(kStencilPass);
- SkAutoTUnref<GrPathProcessor> pp(GrPathProcessor::Create(args.fColor, viewMatrix));
- args.fTarget->drawPath(*pipelineBuilder, pp, p,
+ args.fTarget->drawPath(*pipelineBuilder, viewMatrix, args.fColor, p,
convert_skpath_filltype(path.getFillType()));
}
« no previous file with comments | « src/gpu/batches/GrDrawPathBatch.cpp ('k') | src/gpu/gl/GrGLPathProcessor.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698