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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 26880010: gfx: Add FrameTime and DisplayTime classes (Closed) Base URL: http://git.chromium.org/chromium/src.git@checkHighResNow4
Patch Set: WIP Created 7 years, 2 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/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index eacd8b15f69a407dba52c7af3e6ced5da4648b60..388b62fc64f76f30f56a7a5851a59cd8ffd754c9 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -265,9 +265,9 @@ void LayerTreeHost::DidBeginMainFrame() {
client_->DidBeginMainFrame();
}
-void LayerTreeHost::UpdateClientAnimations(base::TimeTicks frame_begin_time) {
+void LayerTreeHost::UpdateClientAnimations(gfx::FrameTime frame_begin_time) {
animating_ = true;
- client_->Animate((frame_begin_time - base::TimeTicks()).InSecondsF());
+ client_->Animate(frame_begin_time.Unsafe_InSecondsF());
animating_ = false;
}
@@ -728,7 +728,7 @@ void LayerTreeHost::NotifyInputThrottledUntilCommit() {
proxy_->NotifyInputThrottledUntilCommit();
}
-void LayerTreeHost::Composite(base::TimeTicks frame_begin_time) {
+void LayerTreeHost::Composite(gfx::FrameTime frame_begin_time) {
if (!proxy_->HasImplThread())
static_cast<SingleThreadProxy*>(proxy_.get())->CompositeImmediately(
frame_begin_time);
@@ -1191,14 +1191,14 @@ scoped_ptr<base::Value> LayerTreeHost::AsValue() const {
return state.PassAs<base::Value>();
}
-void LayerTreeHost::AnimateLayers(base::TimeTicks time) {
+void LayerTreeHost::AnimateLayers(gfx::FrameTime time) {
if (!settings_.accelerated_animation_enabled ||
animation_registrar_->active_animation_controllers().empty())
return;
TRACE_EVENT0("cc", "LayerTreeHost::AnimateLayers");
- double monotonic_time = (time - base::TimeTicks()).InSecondsF();
+ double monotonic_time = time.Unsafe_InSecondsF();
AnimationRegistrar::AnimationControllerMap copy =
animation_registrar_->active_animation_controllers();
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698