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

Unified Diff: src/gpu/GrAtlasTextContext.cpp

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 | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextContext.cpp
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp
index fa96a8dddabfc9e3ed2e2aec8f7e8f91bbe60920..822c480ef3fc44ee09aa104ccd50e57fd42b367c 100644
--- a/src/gpu/GrAtlasTextContext.cpp
+++ b/src/gpu/GrAtlasTextContext.cpp
@@ -1431,6 +1431,8 @@
class TextBatch : public GrVertexBatch {
public:
+ DEFINE_BATCH_CLASS_ID
+
typedef GrAtlasTextContext::DistanceAdjustTable DistanceAdjustTable;
typedef GrAtlasTextBlob Blob;
typedef Blob::Run Run;
@@ -1448,7 +1450,6 @@
GrBatchFontCache* fontCache) {
TextBatch* batch = new TextBatch;
- batch->initClassID<TextBatch>();
batch->fFontCache = fontCache;
switch (maskFormat) {
case kA8_GrMaskFormat:
@@ -1474,7 +1475,7 @@
SkColor filteredColor, bool isLCD,
bool useBGR) {
TextBatch* batch = new TextBatch;
- batch->initClassID<TextBatch>();
+
batch->fFontCache = fontCache;
batch->fMaskType = isLCD ? kLCDDistanceField_MaskType : kGrayscaleDistanceField_MaskType;
batch->fDistanceAdjustTable.reset(SkRef(distanceAdjustTable));
@@ -1783,7 +1784,7 @@
this->flush(target, &flushInfo);
}
- TextBatch() {} // initialized in factory functions.
+ TextBatch() : INHERITED(ClassID()) {} // initialized in factory functions.
~TextBatch() {
for (int i = 0; i < fGeoCount; i++) {
@@ -2044,6 +2045,8 @@
// Distance field properties
SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable;
SkColor fFilteredColor;
+
+ typedef GrVertexBatch INHERITED;
};
void GrAtlasTextContext::flushRunAsPaths(GrDrawContext* dc, GrRenderTarget* rt,
« no previous file with comments | « gm/convexpolyeffect.cpp ('k') | src/gpu/GrDrawTarget.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698