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

Unified Diff: src/ports/SkFontHost_fontconfig.cpp

Issue 1882803002: Remove SK_VERY_LEGACY_CREATE_TYPEFACE. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 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 | « src/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/ports/SkFontHost_fontconfig.cpp
diff --git a/src/ports/SkFontHost_fontconfig.cpp b/src/ports/SkFontHost_fontconfig.cpp
index 207aa7232309d0a0da35cee6b1a27e8ae6d01eb1..0ed8d8fa3e608cbf5651cb65815f4e8b24616609 100644
--- a/src/ports/SkFontHost_fontconfig.cpp
+++ b/src/ports/SkFontHost_fontconfig.cpp
@@ -166,16 +166,9 @@ public:
}
};
-#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
-SkTypeface* FontConfigTypeface::LegacyCreateTypeface(const char requestedFamilyName[],
- SkTypeface::Style requestedOldStyle)
-{
- SkFontStyle requestedStyle = SkFontStyle::FromOldStyle(requestedOldStyle);
-#else
SkTypeface* FontConfigTypeface::LegacyCreateTypeface(const char requestedFamilyName[],
SkFontStyle requestedStyle)
{
-#endif
SkAutoTUnref<SkFontConfigInterface> fci(RefFCI());
if (nullptr == fci.get()) {
return nullptr;
@@ -191,13 +184,8 @@ SkTypeface* FontConfigTypeface::LegacyCreateTypeface(const char requestedFamilyN
SkFontConfigInterface::FontIdentity identity;
SkString outFamilyName;
-#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
- SkTypeface::Style outStyle;
- if (!fci->matchFamilyName(requestedFamilyName, requestedOldStyle,
-#else
SkFontStyle outStyle;
if (!fci->matchFamilyName(requestedFamilyName, requestedStyle,
-#endif
&identity, &outFamilyName, &outStyle))
{
return nullptr;
@@ -206,15 +194,9 @@ SkTypeface* FontConfigTypeface::LegacyCreateTypeface(const char requestedFamilyN
// Check if a typeface with this FontIdentity is already in the FontIdentity cache.
face = SkTypefaceCache::FindByProcAndRef(find_by_FontIdentity, &identity);
if (!face) {
-#ifdef SK_VERY_LEGACY_CREATE_TYPEFACE
- face = FontConfigTypeface::Create(SkFontStyle::FromOldStyle(outStyle), identity, outFamilyName);
- // Add this FontIdentity to the FontIdentity cache.
- SkTypefaceCache::Add(face, SkFontStyle::FromOldStyle(outStyle));
-#else
face = FontConfigTypeface::Create(outStyle, identity, outFamilyName);
// Add this FontIdentity to the FontIdentity cache.
SkTypefaceCache::Add(face, outStyle);
-#endif
}
// Add this request to the request cache.
SkFontHostRequestCache::Add(face, request.release());
« no previous file with comments | « src/ports/SkFontConfigTypeface.h ('k') | src/ports/SkFontHost_mac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698