Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(164)

Unified Diff: Source/WebKit/chromium/src/WebViewImpl.cpp

Issue 9933003: Merge 112360 - [chromium] Route monotonic clock up from compositor (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1084/
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/WebKit/chromium/src/WebViewImpl.cpp
===================================================================
--- Source/WebKit/chromium/src/WebViewImpl.cpp (revision 112611)
+++ Source/WebKit/chromium/src/WebViewImpl.cpp (working copy)
@@ -1330,22 +1330,19 @@
InspectorInstrumentation::didCancelFrame(m_page.get());
}
-void WebViewImpl::animate(double frameBeginTime)
+void WebViewImpl::animate(double)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
- // FIXME: remove this zero-check once render_widget has been modified to
- // pass in a frameBeginTime.
- if (!frameBeginTime)
- frameBeginTime = currentTime();
+ double monotonicFrameBeginTime = monotonicallyIncreasingTime();
#if USE(ACCELERATED_COMPOSITING)
// In composited mode, we always go through the compositor so it can apply
// appropriate flow-control mechanisms.
if (isAcceleratedCompositingActive())
- m_layerTreeView.updateAnimations(frameBeginTime);
+ m_layerTreeView.updateAnimations(monotonicFrameBeginTime);
else
#endif
- updateAnimations(frameBeginTime);
+ updateAnimations(monotonicFrameBeginTime);
#endif
}
@@ -1354,7 +1351,7 @@
m_client->willBeginCompositorFrame();
}
-void WebViewImpl::updateAnimations(double frameBeginTime)
+void WebViewImpl::updateAnimations(double monotonicFrameBeginTime)
{
#if ENABLE(REQUEST_ANIMATION_FRAME)
TRACE_EVENT("WebViewImpl::updateAnimations", this, 0);
@@ -1368,13 +1365,14 @@
// Create synthetic wheel events as necessary for fling.
if (m_gestureAnimation) {
- if (m_gestureAnimation->animate(frameBeginTime))
+ if (m_gestureAnimation->animate(monotonicFrameBeginTime))
scheduleAnimation();
else
m_gestureAnimation.clear();
}
- view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(frameBeginTime));
+ double timeShift = currentTime() - monotonicallyIncreasingTime();
+ view->serviceScriptedAnimations(convertSecondsToDOMTimeStamp(monotonicFrameBeginTime + timeShift));
#endif
}
« no previous file with comments | « Source/WebKit/chromium/src/WebViewImpl.h ('k') | Source/WebKit/chromium/tests/FakeCCLayerTreeHostClient.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698