Index: src/ports/SkFontHost_android.cpp |
diff --git a/src/ports/SkFontHost_android.cpp b/src/ports/SkFontHost_android.cpp |
index ce478def6bad336527ae30321f8201f59dd428c9..c6555da5638909d8ae1ecc7bc5af4e7d7cc46692 100644 |
--- a/src/ports/SkFontHost_android.cpp |
+++ b/src/ports/SkFontHost_android.cpp |
@@ -801,21 +801,20 @@ SkTypeface* SkFontHost::CreateTypeface(const SkTypeface* familyFace, |
return tf; |
} |
-SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, |
- SkFontID origFontID) { |
-#if defined(SK_BUILD_FOR_ANDROID) && !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) |
+SkTypeface* SkAndroidNextLogicalTypeface(const SkScalerContextRec& rec) { |
+#if !defined(SK_BUILD_FOR_ANDROID_FRAMEWORK) |
// Skia does not support font fallback for ndk applications in order to |
// enable clients such as WebKit to customize their font selection. |
// Clients can use GetFallbackFamilyNameForChar() to get the fallback |
// font for individual characters. |
return NULL; |
-#else |
+#endif |
SkAutoMutexAcquire ac(gFamilyHeadAndNameListMutex); |
load_system_fonts(); |
- const SkTypeface* origTypeface = find_from_uniqueID(origFontID); |
- const SkTypeface* currTypeface = find_from_uniqueID(currFontID); |
+ const SkTypeface* origTypeface = find_from_uniqueID(rec.fOrigFontID); |
+ const SkTypeface* currTypeface = find_from_uniqueID(rec.fFontID); |
SkASSERT(origTypeface != 0); |
SkASSERT(currTypeface != 0); |
@@ -823,7 +822,7 @@ SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, |
// Our fallback list always stores the id of the plain in each fallback |
// family, so we transform currFontID to its plain equivalent. |
- currFontID = find_typeface(currTypeface, SkTypeface::kNormal)->uniqueID(); |
+ uint32_t currFontID = find_typeface(currTypeface, SkTypeface::kNormal)->uniqueID(); |
/* First see if fontID is already one of our fallbacks. If so, return |
its successor. If fontID is not in our list, then return the first one |
@@ -845,7 +844,6 @@ SkTypeface* SkAndroidNextLogicalTypeface(SkFontID currFontID, |
// i.e. gFallbackFonts[0] != 0. |
const SkTypeface* firstTypeface = find_from_uniqueID(list[0]); |
return SkRef(find_typeface(firstTypeface, origTypeface->style())); |
-#endif |
} |
/////////////////////////////////////////////////////////////////////////////// |