From eb44d53cf96a7eaf103a98d76079ce1f5495e343 Mon Sep 17 00:00:00 2001 From: joshualitt Date: Thu, 17 Sep 2015 11:50:57 -0700 Subject: add a ClassID function to GrBatch BUG=skia: Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9 Review URL: https://codereview.chromium.org/1352813003 --- src/gpu/batches/GrCopySurfaceBatch.h | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/gpu/batches/GrCopySurfaceBatch.h') diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h index 584bbab5d7..ed5e77f5b0 100644 --- a/src/gpu/batches/GrCopySurfaceBatch.h +++ b/src/gpu/batches/GrCopySurfaceBatch.h @@ -15,6 +15,8 @@ class GrCopySurfaceBatch final : public GrBatch { public: + DEFINE_BATCH_CLASS_ID + static GrBatch* Create(GrSurface* dst, GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint); @@ -37,11 +39,11 @@ public: private: GrCopySurfaceBatch(GrSurface* dst, GrSurface* src, const SkIRect& srcRect, const SkIPoint& dstPoint) - : fDst(dst) + : INHERITED(ClassID()) + , fDst(dst) , fSrc(src) , fSrcRect(srcRect) , fDstPoint(dstPoint) { - this->initClassID(); fBounds = SkRect::MakeXYWH(SkIntToScalar(dstPoint.fX), SkIntToScalar(dstPoint.fY), SkIntToScalar(srcRect.width()), SkIntToScalar(srcRect.height())); } @@ -58,6 +60,8 @@ private: GrPendingIOResource fSrc; SkIRect fSrcRect; SkIPoint fDstPoint; + + typedef GrBatch INHERITED; }; #endif -- cgit v1.2.3