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

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

Issue 1344373005: Reland of add a ClassID function to GrBatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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/GrClearBatch.h ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/batches/GrCopySurfaceBatch.h
diff --git a/src/gpu/batches/GrCopySurfaceBatch.h b/src/gpu/batches/GrCopySurfaceBatch.h
index 584bbab5d7b805d656b68f992db30b2ae54da13f..ed5e77f5b061d9bce393c3a30f4f2f3eeffe410a 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 @@
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<GrCopySurfaceBatch>();
fBounds = SkRect::MakeXYWH(SkIntToScalar(dstPoint.fX), SkIntToScalar(dstPoint.fY),
SkIntToScalar(srcRect.width()), SkIntToScalar(srcRect.height()));
}
@@ -58,6 +60,8 @@
GrPendingIOResource<GrSurface, kRead_GrIOType> fSrc;
SkIRect fSrcRect;
SkIPoint fDstPoint;
+
+ typedef GrBatch INHERITED;
};
#endif
« no previous file with comments | « src/gpu/batches/GrClearBatch.h ('k') | src/gpu/batches/GrDefaultPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698