Title: [185097] trunk
Revision
185097
Author
[email protected]
Date
2015-06-01 19:29:41 -0700 (Mon, 01 Jun 2015)

Log Message

CSS animations in filling-forwards state shouldn't force compositing.
<https://webkit.org/b/145389>
<rdar://problem/17923642>

Reviewed by Simon Fraser.

Source/WebCore:

Stop checking if a CSS animation is filling forwards when computing
compositing requirements.

This prevents finished animations from pinning elements in composited
state, and frees up a bunch of IOSurface memory on some content.

* page/animation/AnimationBase.h:
(WebCore::AnimationBase::isAnimatingProperty): Deleted.
* rendering/RenderLayerBacking.cpp:
(WebCore::RenderLayerBacking::updateGeometry):
* rendering/RenderLayerCompositor.cpp:
(WebCore::RenderLayerCompositor::requiresCompositingForAnimation):

LayoutTests:

Remove tests that were only here to check that animations in fill-forwards
state would participate in overlap testing.

* compositing/animation/layer-for-filling-animation-expected.txt: Update expected result
here to reflect that we no longer expect filling-forwards animations to get composited.

* compositing/animation/filling-animation-overlap-at-end-expected.txt: Removed.
* compositing/animation/filling-animation-overlap-at-end.html: Removed.
* compositing/animation/filling-animation-overlap-expected.txt: Removed.
* compositing/animation/filling-animation-overlap.html: Removed.
* platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-at-end-expected.txt: Removed.
* platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-expected.txt: Removed.
* platform/ios-sim-deprecated/compositing/animation/layer-for-filling-animation-expected.txt: Removed.

Modified Paths

Removed Paths

Diff

Modified: trunk/LayoutTests/ChangeLog (185096 => 185097)


--- trunk/LayoutTests/ChangeLog	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/ChangeLog	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,3 +1,25 @@
+2015-06-01  Andreas Kling  <[email protected]>
+
+        CSS animations in filling-forwards state shouldn't force compositing.
+        <https://webkit.org/b/145389>
+        <rdar://problem/17923642>
+
+        Reviewed by Simon Fraser.
+
+        Remove tests that were only here to check that animations in fill-forwards
+        state would participate in overlap testing.
+
+        * compositing/animation/layer-for-filling-animation-expected.txt: Update expected result
+        here to reflect that we no longer expect filling-forwards animations to get composited.
+
+        * compositing/animation/filling-animation-overlap-at-end-expected.txt: Removed.
+        * compositing/animation/filling-animation-overlap-at-end.html: Removed.
+        * compositing/animation/filling-animation-overlap-expected.txt: Removed.
+        * compositing/animation/filling-animation-overlap.html: Removed.
+        * platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-at-end-expected.txt: Removed.
+        * platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-expected.txt: Removed.
+        * platform/ios-sim-deprecated/compositing/animation/layer-for-filling-animation-expected.txt: Removed.
+
 2015-06-01  Myles C. Maxfield  <[email protected]>
 
         Test gardening after r185087.

Deleted: trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end-expected.txt (185096 => 185097)


--- trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,23 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 2
-        (GraphicsLayer
-          (position 34.00 26.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 34.00 166.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end.html (185096 => 185097)


--- trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end.html	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/compositing/animation/filling-animation-overlap-at-end.html	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-    <style>
-        .box {
-            position: relative;
-            height: 100px;
-            width: 100px;
-            margin: 40px;
-            background-color: orange;
-            box-shadow: 0 0 10px black;
-        }
-        
-        .animating {
-            -webkit-animation: spin 1 0.1s forwards;
-            background-color: blue;
-        }
-
-        @-webkit-keyframes spin {
-            from { -webkit-transform: rotate(0); }
-            to   { -webkit-transform: rotate(45deg); }
-        }
-    </style>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-            
-        function doTest()
-        {
-            document.getElementById('box').addEventListener('webkitAnimationEnd', function() {
-                if (window.testRunner) {
-                    document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
-                    testRunner.notifyDone();
-                }
-            })
-        }
-        window.addEventListener('load', doTest, false);
-    </script>
-</head>
-<body>
-<div id="box" class="animating box"></div>
-<div class="box"></div>
-
-<pre id="results">Layer tree dump goes here</pre>
-</body>
-</html>

Deleted: trunk/LayoutTests/compositing/animation/filling-animation-overlap-expected.txt (185096 => 185097)


--- trunk/LayoutTests/compositing/animation/filling-animation-overlap-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/compositing/animation/filling-animation-overlap-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,18 +0,0 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 1
-        (GraphicsLayer
-          (position 34.00 26.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/compositing/animation/filling-animation-overlap.html (185096 => 185097)


--- trunk/LayoutTests/compositing/animation/filling-animation-overlap.html	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/compositing/animation/filling-animation-overlap.html	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,49 +0,0 @@
-<!DOCTYPE html>
-
-<html>
-<head>
-    <style>
-        .box {
-            position: relative;
-            height: 100px;
-            width: 100px;
-            margin: 40px;
-            box-shadow: 0 0 10px black;
-            background-color: orange;
-        }
-        
-        .animating {
-            -webkit-animation: spin 1 0.1s forwards;
-            background-color: blue;
-        }
-
-        @-webkit-keyframes spin {
-            from { -webkit-transform: rotate(0); }
-            to   { -webkit-transform: rotate(10deg); }
-        }
-    </style>
-    <script>
-        if (window.testRunner) {
-            testRunner.dumpAsText();
-            testRunner.waitUntilDone();
-        }
-            
-        function doTest()
-        {
-            document.getElementById('box').addEventListener('webkitAnimationEnd', function() {
-                if (window.testRunner) {
-                    document.getElementById('results').innerText = window.internals.layerTreeAsText(document);
-                    testRunner.notifyDone();
-                }
-            })
-        }
-        window.addEventListener('load', doTest, false);
-    </script>
-</head>
-<body>
-<div id="box" class="animating box"></div>
-<div class="box"></div>
-
-<pre id="results">Layer tree dump goes here</pre>
-</body>
-</html>

Modified: trunk/LayoutTests/compositing/animation/layer-for-filling-animation-expected.txt (185096 => 185097)


--- trunk/LayoutTests/compositing/animation/layer-for-filling-animation-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/compositing/animation/layer-for-filling-animation-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,18 +1 @@
-(GraphicsLayer
-  (anchor 0.00 0.00)
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (contentsOpaque 1)
-      (children 1
-        (GraphicsLayer
-          (position 44.00 36.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
 

Deleted: trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-at-end-expected.txt (185096 => 185097)


--- trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-at-end-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-at-end-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,21 +0,0 @@
-(GraphicsLayer
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (children 2
-        (GraphicsLayer
-          (position 34.00 26.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-        (GraphicsLayer
-          (position 34.00 166.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-expected.txt (185096 => 185097)


--- trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/filling-animation-overlap-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,16 +0,0 @@
-(GraphicsLayer
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (children 1
-        (GraphicsLayer
-          (position 34.00 26.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Deleted: trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/layer-for-filling-animation-expected.txt (185096 => 185097)


--- trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/layer-for-filling-animation-expected.txt	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/LayoutTests/platform/ios-sim-deprecated/compositing/animation/layer-for-filling-animation-expected.txt	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,16 +0,0 @@
-(GraphicsLayer
-  (bounds 800.00 600.00)
-  (children 1
-    (GraphicsLayer
-      (bounds 800.00 600.00)
-      (children 1
-        (GraphicsLayer
-          (position 44.00 36.00)
-          (bounds 128.00 128.00)
-          (drawsContent 1)
-        )
-      )
-    )
-  )
-)
-

Modified: trunk/Source/WebCore/ChangeLog (185096 => 185097)


--- trunk/Source/WebCore/ChangeLog	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/Source/WebCore/ChangeLog	2015-06-02 02:29:41 UTC (rev 185097)
@@ -1,3 +1,24 @@
+2015-06-01  Andreas Kling  <[email protected]>
+
+        CSS animations in filling-forwards state shouldn't force compositing.
+        <https://webkit.org/b/145389>
+        <rdar://problem/17923642>
+
+        Reviewed by Simon Fraser.
+
+        Stop checking if a CSS animation is filling forwards when computing
+        compositing requirements.
+
+        This prevents finished animations from pinning elements in composited
+        state, and frees up a bunch of IOSurface memory on some content.
+
+        * page/animation/AnimationBase.h:
+        (WebCore::AnimationBase::isAnimatingProperty): Deleted.
+        * rendering/RenderLayerBacking.cpp:
+        (WebCore::RenderLayerBacking::updateGeometry):
+        * rendering/RenderLayerCompositor.cpp:
+        (WebCore::RenderLayerCompositor::requiresCompositingForAnimation):
+
 2015-06-01  Myles C. Maxfield  <[email protected]>
 
         Out of bounds read in WebCore::ComplexTextController::adjustGlyphsAndAdvances

Modified: trunk/Source/WebCore/page/animation/AnimationBase.h (185096 => 185097)


--- trunk/Source/WebCore/page/animation/AnimationBase.h	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/Source/WebCore/page/animation/AnimationBase.h	2015-06-02 02:29:41 UTC (rev 185097)
@@ -163,7 +163,6 @@
         Delaying = 1 << 0,
         Paused = 1 << 1,
         Running = 1 << 2,
-        FillingFowards = 1 << 3
     };
     typedef unsigned RunningState;
     bool isAnimatingProperty(CSSPropertyID property, bool acceleratedOnly, RunningState runningState) const
@@ -183,9 +182,6 @@
         if ((runningState & Running) && !inPausedState() && (m_animationState >= AnimationState::StartWaitStyleAvailable && m_animationState <= AnimationState::Done))
             return true;
 
-        if ((runningState & FillingFowards) && m_animationState == AnimationState::FillingForwards)
-            return true;
-
         return false;
     }
 

Modified: trunk/Source/WebCore/rendering/RenderLayerBacking.cpp (185096 => 185097)


--- trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/Source/WebCore/rendering/RenderLayerBacking.cpp	2015-06-02 02:29:41 UTC (rev 185097)
@@ -674,11 +674,11 @@
 
     // Set transform property, if it is not animating. We have to do this here because the transform
     // is affected by the layer dimensions.
-    if (!renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused | AnimationBase::FillingFowards))
+    if (!renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyTransform, AnimationBase::Running | AnimationBase::Paused))
         updateTransform(style);
 
     // Set opacity, if it is not animating.
-    if (!renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity, AnimationBase::Running | AnimationBase::Paused | AnimationBase::FillingFowards))
+    if (!renderer().animation().isRunningAcceleratedAnimationOnRenderer(renderer(), CSSPropertyOpacity, AnimationBase::Running | AnimationBase::Paused))
         updateOpacity(style);
 
     updateFilters(style);

Modified: trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp (185096 => 185097)


--- trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-06-02 02:15:31 UTC (rev 185096)
+++ trunk/Source/WebCore/rendering/RenderLayerCompositor.cpp	2015-06-02 02:29:41 UTC (rev 185097)
@@ -2564,7 +2564,7 @@
     if (!(m_compositingTriggers & ChromeClient::AnimationTrigger))
         return false;
 
-    const AnimationBase::RunningState activeAnimationState = AnimationBase::Running | AnimationBase::Paused | AnimationBase::FillingFowards;
+    const AnimationBase::RunningState activeAnimationState = AnimationBase::Running | AnimationBase::Paused;
     AnimationController& animController = renderer.animation();
     return (animController.isRunningAnimationOnRenderer(renderer, CSSPropertyOpacity, activeAnimationState)
             && (inCompositingMode() || (m_compositingTriggers & ChromeClient::AnimatedOpacityTrigger)))
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to