| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 5 #ifndef UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
| 6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 6 #define UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 void OnThreadedAnimationStarted(base::TimeTicks monotonic_time, | 120 void OnThreadedAnimationStarted(base::TimeTicks monotonic_time, |
| 121 cc::TargetProperty::Type target_property, | 121 cc::TargetProperty::Type target_property, |
| 122 int group_id); | 122 int group_id); |
| 123 | 123 |
| 124 // Called when the animator schedules this sequence. | 124 // Called when the animator schedules this sequence. |
| 125 void OnScheduled(); | 125 void OnScheduled(); |
| 126 | 126 |
| 127 // Called when the animator is destroyed. | 127 // Called when the animator is destroyed. |
| 128 void OnAnimatorDestroyed(); | 128 void OnAnimatorDestroyed(); |
| 129 | 129 |
| 130 // Sets |animation_metrics_reporter_| and passes it to all |elements_|. |
| 131 void SetAnimationMetricsReporter(AnimationMetricsReporter* reporter); |
| 132 |
| 130 // The last_progressed_fraction of the element most recently progressed by | 133 // The last_progressed_fraction of the element most recently progressed by |
| 131 // by this sequence. Returns 0.0 if no elements have been progressed. | 134 // by this sequence. Returns 0.0 if no elements have been progressed. |
| 132 double last_progressed_fraction() const { return last_progressed_fraction_; } | 135 double last_progressed_fraction() const { return last_progressed_fraction_; } |
| 133 | 136 |
| 134 size_t size() const; | 137 size_t size() const; |
| 135 | 138 |
| 136 LayerAnimationElement* FirstElement() const; | 139 LayerAnimationElement* FirstElement() const; |
| 137 | 140 |
| 138 private: | 141 private: |
| 139 friend class LayerAnimatorTestController; | 142 friend class LayerAnimatorTestController; |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 184 // group id. | 187 // group id. |
| 185 int animation_group_id_; | 188 int animation_group_id_; |
| 186 | 189 |
| 187 // These parties are notified when layer animations end. | 190 // These parties are notified when layer animations end. |
| 188 base::ObserverList<LayerAnimationObserver> observers_; | 191 base::ObserverList<LayerAnimationObserver> observers_; |
| 189 | 192 |
| 190 // Tracks the last_progressed_fraction() of the most recently progressed | 193 // Tracks the last_progressed_fraction() of the most recently progressed |
| 191 // element. | 194 // element. |
| 192 double last_progressed_fraction_; | 195 double last_progressed_fraction_; |
| 193 | 196 |
| 197 // Used to tag animation elements to obtain metrics of animation performance. |
| 198 AnimationMetricsReporter* animation_metrics_reporter_; |
| 199 |
| 194 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_; | 200 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_; |
| 195 | 201 |
| 196 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); | 202 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); |
| 197 }; | 203 }; |
| 198 | 204 |
| 199 } // namespace ui | 205 } // namespace ui |
| 200 | 206 |
| 201 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 207 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
| OLD | NEW |