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

Side by Side Diff: src/gpu/text/GrStencilAndCoverTextContext.h

Issue 2335493005: Use sk_sp text blob APIs (Closed)
Patch Set: SK_SUPPORT_LEGACY_TEXTBLOB_BUILDER Created 4 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 unified diff | Download patch
« no previous file with comments | « src/core/SkTextBlob.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #ifndef GrStencilAndCoverTextContext_DEFINED 8 #ifndef GrStencilAndCoverTextContext_DEFINED
9 #define GrStencilAndCoverTextContext_DEFINED 9 #define GrStencilAndCoverTextContext_DEFINED
10 10
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 90
91 bool isAntiAlias() const { return fFont.isAntiAlias(); } 91 bool isAntiAlias() const { return fFont.isAntiAlias(); }
92 92
93 private: 93 private:
94 typedef GrDrawPathRangeBatch::InstanceData InstanceData; 94 typedef GrDrawPathRangeBatch::InstanceData InstanceData;
95 95
96 SkGlyphCache* getGlyphCache() const; 96 SkGlyphCache* getGlyphCache() const;
97 GrPathRange* createGlyphs(GrContext*) const; 97 GrPathRange* createGlyphs(GrContext*) const;
98 void appendGlyph(const SkGlyph&, const SkPoint&, FallbackBlobBuilder*); 98 void appendGlyph(const SkGlyph&, const SkPoint&, FallbackBlobBuilder*);
99 99
100 GrStyle fStyle; 100 GrStyle fStyle;
101 SkPaint fFont; 101 SkPaint fFont;
102 SkScalar fTextRatio; 102 SkScalar fTextRatio;
103 float fTextInverseRatio; 103 float fTextInverseRatio;
104 bool fUsingRawGlyphPaths; 104 bool fUsingRawGlyphPaths;
105 GrUniqueKey fGlyphPathsKey; 105 GrUniqueKey fGlyphPathsKey;
106 int fTotalGlyphCount; 106 int fTotalGlyphCount;
107 SkAutoTUnref<InstanceData> fInstanceData; 107 SkAutoTUnref<InstanceData> fInstanceData;
108 int fFallbackGlyphCount; 108 int fFallbackGlyphCount;
109 SkAutoTUnref<const SkTextBlob> fFallbackTextBlob; 109 sk_sp<SkTextBlob> fFallbackTextBlob;
110 mutable SkGlyphCache* fDetachedGlyphCache; 110 mutable SkGlyphCache* fDetachedGlyphCache;
111 mutable uint32_t fLastDrawnGlyphsID; 111 mutable uint32_t fLastDrawnGlyphsID;
112 }; 112 };
113 113
114 // Text blobs/caches. 114 // Text blobs/caches.
115 115
116 class TextBlob : public SkTLList<TextRun, 1> { 116 class TextBlob : public SkTLList<TextRun, 1> {
117 public: 117 public:
118 typedef SkTArray<uint32_t, true> Key; 118 typedef SkTArray<uint32_t, true> Key;
119 119
120 static const Key& GetKey(const TextBlob* blob) { return blob->key(); } 120 static const Key& GetKey(const TextBlob* blob) { return blob->key(); }
121 121
(...skipping 29 matching lines...) Expand all
151 void purgeToFit(const TextBlob&); 151 void purgeToFit(const TextBlob&);
152 152
153 GrAtlasTextContext* fFallbackTextConte xt; 153 GrAtlasTextContext* fFallbackTextConte xt;
154 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache; 154 SkTHashMap<uint32_t, TextBlob*> fBlobIdCache;
155 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache; 155 SkTHashTable<TextBlob*, const TextBlob::Key&, TextBlob> fBlobKeyCache;
156 SkTInternalLList<TextBlob> fLRUList; 156 SkTInternalLList<TextBlob> fLRUList;
157 size_t fCacheSize; 157 size_t fCacheSize;
158 }; 158 };
159 159
160 #endif 160 #endif
OLDNEW
« no previous file with comments | « src/core/SkTextBlob.cpp ('k') | src/gpu/text/GrStencilAndCoverTextContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698