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

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: Radar links 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
« no previous file with comments | « no previous file | Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..d3fbcbef8127e4c5c844130858853d49cfac1a91 100644
--- a/Source/core/platform/graphics/mac/FontCacheMac.mm
+++ b/Source/core/platform/graphics/mac/FontCacheMac.mm
@@ -39,6 +39,11 @@
#import <wtf/MainThread.h>
#import <wtf/StdLibExtras.h>
+// Forward declare Mac SPIs.
+// Request for public API: rdar://13787490
+extern "C" {
+void CGFontSetShouldUseMulticache(bool enable);
+}
namespace WebCore {
@@ -61,7 +66,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.
+ CGFontSetShouldUseMulticache(true);
CFNotificationCenterAddObserver(CFNotificationCenterGetLocalCenter(), this, fontCacheRegisteredFontsChangedNotificationCallback, kCTFontManagerRegisteredFontsChangedNotification, 0, CFNotificationSuspensionBehaviorDeliverImmediately);
}
« no previous file with comments | « no previous file | Source/core/platform/graphics/mac/GlyphPageTreeNodeMac.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698