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 #ifdef SK_DEVELOPER |
| 102 void dump() const; |
| 103 #endif |
| 104 |
101 private: | 105 private: |
102 friend class GrFontPurgeListener; | 106 friend class GrFontPurgeListener; |
103 | 107 |
104 class Key; | 108 class Key; |
105 GrTHashTable<GrTextStrike, Key, 8> fCache; | 109 GrTHashTable<GrTextStrike, Key, 8> fCache; |
106 // for LRU | 110 // for LRU |
107 GrTextStrike* fHead; | 111 GrTextStrike* fHead; |
108 GrTextStrike* fTail; | 112 GrTextStrike* fTail; |
109 | 113 |
110 GrGpu* fGpu; | 114 GrGpu* fGpu; |
111 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; | 115 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; |
112 | 116 |
113 GrTextStrike* generateStrike(GrFontScaler*, const Key&); | 117 GrTextStrike* generateStrike(GrFontScaler*, const Key&); |
114 inline void detachStrikeFromList(GrTextStrike*); | 118 inline void detachStrikeFromList(GrTextStrike*); |
115 }; | 119 }; |
116 | 120 |
117 #endif | 121 #endif |
OLD | NEW |