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 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 return fCache.getArray()[index]; | 91 return fCache.getArray()[index]; |
92 } | 92 } |
93 GrTextStrike* getHeadStrike() const { return fHead; } | 93 GrTextStrike* getHeadStrike() const { return fHead; } |
94 | 94 |
95 #ifdef SK_DEBUG | 95 #ifdef SK_DEBUG |
96 void validate() const; | 96 void validate() const; |
97 #else | 97 #else |
98 void validate() const {} | 98 void validate() const {} |
99 #endif | 99 #endif |
100 | 100 |
| 101 void dump() const; |
| 102 |
101 private: | 103 private: |
102 friend class GrFontPurgeListener; | 104 friend class GrFontPurgeListener; |
103 | 105 |
104 class Key; | 106 class Key; |
105 GrTHashTable<GrTextStrike, Key, 8> fCache; | 107 GrTHashTable<GrTextStrike, Key, 8> fCache; |
106 // for LRU | 108 // for LRU |
107 GrTextStrike* fHead; | 109 GrTextStrike* fHead; |
108 GrTextStrike* fTail; | 110 GrTextStrike* fTail; |
109 | 111 |
110 GrGpu* fGpu; | 112 GrGpu* fGpu; |
111 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; | 113 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; |
112 | 114 |
113 GrTextStrike* generateStrike(GrFontScaler*, const Key&); | 115 GrTextStrike* generateStrike(GrFontScaler*, const Key&); |
114 inline void detachStrikeFromList(GrTextStrike*); | 116 inline void detachStrikeFromList(GrTextStrike*); |
115 }; | 117 }; |
116 | 118 |
117 #endif | 119 #endif |
OLD | NEW |