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 SkScalerContext_DEFINED | 8 #ifndef SkScalerContext_DEFINED |
9 #define SkScalerContext_DEFINED | 9 #define SkScalerContext_DEFINED |
10 | 10 |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
120 kForceAutohinting_Flag = 0x0020, // Use auto instead of bytcode hint
ing if hinting. | 120 kForceAutohinting_Flag = 0x0020, // Use auto instead of bytcode hint
ing if hinting. |
121 kVertical_Flag = 0x0040, | 121 kVertical_Flag = 0x0040, |
122 | 122 |
123 // together, these two flags resulting in a two bit value which matches | 123 // together, these two flags resulting in a two bit value which matches |
124 // up with the SkPaint::Hinting enum. | 124 // up with the SkPaint::Hinting enum. |
125 kHinting_Shift = 7, // to shift into the other flags above | 125 kHinting_Shift = 7, // to shift into the other flags above |
126 kHintingBit1_Flag = 0x0080, | 126 kHintingBit1_Flag = 0x0080, |
127 kHintingBit2_Flag = 0x0100, | 127 kHintingBit2_Flag = 0x0100, |
128 | 128 |
129 // Pixel geometry information. | 129 // Pixel geometry information. |
130 // only meaningful if fMaskFormat is LCD16 or LCD32 | 130 // only meaningful if fMaskFormat is kLCD16 |
131 kLCD_Vertical_Flag = 0x0200, // else Horizontal | 131 kLCD_Vertical_Flag = 0x0200, // else Horizontal |
132 kLCD_BGROrder_Flag = 0x0400, // else RGB order | 132 kLCD_BGROrder_Flag = 0x0400, // else RGB order |
133 | 133 |
134 // Generate A8 from LCD source (for GDI and CoreGraphics). | 134 // Generate A8 from LCD source (for GDI and CoreGraphics). |
135 // only meaningful if fMaskFormat is kA8 | 135 // only meaningful if fMaskFormat is kA8 |
136 kGenA8FromLCD_Flag = 0x0800, // could be 0x200 (bit meaning depen
dent on fMaskFormat) | 136 kGenA8FromLCD_Flag = 0x0800, // could be 0x200 (bit meaning depen
dent on fMaskFormat) |
137 }; | 137 }; |
138 | 138 |
139 // computed values | 139 // computed values |
140 enum { | 140 enum { |
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 return static_cast<SkPaint::Hinting>(hint); | 313 return static_cast<SkPaint::Hinting>(hint); |
314 } | 314 } |
315 | 315 |
316 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 316 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
317 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 317 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
318 (hinting << SkScalerContext::kHinting_Shift); | 318 (hinting << SkScalerContext::kHinting_Shift); |
319 } | 319 } |
320 | 320 |
321 | 321 |
322 #endif | 322 #endif |
OLD | NEW |