Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(73)

Side by Side Diff: trunk/src/core/SkScalerContext.h

Issue 12706010: Add SkTypeface* parameter to SkScalerContext (and its callers) (Closed) Base URL: http://skia.googlecode.com/svn/
Patch Set: Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « trunk/src/core/SkPaint.cpp ('k') | trunk/src/core/SkScalerContext.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « trunk/src/core/SkPaint.cpp ('k') | trunk/src/core/SkScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698