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 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 affecting 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 HasCommonProperty( | 98 bool HasConflictingProperty( |
99 const LayerAnimationElement::AnimatableProperties& other) const; | 99 const 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 int animation_group_id() const { return animation_group_id_; } | 105 int animation_group_id() const { return animation_group_id_; } |
106 void set_animation_group_id(int id) { animation_group_id_ = id; } | 106 void set_animation_group_id(int id) { animation_group_id_ = id; } |
107 | 107 |
108 // These functions are used for adding or removing observers from the observer | 108 // These functions are used for adding or removing observers from the observer |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
172 // Tracks the last_progressed_fraction() of the most recently progressed | 172 // Tracks the last_progressed_fraction() of the most recently progressed |
173 // element. | 173 // element. |
174 double last_progressed_fraction_; | 174 double last_progressed_fraction_; |
175 | 175 |
176 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); | 176 DISALLOW_COPY_AND_ASSIGN(LayerAnimationSequence); |
177 }; | 177 }; |
178 | 178 |
179 } // namespace ui | 179 } // namespace ui |
180 | 180 |
181 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ | 181 #endif // UI_COMPOSITOR_LAYER_ANIMATION_SEQUENCE_H_ |
OLD | NEW |