From f9573d174a6cee19917d425cedd2d8a94ede8bac Mon Sep 17 00:00:00 2001 From: Luciano Wolf Date: Wed, 26 Nov 2014 14:35:58 +0100 Subject: 100% cpu usage for "transition: opacity" animation https://bugs.webkit.org/show_bug.cgi?id=120012 Reviewed by Noam Rosenthal. Schedule animation timer after scheduling a layer flush. This way it won't overwrite animation timer with "0", thus avoiding 100% cpu usage. * WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp: (WebKit::CoordinatedLayerTreeHost::scheduleAnimation): Change-Id: Ia423bb1a8cb5da8f29aaa489c8023744d43119f2 git-svn-id: http://svn.webkit.org/repository/webkit/trunk@154711 268f45cc-cd09-0410-ab3c-d52691b4dbfc Reviewed-by: Jocelyn Turcotte --- .../WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp index fa6f276b7..ab992a53c 100644 --- a/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp +++ b/Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/CoordinatedLayerTreeHost.cpp @@ -403,8 +403,8 @@ void CoordinatedLayerTreeHost::scheduleAnimation() if (m_layerFlushTimer.isActive()) return; - m_layerFlushTimer.startOneShot(m_coordinator->nextAnimationServiceTime()); scheduleLayerFlush(); + m_layerFlushTimer.startOneShot(m_coordinator->nextAnimationServiceTime()); } #endif -- cgit v1.2.3