Changeset 148952 in webkit
- Timestamp:
- Apr 23, 2013 1:58:25 AM (11 years ago)
- Location:
- trunk/Source
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r148949 r148952 1 2013-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 1 22 2013-04-23 Allan Sandfeld Jensen <allan.jensen@digia.com> 2 23 -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.cpp
r148748 r148952 60 60 , m_isActive(false) 61 61 , m_rootLayerID(InvalidCoordinatedLayerID) 62 , m_animationsLocked(false)63 62 #if ENABLE(REQUEST_ANIMATION_FRAME) 64 63 , m_animationFrameRequested(false) … … 95 94 96 95 layer->setTextureMapper(m_textureMapper.get()); 97 if (!m_animationsLocked) 98 layer->applyAnimationsRecursively(); 96 layer->applyAnimationsRecursively(); 99 97 m_textureMapper->beginPainting(PaintFlags); 100 98 m_textureMapper->beginClip(TransformationMatrix(), clipRect); … … 612 610 { 613 611 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);617 612 618 613 if (state.rootCompositingLayer != m_rootLayerID) … … 728 723 } 729 724 730 void CoordinatedGraphicsScene::setAnimationsLocked(bool locked)731 {732 m_animationsLocked = locked;733 }734 735 725 void CoordinatedGraphicsScene::detach() 736 726 { -
trunk/Source/WebCore/platform/graphics/texmap/coordinated/CoordinatedGraphicsScene.h
r148433 r148952 99 99 void clearImageBackingContents(CoordinatedImageBackingID); 100 100 void removeImageBacking(CoordinatedImageBackingID); 101 void setAnimationsLocked(bool);102 101 void setBackgroundColor(const Color&); 103 102 void setDrawsBackground(bool enable) { m_setDrawsBackground = enable; } … … 196 195 FloatPoint m_scrollPosition; 197 196 FloatPoint m_renderedContentsScrollPosition; 198 bool m_animationsLocked;199 197 #if ENABLE(REQUEST_ANIMATION_FRAME) 200 198 bool m_animationFrameRequested; -
trunk/Source/WebKit2/ChangeLog
r148938 r148952 1 2013-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 1 20 2013-04-22 Sam Weinig <sam@webkit.org> 2 21 -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.cpp
r144907 r148952 123 123 } 124 124 125 void CoordinatedLayerTreeHostProxy::setAnimationsLocked(bool locked)126 {127 dispatchUpdate(bind(&CoordinatedGraphicsScene::setAnimationsLocked, m_scene.get(), locked));128 }129 130 125 void CoordinatedLayerTreeHostProxy::setVisibleContentsRect(const FloatRect& rect, const FloatPoint& trajectoryVector) 131 126 { -
trunk/Source/WebKit2/UIProcess/CoordinatedGraphics/CoordinatedLayerTreeHostProxy.messages.in
r144787 r148952 37 37 RemoveImageBacking(uint64_t imageID) 38 38 39 SetAnimationsLocked(bool locked)40 41 39 #if ENABLE(REQUEST_ANIMATION_FRAME) 42 40 RequestAnimationFrame() -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp
r148748 r148952 325 325 m_waitingForUIProcess = true; 326 326 m_shouldSyncFrame = false; 327 } else 328 unlockAnimations(); 327 } 329 328 330 329 if (m_forceRepaintAsyncCallbackID) { … … 470 469 } 471 470 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 487 471 void CoordinatedLayerTreeHost::performScheduledLayerFlush() 488 472 { … … 490 474 return; 491 475 492 // We lock the animations while performing layout, to avoid flickers caused by animations continuing in the UI process while493 // the web process layout wants to cancel them.494 lockAnimations();495 476 syncDisplayState(); 496 497 // We can unlock the animations before flushing if there are no visible changes, for example if there are content updates498 // in a layer with opacity 0.499 bool canUnlockBeforeFlush = !m_isValid || !toCoordinatedGraphicsLayer(m_rootLayer.get())->hasPendingVisibleChanges();500 if (canUnlockBeforeFlush)501 unlockAnimations();502 477 503 478 if (!m_isValid) -
trunk/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.h
r146193 r148952 143 143 void didPerformScheduledLayerFlush(); 144 144 void syncDisplayState(); 145 void lockAnimations();146 void unlockAnimations();147 145 148 146 void layerFlushTimerFired(WebCore::Timer<CoordinatedLayerTreeHost>*);
Note: See TracChangeset
for help on using the changeset viewer.