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

Unified Diff: Source/core/platform/graphics/mac/FontCacheMac.mm

Issue 14574002: Replace some trivial WebKitSystemInterface wrappers with direct calls to SPI. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Missing param Created 7 years, 8 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: Source/core/platform/graphics/mac/FontCacheMac.mm
diff --git a/Source/core/platform/graphics/mac/FontCacheMac.mm b/Source/core/platform/graphics/mac/FontCacheMac.mm
index 69f03abb830caaf31fd04d61f1c0c68bd1282b15..1ae19b614c08bd64524b651d0a77c3e4e2a7de10 100644
--- a/Source/core/platform/graphics/mac/FontCacheMac.mm
+++ b/Source/core/platform/graphics/mac/FontCacheMac.mm
@@ -39,6 +39,10 @@
#import <wtf/MainThread.h>
#import <wtf/StdLibExtras.h>
+// Forward declare Mac SPIs.
+extern "C" {
+void CGFontSetShouldUseMulticache(bool enable);
+}
namespace WebCore {
@@ -61,7 +65,8 @@ static void fontCacheRegisteredFontsChangedNotificationCallback(CFNotificationCe
void FontCache::platformInit()
{
- WKSetUpFontCache();
+ // Note: This may break on future OS releases, per https://bugs.webkit.org/show_bug.cgi?id=102405#c8.
Nico 2013/05/01 01:02:18 Is there a rdar for getting a public api for this?
Robert Sesek 2013/05/01 23:58:43 Done.
+ CGFontSetShouldUseMulticache(true);
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
}

Powered by Google App Engine
This is Rietveld 408576698