Chromium Code Reviews| Index: third_party/WebKit/Source/platform/fonts/FontCache.cpp |
| diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.cpp b/third_party/WebKit/Source/platform/fonts/FontCache.cpp |
| index 462f0d04ff0cd9443d31061f85b23e7733a538f1..6a13692eb211c6f4b7848a2672255f2a86686ff1 100644 |
| --- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp |
| +++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp |
| @@ -72,7 +72,7 @@ static FallbackListShaperCache* gFallbackListShaperCache = nullptr; |
| #if OS(WIN) |
| bool FontCache::s_useDirectWrite = false; |
| -IDWriteFactory* FontCache::s_directWriteFactory = 0; |
| +SkFontMgr* FontCache::s_fontManager = nullptr; |
| bool FontCache::s_useSubpixelPositioning = false; |
| float FontCache::s_deviceScaleFactor = 1.0; |
| #endif // OS(WIN) |
| @@ -146,6 +146,16 @@ FontVerticalDataCache& fontVerticalDataCacheInstance() |
| return fontVerticalDataCache; |
| } |
| +#if OS(WIN) |
| +void FontCache::setFontManager(const RefPtr<SkFontMgr>& fontManager) |
| +{ |
| + ASSERT(!s_fontManager); |
| + s_fontManager = fontManager.get(); |
|
jbroman
2016/02/09 22:31:30
should be "s_fontManager = fontManager.leakRef();"
|
| + // Explicitly AddRef since we're going to hold on to the object for the life of the program. |
| + s_fontManager->ref(); |
|
jbroman
2016/02/09 22:31:30
shouldn't be necessary, as the incoming PassRefPtr
|
| +} |
| +#endif |
| + |
| PassRefPtr<OpenTypeVerticalData> FontCache::getVerticalData(const FontFileKey& key, const FontPlatformData& platformData) |
| { |
| FontVerticalDataCache& fontVerticalDataCache = fontVerticalDataCacheInstance(); |