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

Unified Diff: ui/compositor/layer_animator.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 | « ui/compositor/layer_animator.h ('k') | ui/gfx/animation/animation.h » ('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 dd727a6c549458e3e9abbc326ec85aa7de2b0d98..2b5c1760e7c3b7726e6c0efe0e28233faedc1177 100644
--- a/ui/compositor/layer_animator.cc
+++ b/ui/compositor/layer_animator.cc
@@ -328,8 +328,8 @@ void LayerAnimator::OnThreadedAnimationStarted(
if (!running->sequence()->waiting_for_group_start())
return;
- base::TimeTicks start_time = base::TimeTicks::FromInternalValue(
- event.monotonic_time * base::Time::kMicrosecondsPerSecond);
+ gfx::FrameTime start_time =
+ gfx::FrameTime::Unsafe_FromSecondsF(event.monotonic_time);
running->sequence()->set_waiting_for_group_start(false);
@@ -353,7 +353,7 @@ void LayerAnimator::OnThreadedAnimationStarted(
// LayerAnimator protected -----------------------------------------------------
void LayerAnimator::ProgressAnimation(LayerAnimationSequence* sequence,
- base::TimeTicks now) {
+ gfx::FrameTime now) {
if (!delegate() || sequence->waiting_for_group_start())
return;
@@ -378,7 +378,7 @@ bool LayerAnimator::HasAnimation(LayerAnimationSequence* sequence) const {
// LayerAnimator private -------------------------------------------------------
-void LayerAnimator::Step(base::TimeTicks now) {
+void LayerAnimator::Step(gfx::FrameTime now) {
TRACE_EVENT0("ui", "LayerAnimator::Step");
scoped_refptr<LayerAnimator> retain(this);
@@ -402,7 +402,7 @@ void LayerAnimator::Step(base::TimeTicks now) {
}
}
-void LayerAnimator::SetStartTime(base::TimeTicks start_time) {
+void LayerAnimator::SetStartTime(gfx::FrameTime start_time) {
// Do nothing.
}
@@ -764,7 +764,7 @@ bool LayerAnimator::StartSequenceImmediately(LayerAnimationSequence* sequence) {
// All LayerAnimators share the same AnimationContainer. Use the
// last_tick_time() from there to ensure animations started during the same
// event complete at the same time.
- base::TimeTicks start_time;
+ gfx::FrameTime start_time;
if (is_animating() || adding_animations_)
start_time = last_step_time_;
else if (GetAnimationContainer()->is_running())
« no previous file with comments | « ui/compositor/layer_animator.h ('k') | ui/gfx/animation/animation.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698