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

Unified Diff: cc/layer_tree_host.cc

Issue 11783101: Make LayerTreeHost::animateLayers take a wall clock time in addition to a monotonic time (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix nits Created 7 years, 11 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 | « cc/layer_tree_host.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_tree_host.cc
diff --git a/cc/layer_tree_host.cc b/cc/layer_tree_host.cc
index 008e251bf33cb05a299c1bd7f3708819c2c591ba..d834164d80e1eea77f66df49b4371272649f5371 100644
--- a/cc/layer_tree_host.cc
+++ b/cc/layer_tree_host.cc
@@ -218,11 +218,11 @@ void LayerTreeHost::didBeginFrame()
m_client->didBeginFrame();
}
-void LayerTreeHost::updateAnimations(base::TimeTicks frameBeginTime)
+void LayerTreeHost::updateAnimations(base::TimeTicks monotonicFrameBeginTime, base::Time wallClockFrameBeginTime)
{
m_animating = true;
- m_client->animate((frameBeginTime - base::TimeTicks()).InSecondsF());
- animateLayers(frameBeginTime);
+ m_client->animate((monotonicFrameBeginTime - base::TimeTicks()).InSecondsF());
+ animateLayers(monotonicFrameBeginTime, wallClockFrameBeginTime);
m_animating = false;
m_renderingStats.numAnimationFrames++;
@@ -821,18 +821,18 @@ void LayerTreeHost::setDeviceScaleFactor(float deviceScaleFactor)
setNeedsCommit();
}
-void LayerTreeHost::animateLayers(base::TimeTicks time)
+void LayerTreeHost::animateLayers(base::TimeTicks monotonicTime, base::Time wallClockTime)
{
if (!m_settings.acceleratedAnimationEnabled || m_animationRegistrar->active_animation_controllers().empty())
return;
TRACE_EVENT0("cc", "LayerTreeHostImpl::animateLayers");
- double monotonicTime = (time - base::TimeTicks()).InSecondsF();
+ double monotonicTimeInSeconds = (monotonicTime - base::TimeTicks()).InSecondsF();
AnimationRegistrar::AnimationControllerMap copy = m_animationRegistrar->active_animation_controllers();
for (AnimationRegistrar::AnimationControllerMap::iterator iter = copy.begin(); iter != copy.end(); ++iter)
- (*iter).second->animate(monotonicTime, 0);
+ (*iter).second->animate(monotonicTimeInSeconds, 0);
}
void LayerTreeHost::setAnimationEventsRecursive(const AnimationEventsVector& events, Layer* layer, base::Time wallClockTime)
« no previous file with comments | « cc/layer_tree_host.h ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698