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

Unified Diff: third_party/WebKit/Source/platform/fonts/FontCache.cpp

Issue 1685053002: blink fonts: Load Android SkFontMgr on Linux. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@windows_change
Patch Set: Rebase. Created 4 years, 10 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
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 acf8c409bb9d40e7af57e4f64e9a8c27e2c75966..6cd13be2532830ebc468fee6e333f6de78e35493 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.cpp
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.cpp
@@ -59,12 +59,13 @@ using namespace WTF;
namespace blink {
-#if !OS(WIN)
+#if !OS(WIN) && !OS(LINUX)
FontCache::FontCache()
- : m_purgePreventCount(0)
+ : m_purgePreventCount(0),
+ m_fontManager(nullptr)
bungeman-chromium 2016/02/29 22:48:50 nit: indentation here is odd
Khushal 2016/03/01 18:52:43 Done.
{
}
-#endif // !OS(WIN)
+#endif // !OS(WIN) && !OS(LINUX)
typedef HashMap<FontCacheKey, OwnPtr<FontPlatformData>, FontCacheKeyHash, FontCacheKeyTraits> FontPlatformDataCache;
typedef HashMap<FallbackListCompositeKey, OwnPtr<ShapeCache>, FallbackListCompositeKeyHash, FallbackListCompositeKeyTraits> FallbackListShaperCache;
@@ -72,9 +73,10 @@ typedef HashMap<FallbackListCompositeKey, OwnPtr<ShapeCache>, FallbackListCompos
static FontPlatformDataCache* gFontPlatformDataCache = nullptr;
static FallbackListShaperCache* gFallbackListShaperCache = nullptr;
+SkFontMgr* FontCache::s_fontManager = nullptr;
+
#if OS(WIN)
bool FontCache::s_useDirectWrite = false;
-SkFontMgr* FontCache::s_fontManager = nullptr;
bool FontCache::s_useSubpixelPositioning = false;
float FontCache::s_deviceScaleFactor = 1.0;
#endif // OS(WIN)
@@ -148,7 +150,6 @@ FontVerticalDataCache& fontVerticalDataCacheInstance()
return fontVerticalDataCache;
}
-#if OS(WIN)
void FontCache::setFontManager(const RefPtr<SkFontMgr>& fontManager)
{
ASSERT(!s_fontManager);
@@ -156,7 +157,6 @@ void FontCache::setFontManager(const RefPtr<SkFontMgr>& fontManager)
// Explicitly AddRef since we're going to hold on to the object for the life of the program.
s_fontManager->ref();
}
-#endif
PassRefPtr<OpenTypeVerticalData> FontCache::getVerticalData(const FontFileKey& key, const FontPlatformData& platformData)
{

Powered by Google App Engine
This is Rietveld 408576698