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

Unified Diff: src/gpu/batches/GrClearBatch.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/GrBatch.cpp ('k') | src/gpu/batches/GrCopySurfaceBatch.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrClearBatch.h
diff --git a/src/gpu/batches/GrClearBatch.h b/src/gpu/batches/GrClearBatch.h
index f13b073d754b1762781e7b7b91f4314fa9711af5..b973dab5579e5c5c096044b4416f1e66afe95f61 100644
--- a/src/gpu/batches/GrClearBatch.h
+++ b/src/gpu/batches/GrClearBatch.h
@@ -15,11 +15,13 @@
class GrClearBatch final : public GrBatch {
public:
+ DEFINE_BATCH_CLASS_ID
+
GrClearBatch(const SkIRect& rect, GrColor color, GrRenderTarget* rt)
- : fRect(rect)
+ : INHERITED(ClassID())
+ , fRect(rect)
, fColor(color)
, fRenderTarget(rt) {
- this->initClassID<GrClearBatch>();
fBounds = SkRect::Make(rect);
}
@@ -50,15 +52,19 @@ private:
SkIRect fRect;
GrColor fColor;
GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
+
+ typedef GrBatch INHERITED;
};
class GrClearStencilClipBatch final : public GrBatch {
public:
+ DEFINE_BATCH_CLASS_ID
+
GrClearStencilClipBatch(const SkIRect& rect, bool insideClip, GrRenderTarget* rt)
- : fRect(rect)
+ : INHERITED(ClassID())
+ , fRect(rect)
, fInsideClip(insideClip)
, fRenderTarget(rt) {
- this->initClassID<GrClearStencilClipBatch>();
fBounds = SkRect::Make(rect);
}
@@ -86,6 +92,8 @@ private:
SkIRect fRect;
bool fInsideClip;
GrPendingIOResource<GrRenderTarget, kWrite_GrIOType> fRenderTarget;
+
+ typedef GrBatch INHERITED;
};
#endif
« no previous file with comments | « src/gpu/batches/GrBatch.cpp ('k') | src/gpu/batches/GrCopySurfaceBatch.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698