Chromium Code Reviews| Index: cc/animation/layer_animation_controller.h |
| diff --git a/cc/animation/layer_animation_controller.h b/cc/animation/layer_animation_controller.h |
| index c5f0a3179af9f28c893f7c61641164d96e575040..1657727c3267ab1778442ba0c9d2655394ee4c4c 100644 |
| --- a/cc/animation/layer_animation_controller.h |
| +++ b/cc/animation/layer_animation_controller.h |
| @@ -40,7 +40,7 @@ class CC_EXPORT LayerAnimationController |
| int id() const { return id_; } |
| void AddAnimation(scoped_ptr<Animation> animation); |
| - void PauseAnimation(int animation_id, double time_offset); |
| + void PauseAnimation(int animation_id, base::TimeTicks time_offset); |
|
ajuma
2014/04/09 17:37:39
An offset seems more like a TimeDelta (a period of
Sikugu_
2014/04/10 14:04:57
Done.
|
| void RemoveAnimation(int animation_id); |
| void RemoveAnimation(int animation_id, |
| Animation::TargetProperty target_property); |
| @@ -52,8 +52,8 @@ class CC_EXPORT LayerAnimationController |
| virtual void PushAnimationUpdatesTo( |
| LayerAnimationController* controller_impl); |
| - void Animate(double monotonic_time); |
| - void AccumulatePropertyUpdates(double monotonic_time, |
| + void Animate(base::TimeTicks monotonic_time); |
| + void AccumulatePropertyUpdates(base::TimeTicks monotonic_time, |
| AnimationEventsVector* events); |
| void UpdateState(bool start_ready_animations, |
| @@ -134,6 +134,9 @@ class CC_EXPORT LayerAnimationController |
| virtual ~LayerAnimationController(); |
| private: |
| + double GetTimeTicks(base::TimeTicks time) { |
|
danakj
2014/04/09 16:33:03
make this a file-static method (or anon namespace)
Sikugu_
2014/04/10 14:04:57
Done.
|
| + return (time - base::TimeTicks()).InSecondsF(); |
| + } |
| typedef base::hash_set<int> TargetProperties; |
| void PushNewAnimationsToImplThread( |
| @@ -143,15 +146,15 @@ class CC_EXPORT LayerAnimationController |
| void PushPropertiesToImplThread( |
| LayerAnimationController* controller_impl) const; |
| - void StartAnimations(double monotonic_time); |
| - void PromoteStartedAnimations(double monotonic_time, |
| + void StartAnimations(base::TimeTicks monotonic_time); |
| + void PromoteStartedAnimations(base::TimeTicks monotonic_time, |
| AnimationEventsVector* events); |
| - void MarkFinishedAnimations(double monotonic_time); |
| - void MarkAnimationsForDeletion(double monotonic_time, |
| + void MarkFinishedAnimations(base::TimeTicks monotonic_time); |
| + void MarkAnimationsForDeletion(base::TimeTicks monotonic_time, |
| AnimationEventsVector* events); |
| void PurgeAnimationsMarkedForDeletion(); |
| - void TickAnimations(double monotonic_time); |
| + void TickAnimations(base::TimeTicks monotonic_time); |
| enum UpdateActivationType { |
| NormalActivation, |
| @@ -176,7 +179,7 @@ class CC_EXPORT LayerAnimationController |
| // This is used to ensure that we don't spam the registrar. |
| bool is_active_; |
| - double last_tick_time_; |
| + base::TimeTicks last_tick_time_; |
| ObserverList<LayerAnimationValueObserver> value_observers_; |
| ObserverList<LayerAnimationEventObserver> event_observers_; |