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