Use the bare minimum tile coverage rect when under memory pressure.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jul 2014 21:10:46 +0000 (21:10 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 11 Jul 2014 21:10:46 +0000 (21:10 +0000)
<https://webkit.org/b/134837>

When the browser is under critical memory pressure, don't generate any
more tiles than are needed to cover the exposed viewport rect.

Reviewed by Pratik Solanki.

* page/FrameView.cpp:
(WebCore::FrameView::computeCoverageRect):

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

Source/WebCore/ChangeLog
Source/WebCore/page/FrameView.cpp

index 919f1c0..956b037 100644 (file)
@@ -1,3 +1,16 @@
+2014-07-11  Andreas Kling  <akling@apple.com>
+
+        Use the bare minimum tile coverage rect when under memory pressure.
+        <https://webkit.org/b/134837>
+
+        When the browser is under critical memory pressure, don't generate any
+        more tiles than are needed to cover the exposed viewport rect.
+
+        Reviewed by Pratik Solanki.
+
+        * page/FrameView.cpp:
+        (WebCore::FrameView::computeCoverageRect):
+
 2014-07-11  Javier Fernandez  <jfernandez@igalia.com>
 
         [CSS Grid Layout] Implement justify-self css property
index 0fb6ee0..294857d 100644 (file)
@@ -4260,7 +4260,7 @@ void FrameView::setScrollVelocity(double horizontalVelocity, double verticalVelo
 FloatRect FrameView::computeCoverageRect(double horizontalMargin, double verticalMargin) const
 {
     FloatRect exposedContentRect = this->exposedContentRect();
-    if (!m_speculativeTilingEnabled)
+    if (!m_speculativeTilingEnabled || memoryPressureHandler().isUnderMemoryPressure())
         return exposedContentRect;
 
     double currentTime = monotonicallyIncreasingTime();