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

Unified Diff: trunk/src/ports/SkFontHost_simple.cpp

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 side-by-side diff with in-line comments
Download patch
Index: trunk/src/ports/SkFontHost_simple.cpp
===================================================================
--- trunk/src/ports/SkFontHost_simple.cpp (revision 8166)
+++ trunk/src/ports/SkFontHost_simple.cpp (working copy)
@@ -413,7 +413,7 @@
fontIDs that can be used for fallback consideration, in sorted order (sorted
meaning element[0] should be used first, then element[1], etc. When we hit
a fontID==0 in the array, the list is done, hence our allocation size is
- +1 the total number of possible system fonts. Also see NextLogicalFont().
+ +1 the total number of possible system fonts. Also see NextLogicalTypeface().
*/
static uint32_t gFallbackFonts[SK_ARRAY_COUNT(gSystemFonts)+1];
@@ -603,7 +603,7 @@
}
}
-SkFontID SkFontHost::NextLogicalFont(SkFontID currFontID, SkFontID origFontID) {
+SkTypeface* SkFontHost::NextLogicalTypeface(SkFontID currFontID, SkFontID origFontID) {
load_system_fonts();
/* First see if fontID is already one of our fallbacks. If so, return
@@ -614,10 +614,10 @@
const uint32_t* list = gFallbackFonts;
for (int i = 0; list[i] != 0; i++) {
if (list[i] == currFontID) {
- return list[i+1];
+ return SkSafeRef(find_from_uniqueID(list[i+1]));
}
}
- return list[0];
+ return SkSafeRef(list[0]);
}
///////////////////////////////////////////////////////////////////////////////

Powered by Google App Engine
This is Rietveld 408576698