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

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

Issue 1691073002: Add plumbing in blink to allow overriding the skia font manager. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge to head 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.h
diff --git a/third_party/WebKit/Source/platform/fonts/FontCache.h b/third_party/WebKit/Source/platform/fonts/FontCache.h
index 5b7450c224d6aafcd556136a1479d50376bbec64..6de5ce2d5f00701824faff638153d7fe0ff0a8e4 100644
--- a/third_party/WebKit/Source/platform/fonts/FontCache.h
+++ b/third_party/WebKit/Source/platform/fonts/FontCache.h
@@ -47,7 +47,6 @@
#if OS(WIN)
#include "SkFontMgr.h"
-struct IDWriteFactory;
#endif
class SkTypeface;
@@ -114,7 +113,7 @@ public:
static bool useDirectWrite() { return s_useDirectWrite; }
static float deviceScaleFactor() { return s_deviceScaleFactor; }
static void setUseDirectWrite(bool useDirectWrite) { s_useDirectWrite = useDirectWrite; }
- static void setDirectWriteFactory(IDWriteFactory* factory) { s_directWriteFactory = factory; }
+ static void setFontManager(const RefPtr<SkFontMgr>&);
static void setDeviceScaleFactor(float deviceScaleFactor) { s_deviceScaleFactor = deviceScaleFactor; }
static void setUseSubpixelPositioning(bool useSubpixelPositioning) { s_useSubpixelPositioning = useSubpixelPositioning; }
static void addSideloadedFontForTesting(SkTypeface*);
@@ -190,9 +189,9 @@ private:
int m_purgePreventCount;
#if OS(WIN)
- OwnPtr<SkFontMgr> m_fontManager;
+ RefPtr<SkFontMgr> m_fontManager;
static bool s_useDirectWrite;
- static IDWriteFactory* s_directWriteFactory;
+ static SkFontMgr* s_fontManager;
static float s_deviceScaleFactor;
static bool s_useSubpixelPositioning;
static HashMap<String, RefPtr<SkTypeface>>* s_sideloadedFonts;

Powered by Google App Engine
This is Rietveld 408576698