| 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 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 101 #ifdef SK_DEBUG | 101 #ifdef SK_DEBUG |
| 102 void validate() const; | 102 void validate() const; |
| 103 #else | 103 #else |
| 104 void validate() const {} | 104 void validate() const {} |
| 105 #endif | 105 #endif |
| 106 | 106 |
| 107 #ifdef SK_DEVELOPER | 107 #ifdef SK_DEVELOPER |
| 108 void dump() const; | 108 void dump() const; |
| 109 #endif | 109 #endif |
| 110 | 110 |
| 111 enum AtlasType { |
| 112 kA8_AtlasType, //!< 1-byte per pixel |
| 113 k565_AtlasType, //!< 2-bytes per pixel |
| 114 k8888_AtlasType, //!< 4-bytes per pixel |
| 115 |
| 116 kLast_AtlasType = k8888_AtlasType |
| 117 }; |
| 118 static const int kAtlasCount = kLast_AtlasType + 1; |
| 119 |
| 111 private: | 120 private: |
| 112 friend class GrFontPurgeListener; | 121 friend class GrFontPurgeListener; |
| 113 | 122 |
| 114 class Key; | 123 class Key; |
| 115 GrTHashTable<GrTextStrike, Key, 8> fCache; | 124 GrTHashTable<GrTextStrike, Key, 8> fCache; |
| 116 // for LRU | 125 // for LRU |
| 117 GrTextStrike* fHead; | 126 GrTextStrike* fHead; |
| 118 GrTextStrike* fTail; | 127 GrTextStrike* fTail; |
| 119 | 128 |
| 120 GrGpu* fGpu; | 129 GrGpu* fGpu; |
| 121 GrAtlasMgr* fAtlasMgr[kMaskFormatCount]; | 130 GrAtlasMgr* fAtlasMgr[kAtlasCount]; |
| 122 | 131 |
| 123 GrTextStrike* generateStrike(GrFontScaler*, const Key&); | 132 GrTextStrike* generateStrike(GrFontScaler*, const Key&); |
| 124 inline void detachStrikeFromList(GrTextStrike*); | 133 inline void detachStrikeFromList(GrTextStrike*); |
| 125 void purgeStrike(GrTextStrike* strike); | 134 void purgeStrike(GrTextStrike* strike); |
| 126 }; | 135 }; |
| 127 | 136 |
| 128 #endif | 137 #endif |
| OLD | NEW |