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

Unified Diff: src/gpu/batches/GrDrawPathBatch.h

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/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrDrawPathBatch.h
diff --git a/src/gpu/batches/GrDrawPathBatch.h b/src/gpu/batches/GrDrawPathBatch.h
index 4067c808dc017007af24524a3b2a2b15befc33ba..fdd3448a737918086cbe8c6687103832e3dda670 100644
--- a/src/gpu/batches/GrDrawPathBatch.h
+++ b/src/gpu/batches/GrDrawPathBatch.h
@@ -27,13 +27,17 @@ public:
overrides->fUsePLSDstRead = false;
}
+ GrPathRendering::FillType fillType() const { return fFillType; }
+
void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings = stencil; }
protected:
- GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor initialColor)
+ GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor initialColor,
+ GrPathRendering::FillType fill)
: INHERITED(classID)
, fViewMatrix(viewMatrix)
- , fColor(initialColor) {}
+ , fColor(initialColor)
+ , fFillType(fill) {}
const GrStencilSettings& stencilSettings() const { return fStencilSettings; }
const GrXPOverridesForBatch& overrides() const { return fOverrides; }
@@ -48,6 +52,7 @@ private:
SkMatrix fViewMatrix;
GrColor fColor;
+ GrPathRendering::FillType fFillType;
GrStencilSettings fStencilSettings;
GrXPOverridesForBatch fOverrides;
@@ -60,8 +65,8 @@ public:
// This can't return a more abstract type because we install the stencil settings late :(
static GrDrawPathBatchBase* Create(const SkMatrix& viewMatrix, GrColor color,
- const GrPath* path) {
- return new GrDrawPathBatch(viewMatrix, color, path);
+ GrPathRendering::FillType fill, const GrPath* path) {
+ return new GrDrawPathBatch(viewMatrix, color, fill, path);
}
const char* name() const override { return "DrawPath"; }
@@ -69,8 +74,9 @@ public:
SkString dumpInfo() const override;
private:
- GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, const GrPath* path)
- : INHERITED(ClassID(), viewMatrix, color)
+ GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, GrPathRendering::FillType fill,
+ const GrPath* path)
+ : INHERITED(ClassID(), viewMatrix, color, fill)
, fPath(path) {
fBounds = path->getBounds();
viewMatrix.mapRect(&fBounds);
@@ -148,9 +154,11 @@ public:
// This can't return a more abstract type because we install the stencil settings late :(
static GrDrawPathBatchBase* Create(const SkMatrix& viewMatrix, const SkMatrix& localMatrix,
- GrColor color, GrPathRange* range, GrPathRangeDraw* draw,
+ GrColor color, GrPathRendering::FillType fill,
+ GrPathRange* range, GrPathRangeDraw* draw,
const SkRect& bounds) {
- return new GrDrawPathRangeBatch(viewMatrix, localMatrix, color, range, draw, bounds);
+ return new GrDrawPathRangeBatch(viewMatrix, localMatrix, color, fill, range, draw,
+ bounds);
}
~GrDrawPathRangeBatch() override;
@@ -160,10 +168,9 @@ public:
SkString dumpInfo() const override;
private:
- inline bool isWinding() const;
-
GrDrawPathRangeBatch(const SkMatrix& viewMatrix, const SkMatrix& localMatrix, GrColor color,
- GrPathRange* range, GrPathRangeDraw* draw, const SkRect& bounds);
+ GrPathRendering::FillType fill, GrPathRange* range,
+ GrPathRangeDraw* draw, const SkRect& bounds);
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override;
« no previous file with comments | « src/gpu/GrStencilAndCoverTextContext.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698