| Index: Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp
|
| diff --git a/Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp b/Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp
|
| index b0f38bba00fed13f1e9e826d2c3268a6f9a91459..cf494a2b5ca033a11cc7cf1e9054f451de9654ae 100644
|
| --- a/Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp
|
| +++ b/Source/core/platform/graphics/skia/FontCacheSkiaWin.cpp
|
| @@ -32,6 +32,7 @@
|
| #include "config.h"
|
| #include "core/platform/graphics/FontCache.h"
|
|
|
| +#include "RuntimeEnabledFeatures.h"
|
| #include "SkFontMgr.h"
|
| #include "SkTypeface_win.h"
|
| #include "platform/NotImplemented.h"
|
| @@ -45,7 +46,16 @@ namespace WebCore {
|
| FontCache::FontCache()
|
| : m_purgePreventCount(0)
|
| {
|
| - m_fontManager = adoptPtr(SkFontMgr_New_GDI());
|
| + SkFontMgr* fontManager = 0;
|
| +
|
| + // Prefer DirectWrite (if runtime feature is enabled) but fallback
|
| + // to GDI on platforms where DirectWrite is not supported.
|
| + if (RuntimeEnabledFeatures::directWriteEnabled())
|
| + fontManager = SkFontMgr_New_DirectWrite();
|
| + if (!fontManager)
|
| + fontManager = SkFontMgr_New_GDI();
|
| +
|
| + m_fontManager = adoptPtr(fontManager);
|
| }
|
|
|
|
|
|
|