diff options
author | 2015-09-17 20:16:13 -0700 | |
---|---|---|
committer | 2015-09-17 20:16:13 -0700 | |
commit | 1b55a963a2374a14bb82eb887bb99ee91680f0eb (patch) | |
tree | a15774af26154d677a16d718ba52d7a401bfa868 /src/gpu/batches/GrAAConvexPathRenderer.cpp | |
parent | 48e3a45ade15c52c0c1a10cb00907dd444897745 (diff) |
Reland of add a ClassID function to GrBatch (patchset #1 id:1 of https://codereview.chromium.org/1353043002/ )
Reason for revert:
DEPS roll seems to have landed w/o this revert, so revert it again
Original issue's description:
> Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ )
>
> Reason for revert:
> Speculative revert to unblock DEPS roll
>
> Original issue's description:
> > add a ClassID function to GrBatch
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9
> >
> > Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343
>
> TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/48e3a45ade15c52c0c1a10cb00907dd444897745
TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1344373005
Diffstat (limited to 'src/gpu/batches/GrAAConvexPathRenderer.cpp')
-rw-r--r-- | src/gpu/batches/GrAAConvexPathRenderer.cpp | 7 |
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) { |