Chromium Code Reviews| 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..897e272fc728917252da8eb787f82f3b3d04b25a 100644 |
| --- a/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
| +++ b/Source/platform/fonts/win/FontCacheSkiaWin.cpp |
| @@ -45,20 +45,15 @@ 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; |
| + } |
|
eae
2014/03/25 22:14:49
ASSERT(fontManager);
scottmg
2014/03/25 22:21:56
Done.
|
| m_fontManager = adoptPtr(fontManager); |
| } |
| @@ -212,7 +207,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; |
| } |