Title: [232539] trunk/Source/WebCore
Revision
232539
Author
[email protected]
Date
2018-06-06 07:50:02 -0700 (Wed, 06 Jun 2018)

Log Message

Use minimal coverage rect for tiled layers when under memory pressure
https://bugs.webkit.org/show_bug.cgi?id=186185
<rdar://problem/40713608>

Reviewed by Darin Adler.

We do this for the main content layer already.

* platform/graphics/ca/GraphicsLayerCA.cpp:
(WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (232538 => 232539)


--- trunk/Source/WebCore/ChangeLog	2018-06-06 11:18:46 UTC (rev 232538)
+++ trunk/Source/WebCore/ChangeLog	2018-06-06 14:50:02 UTC (rev 232539)
@@ -1,3 +1,16 @@
+2018-06-06  Antti Koivisto  <[email protected]>
+
+        Use minimal coverage rect for tiled layers when under memory pressure
+        https://bugs.webkit.org/show_bug.cgi?id=186185
+        <rdar://problem/40713608>
+
+        Reviewed by Darin Adler.
+
+        We do this for the main content layer already.
+
+        * platform/graphics/ca/GraphicsLayerCA.cpp:
+        (WebCore::GraphicsLayerCA::adjustTiledLayerVisibleRect):
+
 2018-06-05  Antoine Quint  <[email protected]>
 
         [Web Animations] Only expose CSSAnimation and CSSTransition if the WebAnimationsCSSIntegration runtime flag is enabled

Modified: trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp (232538 => 232539)


--- trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2018-06-06 11:18:46 UTC (rev 232538)
+++ trunk/Source/WebCore/platform/graphics/ca/GraphicsLayerCA.cpp	2018-06-06 14:50:02 UTC (rev 232539)
@@ -2429,6 +2429,9 @@
     if (oldVisibleRect.isEmpty() || newSize != oldSize || !newVisibleRect.intersects(oldVisibleRect))
         return newVisibleRect;
 
+    if (MemoryPressureHandler::singleton().isUnderMemoryPressure())
+        return newVisibleRect;
+
     const float paddingMultiplier = 2;
 
     float leftEdgeDelta = paddingMultiplier * (newVisibleRect.x() - oldVisibleRect.x());
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to