| 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 14 matching lines...) Expand all Loading... |
| 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; | 32 void* fDistanceField; |
| 33 uint8_t fMaskFormat; | 33 uint8_t fMaskFormat; |
| 34 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning | 34 int8_t fRsbDelta, fLsbDelta; // used by auto-kerning |
| 35 int8_t fForceBW; |
| 35 | 36 |
| 36 void init(uint32_t id) { | 37 void init(uint32_t id) { |
| 37 fID = id; | 38 fID = id; |
| 38 fImage = NULL; | 39 fImage = NULL; |
| 39 fPath = NULL; | 40 fPath = NULL; |
| 40 fDistanceField = NULL; | 41 fDistanceField = NULL; |
| 41 fMaskFormat = MASK_FORMAT_UNKNOWN; | 42 fMaskFormat = MASK_FORMAT_UNKNOWN; |
| 43 fForceBW = 0; |
| 42 } | 44 } |
| 43 | 45 |
| 44 /** | 46 /** |
| 45 * Compute the rowbytes for the specified width and mask-format. | 47 * Compute the rowbytes for the specified width and mask-format. |
| 46 */ | 48 */ |
| 47 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) { | 49 static unsigned ComputeRowBytes(unsigned width, SkMask::Format format) { |
| 48 unsigned rb = width; | 50 unsigned rb = width; |
| 49 if (SkMask::kBW_Format == format) { | 51 if (SkMask::kBW_Format == format) { |
| 50 rb = (rb + 7) >> 3; | 52 rb = (rb + 7) >> 3; |
| 51 } else if (SkMask::kARGB32_Format == format || | 53 } else if (SkMask::kARGB32_Format == format || |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 137 y = FixedToSub(y); | 139 y = FixedToSub(y); |
| 138 return (x << (kSubShift + kSubShiftX)) | | 140 return (x << (kSubShift + kSubShiftX)) | |
| 139 (y << (kSubShift + kSubShiftY)) | | 141 (y << (kSubShift + kSubShiftY)) | |
| 140 code; | 142 code; |
| 141 } | 143 } |
| 142 | 144 |
| 143 void toMask(SkMask* mask) const; | 145 void toMask(SkMask* mask) const; |
| 144 }; | 146 }; |
| 145 | 147 |
| 146 #endif | 148 #endif |
| OLD | NEW |