aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDrawContext.cpp
diff options
context:
space:
mode:
authorGravatar cdalton <cdalton@nvidia.com>2015-12-08 10:20:32 -0800
committerGravatar Commit bot <commit-bot@chromium.org>2015-12-08 10:20:32 -0800
commit8ff8d24c83353fc421177886d82202da9ff89234 (patch)
tree910de7210e4335d5323c7897e054deb68acde81d /src/gpu/GrDrawContext.cpp
parent77665b8a0721a15584eb62a7ac276149139f6ff8 (diff)
Remove drawPathsFromRange from GrDrawContext
Replaces drawPathsFromRange with a more general drawPathBatch method. While this still isn't perfect, it's a step in the right direction that removes the need for path range draws to fit in a public API. BUG=skia: Review URL: https://codereview.chromium.org/1506823004
Diffstat (limited to 'src/gpu/GrDrawContext.cpp')
-rw-r--r--src/gpu/GrDrawContext.cpp26
1 files changed, 10 insertions, 16 deletions
diff --git a/src/gpu/GrDrawContext.cpp b/src/gpu/GrDrawContext.cpp
index f8859df2ee..8978c6b542 100644
--- a/src/gpu/GrDrawContext.cpp
+++ b/src/gpu/GrDrawContext.cpp
@@ -136,22 +136,6 @@ void GrDrawContext::drawTextBlob(const GrClip& clip, const SkPaint& skPaint,
fTextContext->drawTextBlob(this, clip, skPaint, viewMatrix, blob, x, y, filter, clipBounds);
}
-void GrDrawContext::drawPathsFromRange(const GrPipelineBuilder* pipelineBuilder,
- const SkMatrix& viewMatrix,
- const SkMatrix& localMatrix,
- GrColor color,
- GrPathRange* range,
- GrPathRangeDraw* draw,
- int /*GrPathRendering::FillType*/ fill,
- const SkRect& bounds) {
- RETURN_IF_ABANDONED
- SkDEBUGCODE(this->validate();)
-
- this->getDrawTarget()->drawPathsFromRange(*pipelineBuilder, viewMatrix, localMatrix, color,
- range, draw, (GrPathRendering::FillType) fill,
- bounds);
-}
-
void GrDrawContext::discard() {
RETURN_IF_ABANDONED
SkDEBUGCODE(this->validate();)
@@ -638,6 +622,16 @@ void GrDrawContext::drawBatch(const GrClip& clip,
this->getDrawTarget()->drawBatch(pipelineBuilder, batch);
}
+void GrDrawContext::drawPathBatch(const GrPipelineBuilder& pipelineBuilder,
+ GrDrawPathBatchBase* batch) {
+ RETURN_IF_ABANDONED
+ SkDEBUGCODE(this->validate();)
+
+ AutoCheckFlush acf(fDrawingManager);
+
+ this->getDrawTarget()->drawPathBatch(pipelineBuilder, batch);
+}
+
void GrDrawContext::drawPath(const GrClip& clip,
const GrPaint& paint,
const SkMatrix& viewMatrix,