| Index: ui/compositor/layer_animation_sequence.cc
|
| diff --git a/ui/compositor/layer_animation_sequence.cc b/ui/compositor/layer_animation_sequence.cc
|
| index 9ebf1e0552bc596c08c5d9edcf0ada590db0a203..f2b6b01acec44818bce58ad37aec67b6593646f0 100644
|
| --- a/ui/compositor/layer_animation_sequence.cc
|
| +++ b/ui/compositor/layer_animation_sequence.cc
|
| @@ -12,6 +12,7 @@
|
| #include "ui/compositor/layer_animation_delegate.h"
|
| #include "ui/compositor/layer_animation_element.h"
|
| #include "ui/compositor/layer_animation_observer.h"
|
| +#include "ui/gfx/frame_time.h"
|
|
|
| namespace ui {
|
|
|
| @@ -41,7 +42,7 @@ LayerAnimationSequence::~LayerAnimationSequence() {
|
| }
|
|
|
| void LayerAnimationSequence::Start(LayerAnimationDelegate* delegate) {
|
| - DCHECK(start_time_ != base::TimeTicks());
|
| + DCHECK(start_time_ != gfx::FrameTime());
|
| last_progressed_fraction_ = 0.0;
|
| if (elements_.empty())
|
| return;
|
| @@ -50,9 +51,9 @@ void LayerAnimationSequence::Start(LayerAnimationDelegate* delegate) {
|
| elements_[0]->Start(delegate, animation_group_id_);
|
| }
|
|
|
| -void LayerAnimationSequence::Progress(base::TimeTicks now,
|
| +void LayerAnimationSequence::Progress(gfx::FrameTime now,
|
| LayerAnimationDelegate* delegate) {
|
| - DCHECK(start_time_ != base::TimeTicks());
|
| + DCHECK(start_time_ != gfx::FrameTime());
|
| bool redraw_required = false;
|
|
|
| if (elements_.empty())
|
| @@ -105,7 +106,7 @@ void LayerAnimationSequence::Progress(base::TimeTicks now,
|
| }
|
| }
|
|
|
| -bool LayerAnimationSequence::IsFinished(base::TimeTicks time) {
|
| +bool LayerAnimationSequence::IsFinished(gfx::FrameTime time) {
|
| if (is_cyclic_ || waiting_for_group_start_)
|
| return false;
|
|
|
| @@ -115,7 +116,7 @@ bool LayerAnimationSequence::IsFinished(base::TimeTicks time) {
|
| if (last_element_ == 0)
|
| last_start_ = start_time_;
|
|
|
| - base::TimeTicks current_start = last_start_;
|
| + gfx::FrameTime current_start = last_start_;
|
| size_t current_index = last_element_;
|
| base::TimeDelta element_duration;
|
| while (current_index < elements_.size()) {
|
| @@ -225,8 +226,7 @@ void LayerAnimationSequence::OnThreadedAnimationStarted(
|
| LayerAnimationElement::ToAnimatableProperty(event.target_property);
|
| DCHECK(element_properties.find(event_property) != element_properties.end());
|
| elements_[current_index]->set_effective_start_time(
|
| - base::TimeTicks::FromInternalValue(
|
| - event.monotonic_time * base::Time::kMicrosecondsPerSecond));
|
| + gfx::FrameTime::Unsafe_FromSecondsF(event.monotonic_time));
|
| }
|
|
|
| void LayerAnimationSequence::OnScheduled() {
|
|
|