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

Unified Diff: src/core/SkScalerContext.h

Issue 12699002: Upstream changes from Android. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: more fiex 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkScalerContext.h
diff --git a/src/core/SkScalerContext.h b/src/core/SkScalerContext.h
index 1ada0acfe4e57a2d79640c589b84ad33ddb72ffa..f2e00a691fecbed803ebba7feb7ef604ad37dd70 100644
--- a/src/core/SkScalerContext.h
+++ b/src/core/SkScalerContext.h
@@ -190,16 +190,7 @@ public:
// This function must be public for SkTypeface_android.h, but should not be
// called by other callers
- SkFontID findTypefaceIdForChar(SkUnichar uni) {
- SkScalerContext* ctx = this;
- while (NULL != ctx) {
- if (ctx->generateCharToGlyph(uni)) {
- return ctx->fRec.fFontID;
- }
- ctx = ctx->getNextContext();
- }
- return 0;
- }
+ SkFontID findTypefaceIdForChar(SkUnichar uni);
#endif
static inline void MakeRec(const SkPaint&, const SkDeviceProperties* deviceProperties,
@@ -245,6 +236,11 @@ private:
// is found, just returns the original context (this)
SkScalerContext* getGlyphContext(const SkGlyph& glyph);
+ // returns the right context from our link-list for this char. If no match
+ // is found it returns NULL. If a match is found then the glyphID param is
+ // set to the glyphID that maps to the provided char.
+ SkScalerContext* getContextFromChar(SkUnichar uni, uint16_t* glyphID);
+
// link-list of context, to handle missing chars. null-terminated.
SkScalerContext* fNextContext;
« no previous file with comments | « src/core/SkPath.cpp ('k') | src/core/SkScalerContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698