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

Unified Diff: src/gpu/GrDrawTarget.cpp

Issue 1506823004: Remove drawPathsFromRange from GrDrawContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: formatting Created 5 years 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/GrStencilAndCoverTextContext.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 4f91a3cf96ff340d34ce6654fc8de2bc0bb378d8..59488c4d0352b596ea32334b956a291955bdeb5e 100644
--- a/src/gpu/GrDrawTarget.cpp
+++ b/src/gpu/GrDrawTarget.cpp
@@ -316,40 +316,13 @@ void GrDrawTarget::stencilPath(const GrPipelineBuilder& pipelineBuilder,
batch->unref();
}
-void GrDrawTarget::drawPath(const GrPipelineBuilder& pipelineBuilder,
- const SkMatrix& viewMatrix,
- GrColor color,
- const GrPath* path,
- GrPathRendering::FillType fill) {
- SkASSERT(path);
- SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
-
- GrDrawPathBatchBase* batch = GrDrawPathBatch::Create(viewMatrix, color, path);
- this->drawPathBatch(pipelineBuilder, batch, fill);
- batch->unref();
-}
-
-void GrDrawTarget::drawPathsFromRange(const GrPipelineBuilder& pipelineBuilder,
- const SkMatrix& viewMatrix,
- const SkMatrix& localMatrix,
- GrColor color,
- GrPathRange* range,
- GrPathRangeDraw* draw,
- GrPathRendering::FillType fill,
- const SkRect& bounds) {
- GrDrawPathBatchBase* batch = GrDrawPathRangeBatch::Create(viewMatrix, localMatrix, color,
- range, draw, bounds);
- this->drawPathBatch(pipelineBuilder, batch, fill);
- batch->unref();
-}
-
void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
- GrDrawPathBatchBase* batch,
- GrPathRendering::FillType fill) {
+ GrDrawPathBatchBase* batch) {
// This looks like drawBatch() but there is an added wrinkle that stencil settings get inserted
// after setting up clipping but before onDrawBatch(). TODO: Figure out a better model for
// handling stencil settings WRT interactions between pipeline(builder), clipmaskmanager, and
// batches.
+ SkASSERT(this->caps()->shaderCaps()->pathRenderingSupport());
GrPipelineBuilder::AutoRestoreStencil ars;
GrAppliedClip clip;
@@ -367,7 +340,7 @@ void GrDrawTarget::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
GrStencilSettings stencilSettings;
GrRenderTarget* rt = pipelineBuilder.getRenderTarget();
GrStencilAttachment* sb = fResourceProvider->attachStencilAttachment(rt);
- this->getPathStencilSettingsForFilltype(fill, sb, &stencilSettings);
+ this->getPathStencilSettingsForFilltype(batch->fillType(), sb, &stencilSettings);
batch->setStencilSettings(stencilSettings);
GrPipeline::CreateArgs args;
« no previous file with comments | « src/gpu/GrDrawTarget.h ('k') | src/gpu/GrStencilAndCoverTextContext.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698