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

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

Issue 1353043002: Revert of add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 3 months 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/batches/GrDrawBatch.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 228ad86617f234d40b892fb295a1883a350c7e23..71ef9d42b482de9dc5f5002c986162011fb894ed 100644
--- a/src/gpu/batches/GrDrawPathBatch.h
+++ b/src/gpu/batches/GrDrawPathBatch.h
@@ -30,9 +30,8 @@
void setStencilSettings(const GrStencilSettings& stencil) { fStencilSettings = stencil; }
protected:
- GrDrawPathBatchBase(uint32_t classID, const SkMatrix& viewMatrix, GrColor initialColor)
- : INHERITED(classID)
- , fViewMatrix(viewMatrix)
+ GrDrawPathBatchBase(const SkMatrix& viewMatrix, GrColor initialColor)
+ : fViewMatrix(viewMatrix)
, fColor(initialColor) {}
const GrStencilSettings& stencilSettings() const { return fStencilSettings; }
@@ -56,8 +55,6 @@
class GrDrawPathBatch final : public GrDrawPathBatchBase {
public:
- DEFINE_BATCH_CLASS_ID
-
// 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) {
@@ -70,10 +67,11 @@
private:
GrDrawPathBatch(const SkMatrix& viewMatrix, GrColor color, const GrPath* path)
- : INHERITED(ClassID(), viewMatrix, color)
+ : INHERITED(viewMatrix, color)
, fPath(path) {
fBounds = path->getBounds();
viewMatrix.mapRect(&fBounds);
+ this->initClassID<GrDrawPathBatch>();
}
bool onCombineIfPossible(GrBatch* t, const GrCaps& caps) override { return false; }
@@ -149,9 +147,7 @@
// Template this if we decide to support index types other than 16bit
class GrDrawPathRangeBatch final : public GrDrawPathBatchBase {
public:
- DEFINE_BATCH_CLASS_ID
-
- // This can't return a more abstract type because we install the stencil settings late :(
+ // This can't return a more abstracet type because we install the stencil settings late :(
static GrDrawPathBatchBase* Create(const SkMatrix& viewMatrix, const SkMatrix& localMatrix,
GrColor color, GrPathRangeDraw* pathRangeDraw) {
return SkNEW_ARGS(GrDrawPathRangeBatch, (viewMatrix, localMatrix, color, pathRangeDraw));
« no previous file with comments | « src/gpu/batches/GrDrawBatch.cpp ('k') | src/gpu/batches/GrDrawPathBatch.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698