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 174 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 void getFontMetrics(SkPaint::FontMetrics*); | 185 void getFontMetrics(SkPaint::FontMetrics*); |
186 | 186 |
187 #ifdef SK_BUILD_FOR_ANDROID | 187 #ifdef SK_BUILD_FOR_ANDROID |
188 unsigned getBaseGlyphCount(SkUnichar charCode); | 188 unsigned getBaseGlyphCount(SkUnichar charCode); |
189 | 189 |
190 // This function must be public for SkTypeface_android.h, but should not be | 190 // This function must be public for SkTypeface_android.h, but should not be |
191 // called by other callers | 191 // called by other callers |
192 SkFontID findTypefaceIdForChar(SkUnichar uni); | 192 SkFontID findTypefaceIdForChar(SkUnichar uni); |
193 #endif | 193 #endif |
194 | 194 |
195 static inline void MakeRec(const SkPaint&, const SkDeviceProperties* deviceP
roperties, | 195 static void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperti
es, |
196 const SkMatrix*, Rec* rec); | 196 const SkMatrix*, Rec* rec); |
197 static inline void PostMakeRec(const SkPaint&, Rec*); | 197 static inline void PostMakeRec(const SkPaint&, Rec*); |
198 | 198 |
199 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); | 199 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); |
200 | 200 |
201 protected: | 201 protected: |
202 Rec fRec; | 202 Rec fRec; |
203 unsigned fBaseGlyphCount; | 203 unsigned fBaseGlyphCount; |
204 | 204 |
205 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. | 205 /** Generates the contents of glyph.fAdvanceX and glyph.fAdvanceY. |
206 * May call getMetrics if that would be just as fast. | 206 * May call getMetrics if that would be just as fast. |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
337 return static_cast<SkPaint::Hinting>(hint); | 337 return static_cast<SkPaint::Hinting>(hint); |
338 } | 338 } |
339 | 339 |
340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 340 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 341 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
342 (hinting << SkScalerContext::kHinting_Shift); | 342 (hinting << SkScalerContext::kHinting_Shift); |
343 } | 343 } |
344 | 344 |
345 | 345 |
346 #endif | 346 #endif |
OLD | NEW |