Changeset 148952 in webkit


Ignore:
Timestamp:
Apr 23, 2013 1:58:25 AM (11 years ago)
Author:
commit-queue@webkit.org
Message:

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

Source/WebCore:

Patch by Noam Rosenthal <Noam Rosenthal> 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 <Noam Rosenthal> 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:
Location:
trunk/Source
Files:
8 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebCore/ChangeLog

    r148949 r148952  
     12013-04-23  Noam Rosenthal  <noam@webkit.org>
     2
     3        [Coordinated Graphics] Remove the lockAnimations code path
     4        https://bugs.webkit.org/show_bug.cgi?id=114899
     5
     6        Reviewed by Benjamin Poulain.
     7
     8        Remove locking/unlocking animations and checks for the lock state.
     9        The animation locking has been tested to create not-so-smooth animations,
     10        while the use case where the composited animations run out of sync from
     11        the non-composited animations is very rare and unnoticeable.
     12
     13        No new tests, removing functionality that wasn't tested in the first place.
     14
     15        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp:
     16        (WebCore::CoordinatedGraphicsScene::CoordinatedGraphicsScene):
     17        (WebCore::CoordinatedGraphicsScene::paintToCurrentGLContext):
     18        (WebCore::CoordinatedGraphicsScene::commitSceneState):
     19        * platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h:
     20        (CoordinatedGraphicsScene):
     21
    1222013-04-23  Allan Sandfeld Jensen  <allan.jensen@digia.com>
    223
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp

    r148748 r148952  
    6060    , m_isActive(false)
    6161    , m_rootLayerID(InvalidCoordinatedLayerID)
    62     , m_animationsLocked(false)
    6362#if ENABLE(REQUEST_ANIMATION_FRAME)
    6463    , m_animationFrameRequested(false)
     
    9594
    9695    layer->setTextureMapper(m_textureMapper.get());
    97     if (!m_animationsLocked)
    98         layer->applyAnimationsRecursively();
     96    layer->applyAnimationsRecursively();
    9997    m_textureMapper->beginPainting(PaintFlags);
    10098    m_textureMapper->beginClip(TransformationMatrix(), clipRect);
     
    612610{
    613611    m_renderedContentsScrollPosition = state.scrollPosition;
    614 
    615     // Since the frame has now been rendered, we can safely unlock the animations until the next layout.
    616     setAnimationsLocked(false);
    617612
    618613    if (state.rootCompositingLayer != m_rootLayerID)
     
    728723}
    729724
    730 void CoordinatedGraphicsScene::setAnimationsLocked(bool locked)
    731 {
    732     m_animationsLocked = locked;
    733 }
    734 
    735725void CoordinatedGraphicsScene::detach()
    736726{
  • trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h

    r148433 r148952  
    9999    void clearImageBackingContents(CoordinatedImageBackingID);
    100100    void removeImageBacking(CoordinatedImageBackingID);
    101     void setAnimationsLocked(bool);
    102101    void setBackgroundColor(const Color&);
    103102    void setDrawsBackground(bool enable) { m_setDrawsBackground = enable; }
     
    196195    FloatPoint m_scrollPosition;
    197196    FloatPoint m_renderedContentsScrollPosition;
    198     bool m_animationsLocked;
    199197#if ENABLE(REQUEST_ANIMATION_FRAME)
    200198    bool m_animationFrameRequested;
  • trunk/Source/WebKit2/ChangeLog

    r148938 r148952  
     12013-04-23  Noam Rosenthal  <noam@webkit.org>
     2
     3        [Coordinated Graphics] Remove the lockAnimations code path
     4        https://bugs.webkit.org/show_bug.cgi?id=114899
     5
     6        Remove locking/unlocking animations and checks for the lock state.
     7        The animation locking has been tested to create not-so-smooth animations,
     8        while the use case where the composited animations run out of sync from
     9        the non-composited animations is very rare and unnoticeable.
     10
     11        Reviewed by Benjamin Poulain.
     12
     13        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp:
     14        * UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in:
     15        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp:
     16        (WebKit::CoordinatedLayerTreeHost::flushPendingLayerChanges):
     17        (WebKit::CoordinatedLayerTreeHost::performScheduledLayerFlush):
     18        * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h:
     19
    1202013-04-22  Sam Weinig  <sam@webkit.org>
    221
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp

    r144907 r148952  
    123123}
    124124
    125 void CoordinatedLayerTreeHostProxy::setAnimationsLocked(bool locked)
    126 {
    127     dispatchUpdate(bind(&CoordinatedGraphicsScene::setAnimationsLocked, m_scene.get(), locked));
    128 }
    129 
    130125void CoordinatedLayerTreeHostProxy::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector)
    131126{
  • trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in

    r144787 r148952  
    3737    RemoveImageBacking(uint64_t imageID)
    3838
    39     SetAnimationsLocked(bool locked)
    40 
    4139#if ENABLE(REQUEST_ANIMATION_FRAME)
    4240    RequestAnimationFrame()
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp

    r148748 r148952  
    325325        m_waitingForUIProcess = true;
    326326        m_shouldSyncFrame = false;
    327     } else
    328         unlockAnimations();
     327    }
    329328
    330329    if (m_forceRepaintAsyncCallbackID) {
     
    470469}
    471470
    472 void CoordinatedLayerTreeHost::lockAnimations()
    473 {
    474     m_animationsLocked = true;
    475     m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetAnimationsLocked(true));
    476 }
    477 
    478 void CoordinatedLayerTreeHost::unlockAnimations()
    479 {
    480     if (!m_animationsLocked)
    481         return;
    482 
    483     m_animationsLocked = false;
    484     m_webPage->send(Messages::CoordinatedLayerTreeHostProxy::SetAnimationsLocked(false));
    485 }
    486 
    487471void CoordinatedLayerTreeHost::performScheduledLayerFlush()
    488472{
     
    490474        return;
    491475
    492     // We lock the animations while performing layout, to avoid flickers caused by animations continuing in the UI process while
    493     // the web process layout wants to cancel them.
    494     lockAnimations();
    495476    syncDisplayState();
    496 
    497     // We can unlock the animations before flushing if there are no visible changes, for example if there are content updates
    498     // in a layer with opacity 0.
    499     bool canUnlockBeforeFlush = !m_isValid || !toCoordinatedGraphicsLayer(m_rootLayer.get())->hasPendingVisibleChanges();
    500     if (canUnlockBeforeFlush)
    501         unlockAnimations();
    502477
    503478    if (!m_isValid)
  • trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h

    r146193 r148952  
    143143    void didPerformScheduledLayerFlush();
    144144    void syncDisplayState();
    145     void lockAnimations();
    146     void unlockAnimations();
    147145
    148146    void layerFlushTimerFired(WebCore::Timer<CoordinatedLayerTreeHost>*);
Note: See TracChangeset for help on using the changeset viewer.