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

Unified Diff: src/gpu/GrAtlasTextBlob.h

Issue 1257253005: Move strike to subrun in GrAtlasTextContext (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: tweak Created 5 years, 5 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 | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/gpu/GrAtlasTextBlob.h
diff --git a/src/gpu/GrAtlasTextBlob.h b/src/gpu/GrAtlasTextBlob.h
index 502177d0d23247f4cc7fe18810d8fe210e7b0506..63f9185d97392e6e0fe0c879ce24fdf0e22066ed 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(SkSafeRef(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;
« no previous file with comments | « no previous file | src/gpu/GrAtlasTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698