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

Unified Diff: include/ports/SkFontMgr.h

Issue 1873923002: Begin switch to SkFontStyle for legacy calls. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixes, rebase. 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
Index: include/ports/SkFontMgr.h
diff --git a/include/ports/SkFontMgr.h b/include/ports/SkFontMgr.h
index 3e6c785be9eb66943586b54f15767213d6ad5a52..a961cd48ad515a3e97b17bb71b08139ef0563ef3 100644
--- a/include/ports/SkFontMgr.h
+++ b/include/ports/SkFontMgr.h
@@ -164,8 +164,11 @@ public:
*/
SkTypeface* createFromFile(const char path[], int ttcIndex = 0) const;
- SkTypeface* legacyCreateTypeface(const char familyName[],
- unsigned typefaceStyleBits) const;
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
+ SkTypeface* legacyCreateTypeface(const char familyName[], unsigned typefaceStyleBits) const;
+#else
+ SkTypeface* legacyCreateTypeface(const char familyName[], SkFontStyle style) const;
+#endif
/**
* Return a ref to the default fontmgr. The caller must call unref() on
@@ -196,8 +199,13 @@ protected:
virtual SkTypeface* onCreateFromFontData(SkFontData*) const;
virtual SkTypeface* onCreateFromFile(const char path[], int ttcIndex) const = 0;
+#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
virtual SkTypeface* onLegacyCreateTypeface(const char familyName[],
unsigned styleBits) const = 0;
+#else
+ virtual SkTypeface* onLegacyCreateTypeface(const char familyName[], SkFontStyle) const = 0;
+#endif
+
private:
static SkFontMgr* Factory(); // implemented by porting layer
friend SkFontMgr* sk_fontmgr_create_default();

Powered by Google App Engine
This is Rietveld 408576698