| 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 16 matching lines...) Expand all Loading... |
| 27 /* | 27 /* |
| 28 * To allow this to be forward-declared, it must be its own typename, rather | 28 * To allow this to be forward-declared, it must be its own typename, rather |
| 29 * than a nested struct inside SkScalerContext (where it started). | 29 * than a nested struct inside SkScalerContext (where it started). |
| 30 */ | 30 */ |
| 31 struct SkScalerContextRec { | 31 struct SkScalerContextRec { |
| 32 uint32_t fOrigFontID; | 32 uint32_t fOrigFontID; |
| 33 uint32_t fFontID; | 33 uint32_t fFontID; |
| 34 SkScalar fTextSize, fPreScaleX, fPreSkewX; | 34 SkScalar fTextSize, fPreScaleX, fPreSkewX; |
| 35 SkScalar fPost2x2[2][2]; | 35 SkScalar fPost2x2[2][2]; |
| 36 SkScalar fFrameWidth, fMiterLimit; | 36 SkScalar fFrameWidth, fMiterLimit; |
| 37 #ifdef SK_SUPPORT_HINTING_SCALE_FACTOR | |
| 38 SkScalar fHintingScaleFactor; | |
| 39 #endif | |
| 40 | 37 |
| 41 //These describe the parameters to create (uniquely identify) the pre-blend. | 38 //These describe the parameters to create (uniquely identify) the pre-blend. |
| 42 uint32_t fLumBits; | 39 uint32_t fLumBits; |
| 43 uint8_t fDeviceGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB | 40 uint8_t fDeviceGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB |
| 44 uint8_t fPaintGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB | 41 uint8_t fPaintGamma; //2.6, (0.0, 4.0) gamma, 0.0 for sRGB |
| 45 uint8_t fContrast; //0.8+1, [0.0, 1.0] artificial contrast | 42 uint8_t fContrast; //0.8+1, [0.0, 1.0] artificial contrast |
| 46 uint8_t fReservedAlign; | 43 uint8_t fReservedAlign; |
| 47 | 44 |
| 48 SkScalar getDeviceGamma() const { | 45 SkScalar getDeviceGamma() const { |
| 49 return SkIntToScalar(fDeviceGamma) / (1 << 6); | 46 return SkIntToScalar(fDeviceGamma) / (1 << 6); |
| (...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 return static_cast<SkPaint::Hinting>(hint); | 296 return static_cast<SkPaint::Hinting>(hint); |
| 300 } | 297 } |
| 301 | 298 |
| 302 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 299 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
| 303 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 300 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
| 304 (hinting << SkScalerContext::kHinting_Shift); | 301 (hinting << SkScalerContext::kHinting_Shift); |
| 305 } | 302 } |
| 306 | 303 |
| 307 | 304 |
| 308 #endif | 305 #endif |
| OLD | NEW |