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

Unified Diff: src/core/SkFontMgr.cpp

Issue 1873923002: Begin switch to SkFontStyle for legacy calls. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Dont update bzl file now. Created 4 years, 8 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 | « include/ports/SkFontMgr_indirect.h ('k') | src/core/SkFontStyle.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkFontMgr.cpp
diff --git a/src/core/SkFontMgr.cpp b/src/core/SkFontMgr.cpp
index ab04250c0343787f43358b4ec3e120a49ae0c56f..68a6c2406f5353b6dcfae7a8c0c27fd270862b81 100644
--- a/src/core/SkFontMgr.cpp
+++ b/src/core/SkFontMgr.cpp
@@ -74,7 +74,11 @@ protected:
SkTypeface* onCreateFromFile(const char[], int) const override {
return nullptr;
}
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
SkTypeface* onLegacyCreateTypeface(const char [], unsigned) const override {
+#else
+ SkTypeface* onLegacyCreateTypeface(const char [], SkFontStyle) const override {
+#endif
return nullptr;
}
};
@@ -165,9 +169,12 @@ SkTypeface* SkFontMgr::createFromFile(const char path[], int ttcIndex) const {
return this->onCreateFromFile(path, ttcIndex);
}
-SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[],
- unsigned styleBits) const {
- return this->onLegacyCreateTypeface(familyName, styleBits);
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
+SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[], unsigned style) const {
+#else
+SkTypeface* SkFontMgr::legacyCreateTypeface(const char familyName[], SkFontStyle style) const {
+#endif
+ return this->onLegacyCreateTypeface(familyName, style);
}
SK_DECLARE_STATIC_ONCE_PTR(SkFontMgr, singleton);
« no previous file with comments | « include/ports/SkFontMgr_indirect.h ('k') | src/core/SkFontStyle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698