aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/gpu/GrDrawContext.h
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 /include/gpu/GrDrawContext.h
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 'include/gpu/GrDrawContext.h')
-rw-r--r--include/gpu/GrDrawContext.h22
1 files changed, 9 insertions, 13 deletions
diff --git a/include/gpu/GrDrawContext.h b/include/gpu/GrDrawContext.h
index bf6f2a89f3..dac9183647 100644
--- a/include/gpu/GrDrawContext.h
+++ b/include/gpu/GrDrawContext.h
@@ -16,12 +16,11 @@
class GrClip;
class GrContext;
class GrDrawBatch;
+class GrDrawPathBatchBase;
class GrDrawingManager;
class GrDrawTarget;
class GrPaint;
class GrPathProcessor;
-class GrPathRange;
-class GrPathRangeDraw;
class GrPipelineBuilder;
class GrRenderTarget;
class GrStrokeInfo;
@@ -63,17 +62,6 @@ public:
SkScalar x, SkScalar y,
SkDrawFilter*, const SkIRect& clipBounds);
- // drawPathsFromRange is thanks to GrStencilAndCoverTextContext
- // TODO: remove once path batches can be created external to GrDrawTarget.
- void drawPathsFromRange(const GrPipelineBuilder*,
- const SkMatrix& viewMatrix,
- const SkMatrix& localMatrix,
- GrColor color,
- GrPathRange* range,
- GrPathRangeDraw* draw,
- int /*GrPathRendering::FillType*/ fill,
- const SkRect& bounds);
-
/**
* Provides a perfomance hint that the render target's contents are allowed
* to become undefined.
@@ -274,6 +262,14 @@ public:
*/
void drawBatch(const GrClip&, const GrPaint&, GrDrawBatch*);
+ /**
+ * Draws a path batch. This needs to be separate from drawBatch because we install path stencil
+ * settings late.
+ *
+ * TODO: Figure out a better model that allows us to roll this method into drawBatch.
+ */
+ void drawPathBatch(const GrPipelineBuilder&, GrDrawPathBatchBase*);
+
int width() const { return fRenderTarget->width(); }
int height() const { return fRenderTarget->height(); }
int numColorSamples() const { return fRenderTarget->numColorSamples(); }