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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 // This function must be public for SkTypeface_android.h, but should not be | 191 // This function must be public for SkTypeface_android.h, but should not be |
192 // called by other callers | 192 // called by other callers |
193 SkFontID findTypefaceIdForChar(SkUnichar uni); | 193 SkFontID findTypefaceIdForChar(SkUnichar uni); |
194 #endif | 194 #endif |
195 | 195 |
196 static inline void MakeRec(const SkPaint&, const SkDeviceProperties* deviceP
roperties, | 196 static inline void MakeRec(const SkPaint&, const SkDeviceProperties* deviceP
roperties, |
197 const SkMatrix*, Rec* rec); | 197 const SkMatrix*, Rec* rec); |
198 static inline void PostMakeRec(const SkPaint&, Rec*); | 198 static inline void PostMakeRec(const SkPaint&, Rec*); |
199 | 199 |
200 static SkScalerContext* Create(const SkDescriptor*); | |
201 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); | 200 static SkMaskGamma::PreBlend GetMaskPreBlend(const Rec& rec); |
202 | 201 |
203 protected: | 202 protected: |
204 Rec fRec; | 203 Rec fRec; |
205 unsigned fBaseGlyphCount; | 204 unsigned fBaseGlyphCount; |
206 | 205 |
207 virtual unsigned generateGlyphCount() = 0; | 206 virtual unsigned generateGlyphCount() = 0; |
208 virtual uint16_t generateCharToGlyph(SkUnichar) = 0; | 207 virtual uint16_t generateCharToGlyph(SkUnichar) = 0; |
209 virtual void generateAdvance(SkGlyph*) = 0; | 208 virtual void generateAdvance(SkGlyph*) = 0; |
210 virtual void generateMetrics(SkGlyph*) = 0; | 209 virtual void generateMetrics(SkGlyph*) = 0; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
283 return static_cast<SkPaint::Hinting>(hint); | 282 return static_cast<SkPaint::Hinting>(hint); |
284 } | 283 } |
285 | 284 |
286 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { | 285 void SkScalerContextRec::setHinting(SkPaint::Hinting hinting) { |
287 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | | 286 fFlags = (fFlags & ~SkScalerContext::kHinting_Mask) | |
288 (hinting << SkScalerContext::kHinting_Shift); | 287 (hinting << SkScalerContext::kHinting_Shift); |
289 } | 288 } |
290 | 289 |
291 | 290 |
292 #endif | 291 #endif |
OLD | NEW |