Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2006 The Android Open Source Project | 2 * Copyright 2006 The Android Open Source Project |
| 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 SkGlyph_DEFINED | 8 #ifndef SkGlyph_DEFINED |
| 9 #define SkGlyph_DEFINED | 9 #define SkGlyph_DEFINED |
| 10 | 10 |
| (...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 121 return glyph.fID; | 121 return glyph.fID; |
| 122 } | 122 } |
| 123 static uint32_t Hash(uint32_t glyphId) { | 123 static uint32_t Hash(uint32_t glyphId) { |
| 124 return SkChecksum::CheapMix(glyphId); | 124 return SkChecksum::CheapMix(glyphId); |
| 125 } | 125 } |
| 126 }; | 126 }; |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 // TODO(herb) remove friend statement after SkGlyphCache cleanup. | 129 // TODO(herb) remove friend statement after SkGlyphCache cleanup. |
| 130 friend class SkGlyphCache; | 130 friend class SkGlyphCache; |
| 131 friend class SkRandomScalerContext; // For getting the id of the glyph | |
|
bungeman-skia
2015/07/24 18:31:18
Can't just call getGlyphID() ?
| |
| 131 | 132 |
| 132 void initCommon(uint32_t id) { | 133 void initCommon(uint32_t id) { |
| 133 fID = id; | 134 fID = id; |
| 134 fImage = NULL; | 135 fImage = NULL; |
| 135 fPath = NULL; | 136 fPath = NULL; |
| 136 fMaskFormat = MASK_FORMAT_UNKNOWN; | 137 fMaskFormat = MASK_FORMAT_UNKNOWN; |
| 137 fForceBW = 0; | 138 fForceBW = 0; |
| 138 } | 139 } |
| 139 | 140 |
| 140 static unsigned ID2Code(uint32_t id) { | 141 static unsigned ID2Code(uint32_t id) { |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 177 | 178 |
| 178 // FIXME - This is needed because the Android frame work directly | 179 // FIXME - This is needed because the Android frame work directly |
| 179 // accesses fID. Remove when fID accesses are cleaned up. | 180 // accesses fID. Remove when fID accesses are cleaned up. |
| 180 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 181 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 181 public: | 182 public: |
| 182 #endif | 183 #endif |
| 183 uint32_t fID; | 184 uint32_t fID; |
| 184 }; | 185 }; |
| 185 | 186 |
| 186 #endif | 187 #endif |
| OLD | NEW |