<https://webkit.org/b/154343>
Reviewed by Antti Koivisto.
Source/WebCore:
The GS font cache was retaining CSS fonts after we stopped using them.
Call SPI to release them on memory pressure. This is one of multiple
steps necessary to actually free the fonts.
* Configurations/WebCore.xcconfig:
* page/cocoa/MemoryReleaseCocoa.mm:
(WebCore::platformReleaseMemory):
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
* platform/spi/ios/GraphicsServicesSPI.h:
WebKitLibraries:
* WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd: Add SPI.
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@210688
268f45cc-cd09-0410-ab3c-
d52691b4dbfc
+2017-01-12 Andreas Kling <akling@apple.com>
+
+ [iOS] Purge GraphicsServices font cache on memory warning.
+ <https://webkit.org/b/154343>
+
+ Reviewed by Antti Koivisto.
+
+ The GS font cache was retaining CSS fonts after we stopped using them.
+ Call SPI to release them on memory pressure. This is one of multiple
+ steps necessary to actually free the fonts.
+
+ * Configurations/WebCore.xcconfig:
+ * page/cocoa/MemoryReleaseCocoa.mm:
+ (WebCore::platformReleaseMemory):
+ * platform/cocoa/MemoryPressureHandlerCocoa.mm:
+ * platform/spi/ios/GraphicsServicesSPI.h:
+
2017-01-12 Chris Dumez <cdumez@apple.com>
Unreviewed EFL/GTK build fix after r210684.
OTHER_LDFLAGS = $(inherited) $(OTHER_LDFLAGS_PLATFORM)
OTHER_LDFLAGS_BASE = -lsqlite3 -lobjc -lANGLE;
OTHER_LDFLAGS_BASE_ios = $(OTHER_LDFLAGS_BASE) -framework CFNetwork -framework CoreGraphics -framework CoreText -framework Foundation -framework ImageIO -framework MobileCoreServices -framework OpenGLES -lMobileGestalt $(WK_IOS_BINCOMPAT_LDFLAGS);
-OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface;
+OTHER_LDFLAGS_PLATFORM[sdk=iphoneos*] = $(OTHER_LDFLAGS_BASE_ios) -framework IOSurface -framework GraphicsServices;
OTHER_LDFLAGS_PLATFORM[sdk=iphonesimulator*] = $(OTHER_LDFLAGS_BASE_ios);
OTHER_LDFLAGS_PLATFORM[sdk=macosx*] = $(OTHER_LDFLAGS_BASE) -sub_library libobjc -umbrella WebKit -allowable_client WebCoreTestSupport -allowable_client WebKit2 -allowable_client WebKitLegacy -framework ApplicationServices -framework AudioUnit -framework Carbon -framework Cocoa -framework CoreAudio -framework DataDetectorsCore -framework IOSurface -framework OpenGL -framework SystemConfiguration;
#include "MemoryRelease.h"
#import "GCController.h"
+#import "GraphicsServicesSPI.h"
#import "IOSurfacePool.h"
#import "LayerPool.h"
#import <notify.h>
void platformReleaseMemory(Critical)
{
+#if PLATFORM(IOS) && !PLATFORM(IOS_SIMULATOR)
+ GSFontPurgeFontCache();
+#endif
+
_sqlite3_purgeEligiblePagerCacheMemory();
for (auto& pool : LayerPool::allLayerPools())
#import <wtf/CurrentTime.h>
#if PLATFORM(IOS)
+#import "GraphicsServicesSPI.h"
#import "SystemMemory.h"
#import "WebCoreThread.h"
#endif
void GSInitialize(void);
uint64_t GSCurrentEventTimestamp(void);
CFStringRef GSSystemRootDirectory(void);
+void GSFontPurgeFontCache(void);
WTF_EXTERN_C_END
+2017-01-12 Andreas Kling <akling@apple.com>
+
+ [iOS] Purge GraphicsServices font cache on memory warning.
+ <https://webkit.org/b/154343>
+
+ Reviewed by Antti Koivisto.
+
+ * WebKitPrivateFrameworkStubs/iOS/10/GraphicsServices.framework/GraphicsServices.tbd: Add SPI.
+
2017-01-01 Jeff Miller <jeffm@apple.com>
Update user-visible copyright strings to include 2017
- arm64
symbols:
- _GSCurrentEventTimestamp
+ - _GSFontPurgeFontCache
- _GSInitialize
- _GSSystemRootDirectory
install-name: /System/Library/PrivateFrameworks/GraphicsServices.framework/GraphicsServices