diff options
author | joshualitt <joshualitt@chromium.org> | 2015-07-31 13:58:27 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-07-31 13:58:27 -0700 |
commit | 77d89f7dd243a17452d3a5f16a98622993e6bdd9 (patch) | |
tree | 772eda0cef8683b2d1f0d32caebd612f2e98d728 /src/gpu/GrAtlasTextBlob.h | |
parent | 7568d0b15e9d66387533d397b5aaba60491e1624 (diff) |
Move strike to subrun in GrAtlasTextContext
BUG=skia:
Review URL: https://codereview.chromium.org/1257253005
Diffstat (limited to 'src/gpu/GrAtlasTextBlob.h')
-rw-r--r-- | src/gpu/GrAtlasTextBlob.h | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/src/gpu/GrAtlasTextBlob.h b/src/gpu/GrAtlasTextBlob.h index 502177d0d2..390f1bbc51 100644 --- a/src/gpu/GrAtlasTextBlob.h +++ b/src/gpu/GrAtlasTextBlob.h @@ -78,6 +78,19 @@ struct GrAtlasTextBlob : public SkRefCnt { , fGlyphStartIndex(0) , fGlyphEndIndex(0) , fDrawAsDistanceFields(false) {} + SubRunInfo(const SubRunInfo& that) + : fBulkUseToken(that.fBulkUseToken) + , fStrike(SkRef(that.fStrike.get())) + , fAtlasGeneration(that.fAtlasGeneration) + , fVertexStartIndex(that.fVertexStartIndex) + , fVertexEndIndex(that.fVertexEndIndex) + , fGlyphStartIndex(that.fGlyphStartIndex) + , fGlyphEndIndex(that.fGlyphEndIndex) + , fTextRatio(that.fTextRatio) + , fMaskFormat(that.fMaskFormat) + , fDrawAsDistanceFields(that.fDrawAsDistanceFields) + , fUseLCDText(that.fUseLCDText) { + } // Distance field text cannot draw coloremoji, and so has to fall back. However, // though the distance field text and the coloremoji may share the same run, they // will have different descriptors. If fOverrideDescriptor is non-NULL, then it @@ -86,6 +99,7 @@ struct GrAtlasTextBlob : public SkRefCnt { // significantly, and then the subrun could just have a refed pointer to the // correct descriptor. GrBatchAtlas::BulkUseTokenUpdater fBulkUseToken; + SkAutoTUnref<GrBatchTextStrike> fStrike; uint64_t fAtlasGeneration; size_t fVertexStartIndex; size_t fVertexEndIndex; @@ -110,7 +124,6 @@ struct GrAtlasTextBlob : public SkRefCnt { return newSubRun; } static const int kMinSubRuns = 1; - SkAutoTUnref<GrBatchTextStrike> fStrike; SkAutoTUnref<SkTypeface> fTypeface; SkRect fVertexBounds; SkSTArray<kMinSubRuns, SubRunInfo> fSubRunInfo; |