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

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

Issue 1352813003: add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweaks 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/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrAAStrokeRectBatch.h
diff --git a/src/gpu/batches/GrAAStrokeRectBatch.h b/src/gpu/batches/GrAAStrokeRectBatch.h
index ae7534823b421c2c19baa36b1fa8847995a3ebb4..fad5bd9d8df8293fe8465a4207a7ccb39ad787d8 100644
--- a/src/gpu/batches/GrAAStrokeRectBatch.h
+++ b/src/gpu/batches/GrAAStrokeRectBatch.h
@@ -18,6 +18,8 @@ class GrResourceProvider;
class GrAAStrokeRectBatch : public GrVertexBatch {
public:
+ DEFINE_BATCH_CLASS_ID
+
// TODO support AA rotated stroke rects by copying around view matrices
struct Geometry {
GrColor fColor;
@@ -48,8 +50,8 @@ private:
void onPrepareDraws(Target*) override;
void initBatchTracker(const GrPipelineOptimizations&) override;
- GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix) {
- this->initClassID<GrAAStrokeRectBatch>();
+ GrAAStrokeRectBatch(const Geometry& geometry, const SkMatrix& viewMatrix)
+ : INHERITED(ClassID()) {
fBatch.fViewMatrix = viewMatrix;
fGeoData.push_back(geometry);
@@ -105,6 +107,8 @@ private:
BatchTracker fBatch;
SkSTArray<1, Geometry, true> fGeoData;
+
+ typedef GrVertexBatch INHERITED;
};
« no previous file with comments | « src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp ('k') | src/gpu/batches/GrBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698