aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/batches/GrAAConvexPathRenderer.cpp
diff options
context:
space:
mode:
authorGravatar joshualitt <joshualitt@chromium.org>2015-09-17 11:21:17 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2015-09-17 11:21:17 -0700
commit4078d529e9e199eea13456db7bf3a63a104ab5b9 (patch)
tree5693fc5be9ef4dccb7917b13905d821963b48e4f /src/gpu/batches/GrAAConvexPathRenderer.cpp
parentef4ba3da0b1fe375b9631bcd17c43c645f4aa5a6 (diff)
add a ClassID function to GrBatch
Diffstat (limited to 'src/gpu/batches/GrAAConvexPathRenderer.cpp')
-rw-r--r--src/gpu/batches/GrAAConvexPathRenderer.cpp7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 75bf332790..543885e54f 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -733,6 +733,7 @@ static const GrGeometryProcessor* create_fill_gp(bool tweakAlphaForCoverage,
class AAConvexPathBatch : public GrVertexBatch {
public:
+ DEFINE_BATCH_CLASS_ID
struct Geometry {
GrColor fColor;
SkMatrix fViewMatrix;
@@ -752,7 +753,6 @@ public:
}
private:
-
void initBatchTracker(const GrPipelineOptimizations& opt) override {
// Handle any color overrides
if (!opt.readsColor()) {
@@ -921,8 +921,7 @@ private:
SkSTArray<1, Geometry, true>* geoData() { return &fGeoData; }
- AAConvexPathBatch(const Geometry& geometry) {
- this->initClassID<AAConvexPathBatch>();
+ AAConvexPathBatch(const Geometry& geometry) : INHERITED(ClassID()) {
fGeoData.push_back(geometry);
// compute bounds
@@ -979,6 +978,8 @@ private:
BatchTracker fBatch;
SkSTArray<1, Geometry, true> fGeoData;
+
+ typedef GrVertexBatch INHERITED;
};
bool GrAAConvexPathRenderer::onDrawPath(const DrawPathArgs& args) {