Index: src/gpu/GrOvalRenderer.cpp |
diff --git a/src/gpu/GrOvalRenderer.cpp b/src/gpu/GrOvalRenderer.cpp |
index 8a938c2265cae636233d5ce9fcbe38866ef38f60..8eed38233b699ae837859050dffb52094272db71 100644 |
--- a/src/gpu/GrOvalRenderer.cpp |
+++ b/src/gpu/GrOvalRenderer.cpp |
@@ -606,15 +606,13 @@ |
class CircleBatch : public GrVertexBatch { |
public: |
- DEFINE_BATCH_CLASS_ID |
- |
struct Geometry { |
+ GrColor fColor; |
SkMatrix fViewMatrix; |
- SkRect fDevBounds; |
SkScalar fInnerRadius; |
SkScalar fOuterRadius; |
- GrColor fColor; |
bool fStroke; |
+ SkRect fDevBounds; |
}; |
static GrDrawBatch* Create(const Geometry& geometry) { return new CircleBatch(geometry); } |
@@ -707,7 +705,8 @@ |
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
- CircleBatch(const Geometry& geometry) : INHERITED(ClassID()) { |
+ CircleBatch(const Geometry& geometry) { |
+ this->initClassID<CircleBatch>(); |
fGeoData.push_back(geometry); |
this->setBounds(geometry.fDevBounds); |
@@ -754,8 +753,6 @@ |
BatchTracker fBatch; |
SkSTArray<1, Geometry, true> fGeoData; |
- |
- typedef GrVertexBatch INHERITED; |
}; |
static GrDrawBatch* create_circle_batch(GrColor color, |
@@ -824,17 +821,15 @@ |
class EllipseBatch : public GrVertexBatch { |
public: |
- DEFINE_BATCH_CLASS_ID |
- |
struct Geometry { |
+ GrColor fColor; |
SkMatrix fViewMatrix; |
- SkRect fDevBounds; |
SkScalar fXRadius; |
SkScalar fYRadius; |
SkScalar fInnerXRadius; |
SkScalar fInnerYRadius; |
- GrColor fColor; |
bool fStroke; |
+ SkRect fDevBounds; |
}; |
static GrDrawBatch* Create(const Geometry& geometry) { return new EllipseBatch(geometry); } |
@@ -931,7 +926,8 @@ |
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
- EllipseBatch(const Geometry& geometry) : INHERITED(ClassID()) { |
+ EllipseBatch(const Geometry& geometry) { |
+ this->initClassID<EllipseBatch>(); |
fGeoData.push_back(geometry); |
this->setBounds(geometry.fDevBounds); |
@@ -979,8 +975,6 @@ |
BatchTracker fBatch; |
SkSTArray<1, Geometry, true> fGeoData; |
- |
- typedef GrVertexBatch INHERITED; |
}; |
static GrDrawBatch* create_ellipse_batch(GrColor color, |
@@ -1091,19 +1085,17 @@ |
class DIEllipseBatch : public GrVertexBatch { |
public: |
- DEFINE_BATCH_CLASS_ID |
- |
struct Geometry { |
+ GrColor fColor; |
SkMatrix fViewMatrix; |
- SkRect fBounds; |
SkScalar fXRadius; |
SkScalar fYRadius; |
SkScalar fInnerXRadius; |
SkScalar fInnerYRadius; |
SkScalar fGeoDx; |
SkScalar fGeoDy; |
- GrColor fColor; |
DIEllipseEdgeEffect::Mode fMode; |
+ SkRect fBounds; |
}; |
static GrDrawBatch* Create(const Geometry& geometry, const SkRect& bounds) { |
@@ -1194,7 +1186,8 @@ |
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
- DIEllipseBatch(const Geometry& geometry, const SkRect& bounds) : INHERITED(ClassID()) { |
+ DIEllipseBatch(const Geometry& geometry, const SkRect& bounds) { |
+ this->initClassID<DIEllipseBatch>(); |
fGeoData.push_back(geometry); |
this->setBounds(bounds); |
@@ -1241,8 +1234,6 @@ |
BatchTracker fBatch; |
SkSTArray<1, Geometry, true> fGeoData; |
- |
- typedef GrVertexBatch INHERITED; |
}; |
static GrDrawBatch* create_diellipse_batch(GrColor color, |
@@ -1450,15 +1441,13 @@ |
class RRectCircleRendererBatch : public GrVertexBatch { |
public: |
- DEFINE_BATCH_CLASS_ID |
- |
struct Geometry { |
+ GrColor fColor; |
SkMatrix fViewMatrix; |
- SkRect fDevBounds; |
SkScalar fInnerRadius; |
SkScalar fOuterRadius; |
- GrColor fColor; |
bool fStroke; |
+ SkRect fDevBounds; |
}; |
static GrDrawBatch* Create(const Geometry& geometry) { |
@@ -1574,7 +1563,8 @@ |
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
- RRectCircleRendererBatch(const Geometry& geometry) : INHERITED(ClassID()) { |
+ RRectCircleRendererBatch(const Geometry& geometry) { |
+ this->initClassID<RRectCircleRendererBatch>(); |
fGeoData.push_back(geometry); |
this->setBounds(geometry.fDevBounds); |
@@ -1621,23 +1611,19 @@ |
BatchTracker fBatch; |
SkSTArray<1, Geometry, true> fGeoData; |
- |
- typedef GrVertexBatch INHERITED; |
}; |
class RRectEllipseRendererBatch : public GrVertexBatch { |
public: |
- DEFINE_BATCH_CLASS_ID |
- |
struct Geometry { |
+ GrColor fColor; |
SkMatrix fViewMatrix; |
- SkRect fDevBounds; |
SkScalar fXRadius; |
SkScalar fYRadius; |
SkScalar fInnerXRadius; |
SkScalar fInnerYRadius; |
- GrColor fColor; |
bool fStroke; |
+ SkRect fDevBounds; |
}; |
static GrDrawBatch* Create(const Geometry& geometry) { |
@@ -1763,7 +1749,8 @@ |
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; } |
- RRectEllipseRendererBatch(const Geometry& geometry) : INHERITED(ClassID()) { |
+ RRectEllipseRendererBatch(const Geometry& geometry) { |
+ this->initClassID<RRectEllipseRendererBatch>(); |
fGeoData.push_back(geometry); |
this->setBounds(geometry.fDevBounds); |
@@ -1811,8 +1798,6 @@ |
BatchTracker fBatch; |
SkSTArray<1, Geometry, true> fGeoData; |
- |
- typedef GrVertexBatch INHERITED; |
}; |
static GrDrawBatch* create_rrect_batch(GrColor color, |