| 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 <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/gtest_prod_util.h" | 10 #include "base/gtest_prod_util.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 void ProgressToEnd(LayerAnimationDelegate* delegate); | 74 void ProgressToEnd(LayerAnimationDelegate* delegate); |
| 75 | 75 |
| 76 // Sets the target value to the value that would have been set had | 76 // Sets the target value to the value that would have been set had |
| 77 // the sequence completed. Does nothing if the sequence is cyclic. | 77 // the sequence completed. Does nothing if the sequence is cyclic. |
| 78 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; | 78 void GetTargetValue(LayerAnimationElement::TargetValue* target) const; |
| 79 | 79 |
| 80 // Aborts the given animation. | 80 // Aborts the given animation. |
| 81 void Abort(LayerAnimationDelegate* delegate); | 81 void Abort(LayerAnimationDelegate* delegate); |
| 82 | 82 |
| 83 // All properties modified by the sequence. | 83 // All properties modified by the sequence. |
| 84 const LayerAnimationElement::AnimatableProperties& properties() const { | 84 LayerAnimationElement::AnimatableProperties properties() const { |
| 85 return properties_; | 85 return properties_; |
| 86 } | 86 } |
| 87 | 87 |
| 88 // Adds an element to the sequence. The sequences takes ownership of this | 88 // Adds an element to the sequence. The sequences takes ownership of this |
| 89 // element. | 89 // element. |
| 90 void AddElement(LayerAnimationElement* element); | 90 void AddElement(LayerAnimationElement* element); |
| 91 | 91 |
| 92 // Sequences can be looped indefinitely. | 92 // Sequences can be looped indefinitely. |
| 93 void set_is_cyclic(bool is_cyclic) { is_cyclic_ = is_cyclic; } | 93 void set_is_cyclic(bool is_cyclic) { is_cyclic_ = is_cyclic; } |
| 94 bool is_cyclic() const { return is_cyclic_; } | 94 bool is_cyclic() const { return is_cyclic_; } |
| 95 | 95 |
| 96 // Returns true if this sequence has at least one element conflicting with a | 96 // Returns true if this sequence has at least one element conflicting with a |
| 97 // property in |other|. | 97 // property in |other|. |
| 98 bool HasConflictingProperty( | 98 bool HasConflictingProperty( |
| 99 const LayerAnimationElement::AnimatableProperties& other) const; | 99 LayerAnimationElement::AnimatableProperties other) const; |
| 100 | 100 |
| 101 // Returns true if the first element animates on the compositor thread. | 101 // Returns true if the first element animates on the compositor thread. |
| 102 bool IsFirstElementThreaded() const; | 102 bool IsFirstElementThreaded() const; |
| 103 | 103 |
| 104 // Used to identify groups of sequences that are supposed to start together. | 104 // Used to identify groups of sequences that are supposed to start together. |
| 105 // Once started, used to identify the sequence that owns a particular | 105 // Once started, used to identify the sequence that owns a particular |
| 106 // threaded animation. | 106 // threaded animation. |
| 107 int animation_group_id() const { return animation_group_id_; } | 107 int animation_group_id() const { return animation_group_id_; } |
| 108 void set_animation_group_id(int id) { animation_group_id_ = id; } | 108 void set_animation_group_id(int id) { animation_group_id_ = id; } |
| 109 | 109 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 double last_progressed_fraction_; | 183 double last_progressed_fraction_; |
| 184 | 184 |
| 185 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_; | 185 base::WeakPtrFactory<LayerAnimationSequence> weak_ptr_factory_; |
| 186 | 186 |
| 187 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); | 187 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); |
| 188 }; | 188 }; |
| 189 | 189 |
| 190 } // namespace ui | 190 } // namespace ui |
| 191 | 191 |
| 192 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 192 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
| OLD | NEW |