From 8ff8d24c83353fc421177886d82202da9ff89234 Mon Sep 17 00:00:00 2001 From: cdalton Date: Tue, 8 Dec 2015 10:20:32 -0800 Subject: 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 --- src/gpu/GrDrawContext.cpp | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'src/gpu/GrDrawContext.cpp') 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, -- cgit v1.2.3