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

Unified Diff: src/ports/SkFontHost_simple.cpp

Issue 12593013: remove SkFontHost::CreateScalerContext (Closed) Base URL: http://skia.googlecode.com/svn/trunk/
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
« no previous file with comments | « src/ports/SkFontHost_none.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_simple.cpp
===================================================================
--- src/ports/SkFontHost_simple.cpp (revision 8224)
+++ src/ports/SkFontHost_simple.cpp (working copy)
@@ -394,7 +394,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];
@@ -584,7 +584,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
@@ -595,10 +595,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]);
}
///////////////////////////////////////////////////////////////////////////////
« no previous file with comments | « src/ports/SkFontHost_none.cpp ('k') | src/ports/SkFontHost_win.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698