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

Unified Diff: Source/platform/fonts/win/FontCacheSkiaWin.cpp

Issue 210243004: Usage of DirectWrite now determined browser-side (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: include Created 6 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 | « Source/platform/fonts/FontCache.cpp ('k') | Source/web/web.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/platform/fonts/win/FontCacheSkiaWin.cpp
diff --git a/Source/platform/fonts/win/FontCacheSkiaWin.cpp b/Source/platform/fonts/win/FontCacheSkiaWin.cpp
index a75f941fab2370b4dd53fd5b1f4b8d3d0986fb49..ae37a7f60b11d4a45d69a86bdf88a3fcaa5f0237 100644
--- a/Source/platform/fonts/win/FontCacheSkiaWin.cpp
+++ b/Source/platform/fonts/win/FontCacheSkiaWin.cpp
@@ -45,21 +45,17 @@ namespace WebCore {
FontCache::FontCache()
: m_purgePreventCount(0)
{
- SkFontMgr* fontManager = 0;
+ SkFontMgr* fontManager;
- // Prefer DirectWrite (if runtime feature is enabled) but fallback
- // to GDI on platforms where DirectWrite is not supported.
- if (RuntimeEnabledFeatures::directWriteEnabled())
+ if (s_useDirectWrite) {
fontManager = SkFontMgr_New_DirectWrite();
-
- // Subpixel text positioning is not supported by the GDI backend.
- m_useSubpixelPositioning = fontManager
- ? RuntimeEnabledFeatures::subpixelFontScalingEnabled()
- : false;
-
- if (!fontManager)
+ } else {
fontManager = SkFontMgr_New_GDI();
+ // Subpixel text positioning is not supported by the GDI backend.
+ s_useSubpixelPositioning = false;
+ }
+ ASSERT(fontManager);
m_fontManager = adoptPtr(fontManager);
}
@@ -212,7 +208,7 @@ FontPlatformData* FontCache::createFontPlatformData(const FontDescription& fontD
fontDescription.weight() >= FontWeightBold && !tf->isBold() || fontDescription.isSyntheticBold(),
fontDescription.style() == FontStyleItalic && !tf->isItalic() || fontDescription.isSyntheticItalic(),
fontDescription.orientation(),
- m_useSubpixelPositioning);
+ s_useSubpixelPositioning);
return result;
}
« no previous file with comments | « Source/platform/fonts/FontCache.cpp ('k') | Source/web/web.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698