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

Unified Diff: src/gpu/GrDrawTarget.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/GrDrawTarget.h ('k') | src/gpu/GrPathProcessor.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrDrawTarget.cpp
diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp
index 0e7e6bce90225646e42e3625db8b79a32fda7b7b..3d8b658d72d5009f25ae2d98fc76da8f6e3eb114 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -187,7 +187,7 @@ void GrDrawTarget::getPathStencilSettingsForFilltype(GrPathRendering::FillType f
}
void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
- const GrPathProcessor* pathProc,
+ const SkMatrix& viewMatrix,
const GrPath* path,
GrPathRendering::FillType fill) {
// TODO: extract portions of checkDraw that are relevant to path stenciling.
@@ -208,7 +208,7 @@ void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
GrStencilAttachment* sb = rt->renderTargetPriv().attachStencilAttachment();
this->getPathStencilSettingsForFilltype(fill, sb, &stencilSettings);
- GrBatch* batch = GrStencilPathBatch::Create(pathProc->viewMatrix(),
+ GrBatch* batch = GrStencilPathBatch::Create(viewMatrix,
pipelineBuilder.isHWAntialias(),
stencilSettings, scissorState,
pipelineBuilder.getRenderTarget(),
@@ -218,22 +218,25 @@ void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
}
void GrDrawTarget::drawPath(const GrPipelineBuilder& pipelineBuilder,
- const GrPathProcessor* pathProc,
+ const SkMatrix& viewMatrix,
+ GrColor color,
const GrPath* path,
GrPathRendering::FillType fill) {
SkASSERT(path);
SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
- GrDrawPathBatchBase* batch = GrDrawPathBatch::Create(pathProc, path);
+ GrDrawPathBatchBase* batch = GrDrawPathBatch::Create(viewMatrix, color, path);
this->drawPathBatch(pipelineBuilder, batch, fill);
batch->unref();
}
void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder,
- const GrPathProcessor* pathProc,
+ const SkMatrix& viewMatrix,
+ const SkMatrix& localMatrix,
+ GrColor color,
GrPathRangeDraw* draw,
GrPathRendering::FillType fill) {
- GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(pathProc, draw);
+ GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localMatrix, color, draw);
this->drawPathBatch(pipelineBuilder, batch, fill);
batch->unref();
}
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrPathProcessor.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698