Title: [196712] trunk/Source/WebCore
- Revision
- 196712
- Author
- akl...@apple.com
- Date
- 2016-02-17 12:27:56 -0800 (Wed, 17 Feb 2016)
Log Message
[iOS] Purge GraphicsServices font cache on memory warning.
<https://webkit.org/b/154343>
Reviewed by Antti Koivisto.
The GS font cache was holding on to the last retain on CSS fonts after they stop being used.
Call SPI to purge it on memory pressure.
* platform/cocoa/MemoryPressureHandlerCocoa.mm:
(WebCore::MemoryPressureHandler::platformReleaseMemory):
* platform/spi/ios/GraphicsServicesSPI.h:
Modified Paths
Diff
Modified: trunk/Source/WebCore/ChangeLog (196711 => 196712)
--- trunk/Source/WebCore/ChangeLog 2016-02-17 20:22:23 UTC (rev 196711)
+++ trunk/Source/WebCore/ChangeLog 2016-02-17 20:27:56 UTC (rev 196712)
@@ -1,3 +1,17 @@
+2016-02-17 Andreas Kling <akl...@apple.com>
+
+ [iOS] Purge GraphicsServices font cache on memory warning.
+ <https://webkit.org/b/154343>
+
+ Reviewed by Antti Koivisto.
+
+ The GS font cache was holding on to the last retain on CSS fonts after they stop being used.
+ Call SPI to purge it on memory pressure.
+
+ * platform/cocoa/MemoryPressureHandlerCocoa.mm:
+ (WebCore::MemoryPressureHandler::platformReleaseMemory):
+ * platform/spi/ios/GraphicsServicesSPI.h:
+
2016-02-17 Chris Dumez <cdu...@apple.com>
Regression(r196648): window.showModalDialog is no longer undefined if the client does not allow showing modal dialog
Modified: trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm (196711 => 196712)
--- trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm 2016-02-17 20:22:23 UTC (rev 196711)
+++ trunk/Source/WebCore/platform/cocoa/MemoryPressureHandlerCocoa.mm 2016-02-17 20:27:56 UTC (rev 196712)
@@ -40,6 +40,7 @@
#import <wtf/CurrentTime.h>
#if PLATFORM(IOS)
+#import "GraphicsServicesSPI.h"
#import "SystemMemory.h"
#import "WebCoreThread.h"
#endif
@@ -68,6 +69,13 @@
}
#endif
+#if PLATFORM(IOS)
+ {
+ ReliefLogger log("Purging GraphicsServices font cache");
+ GSFontPurgeFontCache();
+ }
+#endif
+
if (critical == Critical::Yes && !isUnderMemoryPressure()) {
// libcache listens to OS memory notifications, but for process suspension
// or memory pressure simulation, we need to prod it manually:
Modified: trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h (196711 => 196712)
--- trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h 2016-02-17 20:22:23 UTC (rev 196711)
+++ trunk/Source/WebCore/platform/spi/ios/GraphicsServicesSPI.h 2016-02-17 20:27:56 UTC (rev 196712)
@@ -41,6 +41,7 @@
void GSInitialize(void);
uint64_t GSCurrentEventTimestamp(void);
CFStringRef GSSystemRootDirectory(void);
+void GSFontPurgeFontCache(void);
WTF_EXTERN_C_END
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes