diff options
author | 2015-09-17 20:16:13 -0700 | |
---|---|---|
committer | 2015-09-17 20:16:13 -0700 | |
commit | 1b55a963a2374a14bb82eb887bb99ee91680f0eb (patch) | |
tree | a15774af26154d677a16d718ba52d7a401bfa868 /src/gpu/GrAtlasTextContext.cpp | |
parent | 48e3a45ade15c52c0c1a10cb00907dd444897745 (diff) |
Reland of add a ClassID function to GrBatch (patchset #1 id:1 of https://codereview.chromium.org/1353043002/ )
Reason for revert:
DEPS roll seems to have landed w/o this revert, so revert it again
Original issue's description:
> Revert of add a ClassID function to GrBatch (patchset #5 id:80001 of https://codereview.chromium.org/1352813003/ )
>
> Reason for revert:
> Speculative revert to unblock DEPS roll
>
> Original issue's description:
> > add a ClassID function to GrBatch
> >
> > BUG=skia:
> >
> > Committed: https://skia.googlesource.com/skia/+/4078d529e9e199eea13456db7bf3a63a104ab5b9
> >
> > Committed: https://skia.googlesource.com/skia/+/eb44d53cf96a7eaf103a98d76079ce1f5495e343
>
> TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org
> NOPRESUBMIT=true
> NOTREECHECKS=true
> NOTRY=true
> BUG=skia:
>
> Committed: https://skia.googlesource.com/skia/+/48e3a45ade15c52c0c1a10cb00907dd444897745
TBR=robertphillips@google.com,bsalomon@google.com,joshualitt@google.com,joshualitt@chromium.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
BUG=skia:
Review URL: https://codereview.chromium.org/1344373005
Diffstat (limited to 'src/gpu/GrAtlasTextContext.cpp')
-rw-r--r-- | src/gpu/GrAtlasTextContext.cpp | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/gpu/GrAtlasTextContext.cpp b/src/gpu/GrAtlasTextContext.cpp index fa96a8ddda..822c480ef3 100644 --- a/src/gpu/GrAtlasTextContext.cpp +++ b/src/gpu/GrAtlasTextContext.cpp @@ -1431,6 +1431,8 @@ inline void GrAtlasTextContext::appendGlyphCommon(GrAtlasTextBlob* blob, Run* ru class TextBatch : public GrVertexBatch { public: + DEFINE_BATCH_CLASS_ID + typedef GrAtlasTextContext::DistanceAdjustTable DistanceAdjustTable; typedef GrAtlasTextBlob Blob; typedef Blob::Run Run; @@ -1448,7 +1450,6 @@ public: GrBatchFontCache* fontCache) { TextBatch* batch = new TextBatch; - batch->initClassID<TextBatch>(); batch->fFontCache = fontCache; switch (maskFormat) { case kA8_GrMaskFormat: @@ -1474,7 +1475,7 @@ public: 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 @@ private: 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 @@ private: // Distance field properties SkAutoTUnref<const DistanceAdjustTable> fDistanceAdjustTable; SkColor fFilteredColor; + + typedef GrVertexBatch INHERITED; }; void GrAtlasTextContext::flushRunAsPaths(GrDrawContext* dc, GrRenderTarget* rt, |