| 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 29 matching lines...) Expand all Loading... |
| 40 void* fImage; | 40 void* fImage; |
| 41 SkPath* fPath; | 41 SkPath* fPath; |
| 42 SkFixed fAdvanceX, fAdvanceY; | 42 SkFixed fAdvanceX, fAdvanceY; |
| 43 | 43 |
| 44 uint16_t fWidth, fHeight; | 44 uint16_t fWidth, fHeight; |
| 45 int16_t fTop, fLeft; | 45 int16_t fTop, fLeft; |
| 46 | 46 |
| 47 uint8_t fMaskFormat; | 47 uint8_t fMaskFormat; |
| 48 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning | 48 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning |
| 49 int8_t fForceBW; | 49 int8_t fForceBW; |
| 50 mutable bool fImageIsSet; |
| 51 mutable bool fPathIsSet; |
| 50 | 52 |
| 51 void initWithGlyphID(uint32_t glyph_id) { | 53 void initWithGlyphID(uint32_t glyph_id) { |
| 52 this->initCommon(MakeID(glyph_id)); | 54 this->initCommon(MakeID(glyph_id)); |
| 53 } | 55 } |
| 54 | 56 |
| 55 void initGlyphIdFrom(const SkGlyph& glyph) { | 57 void initGlyphIdFrom(const SkGlyph& glyph) { |
| 56 this->initCommon(glyph.fID); | 58 this->initCommon(glyph.fID); |
| 57 } | 59 } |
| 58 | 60 |
| 59 void initGlyphFromCombinedID(uint32_t combined_id) { | 61 void initGlyphFromCombinedID(uint32_t combined_id) { |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 private: | 130 private: |
| 129 // TODO(herb) remove friend statement after SkGlyphCache cleanup. | 131 // TODO(herb) remove friend statement after SkGlyphCache cleanup. |
| 130 friend class SkGlyphCache; | 132 friend class SkGlyphCache; |
| 131 | 133 |
| 132 void initCommon(uint32_t id) { | 134 void initCommon(uint32_t id) { |
| 133 fID = id; | 135 fID = id; |
| 134 fImage = nullptr; | 136 fImage = nullptr; |
| 135 fPath = nullptr; | 137 fPath = nullptr; |
| 136 fMaskFormat = MASK_FORMAT_UNKNOWN; | 138 fMaskFormat = MASK_FORMAT_UNKNOWN; |
| 137 fForceBW = 0; | 139 fForceBW = 0; |
| 140 fImageIsSet = false; |
| 141 fPathIsSet = false; |
| 138 } | 142 } |
| 139 | 143 |
| 140 static unsigned ID2Code(uint32_t id) { | 144 static unsigned ID2Code(uint32_t id) { |
| 141 return id & kCodeMask; | 145 return id & kCodeMask; |
| 142 } | 146 } |
| 143 | 147 |
| 144 static unsigned ID2SubX(uint32_t id) { | 148 static unsigned ID2SubX(uint32_t id) { |
| 145 return id >> (kSubShift + kSubShiftX); | 149 return id >> (kSubShift + kSubShiftX); |
| 146 } | 150 } |
| 147 | 151 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 177 | 181 |
| 178 // FIXME - This is needed because the Android frame work directly | 182 // FIXME - This is needed because the Android frame work directly |
| 179 // accesses fID. Remove when fID accesses are cleaned up. | 183 // accesses fID. Remove when fID accesses are cleaned up. |
| 180 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK | 184 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK |
| 181 public: | 185 public: |
| 182 #endif | 186 #endif |
| 183 uint32_t fID; | 187 uint32_t fID; |
| 184 }; | 188 }; |
| 185 | 189 |
| 186 #endif | 190 #endif |
| OLD | NEW |