| 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 225 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 236 */ | 236 */ |
| 237 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal
ar deviceGamma, | 237 static void GetGammaLUTData(SkScalar contrast, SkScalar paintGamma, SkScal
ar deviceGamma, |
| 238 void* data); | 238 void* data); |
| 239 | 239 |
| 240 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti
es, | 240 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti
es, |
| 241 const SkMatrix*, Rec* rec); | 241 const SkMatrix*, Rec* rec); |
| 242 static inline void PostMakeRec(const SkPaint&, Rec*); | 242 static inline void PostMakeRec(const SkPaint&, Rec*); |
| 243 | 243 |
| 244 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); | 244 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); |
| 245 | 245 |
| 246 const Rec& getRec() const { return fRec; } |
| 247 |
| 246 protected: | 248 protected: |
| 247 Rec fRec; | 249 Rec fRec; |
| 248 | 250 |
| 249 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. | 251 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. |
| 250 * May call getMetrics if that would be just as fast. | 252 * May call getMetrics if that would be just as fast. |
| 251 */ | 253 */ |
| 252 virtual void generateAdvance(SkGlyph* glyph) = 0; | 254 virtual void generateAdvance(SkGlyph* glyph) = 0; |
| 253 | 255 |
| 254 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft, | 256 /** Generates the contents of glyph.fWidth, fHeight, fTop, fLeft, |
| 255 * as well as fAdvanceX and fAdvanceY if not already set. | 257 * as well as fAdvanceX and fAdvanceY if not already set. |
| (...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 357 return static_cast<SkPaint::Hinting>(hint); | 359 return static_cast<SkPaint::Hinting>(hint); |
| 358 } | 360 } |
| 359 | 361 |
| 360 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 362 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
| 361 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 363 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
| 362 (hinting << SkScalerContext::kHinting_Shift); | 364 (hinting << SkScalerContext::kHinting_Shift); |
| 363 } | 365 } |
| 364 | 366 |
| 365 | 367 |
| 366 #endif | 368 #endif |
| OLD | NEW |