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

Unified Diff: ui/compositor/layer_animator.cc

Issue 27710005: cc: Use HighResNow as timebase if it is fast and reliable (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Fix DCHECK 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 | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/compositor/layer_animator.cc
diff --git a/ui/compositor/layer_animator.cc b/ui/compositor/layer_animator.cc
index c287574bbb8e1caa9333e9b3df309a2b612efa28..dd727a6c549458e3e9abbc326ec85aa7de2b0d98 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -8,12 +8,14 @@
#include "base/logging.h"
#include "base/memory/scoped_ptr.h"
#include "cc/animation/animation_id_provider.h"
+#include "cc/output/begin_frame_args.h"
#include "ui/compositor/compositor.h"
#include "ui/compositor/layer.h"
#include "ui/compositor/layer_animation_delegate.h"
#include "ui/compositor/layer_animation_observer.h"
#include "ui/compositor/layer_animation_sequence.h"
#include "ui/gfx/animation/animation_container.h"
+#include "ui/gfx/frame_time.h"
#define SAFE_INVOKE_VOID(function, running_anim, ...) \
if (running_anim.is_sequence_alive()) \
@@ -177,7 +179,7 @@ void LayerAnimator::StartTogether(
if (GetAnimationContainer()->is_running())
last_step_time_ = GetAnimationContainer()->last_tick_time();
else
- last_step_time_ = base::TimeTicks::Now();
+ last_step_time_ = gfx::FrameTime::Now();
}
// Collect all the affected properties.
@@ -768,7 +770,7 @@ bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) {
else if (GetAnimationContainer()->is_running())
start_time = GetAnimationContainer()->last_tick_time();
else
- start_time = base::TimeTicks::Now();
+ start_time = gfx::FrameTime::Now();
if (!sequence->animation_group_id())
sequence->set_animation_group_id(cc::AnimationIdProvider::NextGroupId());
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/compositor/layer_animator_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698