[iOS] Enable PageCache backing store clearing optimization for WebKit2.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 05:01:25 +0000 (05:01 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 26 Feb 2016 05:01:25 +0000 (05:01 +0000)
<https://webkit.org/b/154712>

Reviewed by Anders Carlsson.

We had an optimization for iOS where we'd tear down the compositing tree for
pages in the page cache, to save memory, but we were only enabling it when
instantiating a WebKit1 web view.

This patch enables the optimization for WebKit2 as well.

* WebProcess/WebProcess.cpp:
(WebKit::WebProcess::WebProcess):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@197157 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebKit2/ChangeLog
Source/WebKit2/WebProcess/WebProcess.cpp

index edae6ee..db2d30f 100644 (file)
@@ -1,3 +1,19 @@
+2016-02-25  Andreas Kling  <akling@apple.com>
+
+        [iOS] Enable PageCache backing store clearing optimization for WebKit2.
+        <https://webkit.org/b/154712>
+
+        Reviewed by Anders Carlsson.
+
+        We had an optimization for iOS where we'd tear down the compositing tree for
+        pages in the page cache, to save memory, but we were only enabling it when
+        instantiating a WebKit1 web view.
+
+        This patch enables the optimization for WebKit2 as well.
+
+        * WebProcess/WebProcess.cpp:
+        (WebKit::WebProcess::WebProcess):
+
 2016-02-25  Ada Chan  <adachan@apple.com>
 
         Update the definition of ENABLE_VIDEO_PRESENTATION_MODE for Mac platform
index 05d1766..ea4bc3c 100644 (file)
@@ -194,6 +194,10 @@ WebProcess::WebProcess()
 #if ENABLE(INDEXED_DATABASE)
     RuntimeEnabledFeatures::sharedFeatures().setWebkitIndexedDBEnabled(true);
 #endif
+
+#if PLATFORM(IOS)
+    PageCache::singleton().setShouldClearBackingStores(true);
+#endif
 }
 
 WebProcess::~WebProcess()