OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 | 9 |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 class GrFontCache; | 22 class GrFontCache; |
23 class GrGpu; | 23 class GrGpu; |
24 class GrFontPurgeListener; | 24 class GrFontPurgeListener; |
25 | 25 |
26 /** | 26 /** |
27 * The textcache maps a hostfontscaler instance to a dictionary of | 27 * The textcache maps a hostfontscaler instance to a dictionary of |
28 * glyphid->strike | 28 * glyphid->strike |
29 */ | 29 */ |
30 class GrTextStrike { | 30 class GrTextStrike { |
31 public: | 31 public: |
32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, | 32 GrTextStrike(GrFontCache*, const GrKey* fontScalerKey, GrMaskFormat, GrAtlas
Mgr*); |
33 GrAtlasMgr*); | |
34 ~GrTextStrike(); | 33 ~GrTextStrike(); |
35 | 34 |
36 const GrKey* getFontScalerKey() const { return fFontScalerKey; } | 35 const GrKey* getFontScalerKey() const { return fFontScalerKey; } |
37 GrFontCache* getFontCache() const { return fFontCache; } | 36 GrFontCache* getFontCache() const { return fFontCache; } |
38 GrMaskFormat getMaskFormat() const { return fMaskFormat; } | 37 GrMaskFormat getMaskFormat() const { return fMaskFormat; } |
39 | 38 |
40 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); | 39 inline GrGlyph* getGlyph(GrGlyph::PackedID, GrFontScaler*); |
41 bool getGlyphAtlas(GrGlyph*, GrFontScaler*); | 40 bool getGlyphAtlas(GrGlyph*, GrFontScaler*); |
42 | 41 |
43 // testing | 42 // testing |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 GrTHashTable<GrTextStrike, Key, 8> fCache; | 108 GrTHashTable<GrTextStrike, Key, 8> fCache; |
110 // for LRU | 109 // for LRU |
111 GrTextStrike* fHead; | 110 GrTextStrike* fHead; |
112 GrTextStrike* fTail; | 111 GrTextStrike* fTail; |
113 | 112 |
114 GrGpu* fGpu; | 113 GrGpu* fGpu; |
115 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; | 114 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; |
116 | 115 |
117 GrTextStrike* generateStrike(GrFontScaler*, const Key&); | 116 GrTextStrike* generateStrike(GrFontScaler*, const Key&); |
118 inline void detachStrikeFromList(GrTextStrike*); | 117 inline void detachStrikeFromList(GrTextStrike*); |
| 118 void purgeStrike(GrTextStrike* strike); |
119 }; | 119 }; |
120 | 120 |
121 #endif | 121 #endif |
OLD | NEW |