| 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 11 matching lines...) Expand all Loading... |
| 22 | 22 |
| 23 struct SkGlyph { | 23 struct SkGlyph { |
| 24 void* fImage; | 24 void* fImage; |
| 25 SkPath* fPath; | 25 SkPath* fPath; |
| 26 SkFixed fAdvanceX, fAdvanceY; | 26 SkFixed fAdvanceX, fAdvanceY; |
| 27 | 27 |
| 28 uint32_t fID; | 28 uint32_t fID; |
| 29 uint16_t fWidth, fHeight; | 29 uint16_t fWidth, fHeight; |
| 30 int16_t fTop, fLeft; | 30 int16_t fTop, fLeft; |
| 31 | 31 |
| 32 void* fDistanceField; | |
| 33 uint8_t fMaskFormat; | 32 uint8_t fMaskFormat; |
| 34 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning | 33 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning |
| 35 int8_t fForceBW; | 34 int8_t fForceBW; |
| 36 | 35 |
| 37 void init(uint32_t id) { | 36 void init(uint32_t id) { |
| 38 fID = id; | 37 fID = id; |
| 39 fImage = NULL; | 38 fImage = NULL; |
| 40 fPath = NULL; | 39 fPath = NULL; |
| 41 fDistanceField = NULL; | |
| 42 fMaskFormat = MASK_FORMAT_UNKNOWN; | 40 fMaskFormat = MASK_FORMAT_UNKNOWN; |
| 43 fForceBW = 0; | 41 fForceBW = 0; |
| 44 } | 42 } |
| 45 | 43 |
| 46 /** | 44 /** |
| 47 * Compute the rowbytes for the specified width and mask-format. | 45 * Compute the rowbytes for the specified width and mask-format. |
| 48 */ | 46 */ |
| 49 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) { | 47 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) { |
| 50 unsigned rb = width; | 48 unsigned rb = width; |
| 51 if (SkMask::kBW_Format == format) { | 49 if (SkMask::kBW_Format == format) { |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 y = FixedToSub(y); | 135 y = FixedToSub(y); |
| 138 return (x << (kSubShift + kSubShiftX)) | | 136 return (x << (kSubShift + kSubShiftX)) | |
| 139 (y << (kSubShift + kSubShiftY)) | | 137 (y << (kSubShift + kSubShiftY)) | |
| 140 code; | 138 code; |
| 141 } | 139 } |
| 142 | 140 |
| 143 void toMask(SkMask* mask) const; | 141 void toMask(SkMask* mask) const; |
| 144 }; | 142 }; |
| 145 | 143 |
| 146 #endif | 144 #endif |
| OLD | NEW |