Title: [148952] trunk/Source
Revision
148952
Author
[email protected]
Date
2013-04-23 01:58:25 -0700 (Tue, 23 Apr 2013)

Log Message

[Coordinated Graphics] Remove the lockAnimations code path
https://bugs.webkit.org/show_bug.cgi?id=114899

Source/WebCore:

Patch by Noam Rosenthal <[email protected]> on 2013-04-23
Reviewed by Benjamin Poulain.

Remove locking/unlocking animations and checks for the lock state.
The animation locking has been tested to create not-so-smooth animations,
while the use case where the composited animations run out of sync from
the non-composited animations is very rare and unnoticeable.

No new tests, removing functionality that wasn't tested in the first place.

* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
(WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
(WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
(WebCore::CoordinatedGraphicsScene::commitSceneState):
* platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
(CoordinatedGraphicsScene):

Source/WebKit2:

Remove locking/unlocking animations and checks for the lock state.
The animation locking has been tested to create not-so-smooth animations,
while the use case where the composited animations run out of sync from
the non-composited animations is very rare and unnoticeable.

Patch by Noam Rosenthal <[email protected]> on 2013-04-23
Reviewed by Benjamin Poulain.

* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
* UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
(WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
(WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
* WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (148951 => 148952)


--- trunk/Source/WebCore/ChangeLog	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebCore/ChangeLog	2013-04-23 08:58:25 UTC (rev 148952)
@@ -1,3 +1,24 @@
+2013-04-23  Noam Rosenthal  <[email protected]>
+
+        [Coordinated Graphics] Remove the lockAnimations code path
+        https://bugs.webkit.org/show_bug.cgi?id=114899
+
+        Reviewed by Benjamin Poulain.
+
+        Remove locking/unlocking animations and checks for the lock state.
+        The animation locking has been tested to create not-so-smooth animations,
+        while the use case where the composited animations run out of sync from
+        the non-composited animations is very rare and unnoticeable.
+
+        No new tests, removing functionality that wasn't tested in the first place.
+
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
+        (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
+        (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
+        (WebCore::CoordinatedGraphicsScene::commitSceneState):
+        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
+        (CoordinatedGraphicsScene):
+
 2013-04-23  Allan Sandfeld Jensen  <[email protected]>
 
         Respect image-rendering setting for determing image-rendering quality

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp (148951 => 148952)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp	2013-04-23 08:58:25 UTC (rev 148952)
@@ -59,7 +59,6 @@
     : m_client(client)
     , m_isActive(false)
     , m_rootLayerID(InvalidCoordinatedLayerID)
-    , m_animationsLocked(false)
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     , m_animationFrameRequested(false)
 #endif
@@ -94,8 +93,7 @@
         return;
 
     layer->setTextureMapper(m_textureMapper.get());
-    if (!m_animationsLocked)
-        layer->applyAnimationsRecursively();
+    layer->applyAnimationsRecursively();
     m_textureMapper->beginPainting(PaintFlags);
     m_textureMapper->beginClip(TransformationMatrix(), clipRect);
 
@@ -612,9 +610,6 @@
 {
     m_renderedContentsScrollPosition = state.scrollPosition;
 
-    // Since the frame has now been rendered, we can safely unlock the animations until the next layout.
-    setAnimationsLocked(false);
-
     if (state.rootCompositingLayer != m_rootLayerID)
         setRootLayerID(state.rootCompositingLayer);
 
@@ -727,11 +722,6 @@
     layer->setAnimations(state.animations);
 }
 
-void CoordinatedGraphicsScene::setAnimationsLocked(bool locked)
-{
-    m_animationsLocked = locked;
-}
-
 void CoordinatedGraphicsScene::detach()
 {
     ASSERT(isMainThread());

Modified: trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h (148951 => 148952)


--- trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h	2013-04-23 08:58:25 UTC (rev 148952)
@@ -98,7 +98,6 @@
     void updateImageBacking(CoordinatedImageBackingID, PassRefPtr<CoordinatedSurface>);
     void clearImageBackingContents(CoordinatedImageBackingID);
     void removeImageBacking(CoordinatedImageBackingID);
-    void setAnimationsLocked(bool);
     void setBackgroundColor(const Color&);
     void setDrawsBackground(bool enable) { m_setDrawsBackground = enable; }
 
@@ -195,7 +194,6 @@
     CoordinatedLayerID m_rootLayerID;
     FloatPoint m_scrollPosition;
     FloatPoint m_renderedContentsScrollPosition;
-    bool m_animationsLocked;
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     bool m_animationFrameRequested;
 #endif

Modified: trunk/Source/WebKit2/ChangeLog (148951 => 148952)


--- trunk/Source/WebKit2/ChangeLog	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebKit2/ChangeLog	2013-04-23 08:58:25 UTC (rev 148952)
@@ -1,3 +1,22 @@
+2013-04-23  Noam Rosenthal  <[email protected]>
+
+        [Coordinated Graphics] Remove the lockAnimations code path
+        https://bugs.webkit.org/show_bug.cgi?id=114899
+
+        Remove locking/unlocking animations and checks for the lock state.
+        The animation locking has been tested to create not-so-smooth animations,
+        while the use case where the composited animations run out of sync from
+        the non-composited animations is very rare and unnoticeable.
+
+        Reviewed by Benjamin Poulain.
+
+        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
+        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
+        (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
+        (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
+        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
+
 2013-04-22  Sam Weinig  <[email protected]>
 
         Need WebKit SPI to detect whether a page contains form controls

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp (148951 => 148952)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp	2013-04-23 08:58:25 UTC (rev 148952)
@@ -122,11 +122,6 @@
     dispatchUpdate(bind(&CoordinatedGraphicsScene::removeImageBacking, m_scene.get(), imageID));
 }
 
-void CoordinatedLayerTreeHostProxy::setAnimationsLocked(bool locked)
-{
-    dispatchUpdate(bind(&CoordinatedGraphicsScene::setAnimationsLocked, m_scene.get(), locked));
-}
-
 void CoordinatedLayerTreeHostProxy::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector)
 {
     // Inform the renderer to adjust viewport-fixed layers.

Modified: trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in (148951 => 148952)


--- trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in	2013-04-23 08:58:25 UTC (rev 148952)
@@ -36,8 +36,6 @@
     ClearImageBackingContents(uint64_t imageID)
     RemoveImageBacking(uint64_t imageID)
 
-    SetAnimationsLocked(bool locked)
-
 #if ENABLE(REQUEST_ANIMATION_FRAME)
     RequestAnimationFrame()
 #endif

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp (148951 => 148952)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp	2013-04-23 08:58:25 UTC (rev 148952)
@@ -324,8 +324,7 @@
 
         m_waitingForUIProcess = true;
         m_shouldSyncFrame = false;
-    } else
-        unlockAnimations();
+    }
 
     if (m_forceRepaintAsyncCallbackID) {
         m_webPage->send(Messages::WebPageProxy::VoidCallback(m_forceRepaintAsyncCallbackID));
@@ -469,37 +468,13 @@
     scheduleLayerFlush();
 }
 
-void CoordinatedLayerTreeHost::lockAnimations()
-{
-    m_animationsLocked = true;
-    m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetAnimationsLocked(true));
-}
-
-void CoordinatedLayerTreeHost::unlockAnimations()
-{
-    if (!m_animationsLocked)
-        return;
-
-    m_animationsLocked = false;
-    m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetAnimationsLocked(false));
-}
-
 void CoordinatedLayerTreeHost::performScheduledLayerFlush()
 {
     if (m_isSuspended || m_waitingForUIProcess)
         return;
 
-    // We lock the animations while performing layout, to avoid flickers caused by animations continuing in the UI process while
-    // the web process layout wants to cancel them.
-    lockAnimations();
     syncDisplayState();
 
-    // We can unlock the animations before flushing if there are no visible changes, for example if there are content updates
-    // in a layer with opacity 0.
-    bool canUnlockBeforeFlush = !m_isValid || !toCoordinatedGraphicsLayer(m_rootLayer.get())->hasPendingVisibleChanges();
-    if (canUnlockBeforeFlush)
-        unlockAnimations();
-
     if (!m_isValid)
         return;
 

Modified: trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h (148951 => 148952)


--- trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h	2013-04-23 08:33:23 UTC (rev 148951)
+++ trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h	2013-04-23 08:58:25 UTC (rev 148952)
@@ -142,8 +142,6 @@
     void performScheduledLayerFlush();
     void didPerformScheduledLayerFlush();
     void syncDisplayState();
-    void lockAnimations();
-    void unlockAnimations();
 
     void layerFlushTimerFired(WebCore::Timer<CoordinatedLayerTreeHost>*);
 
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to