OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 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 CC_ANIMATION_ANIMATION_H_ | 5 #ifndef CC_ANIMATION_ANIMATION_H_ |
6 #define CC_ANIMATION_ANIMATION_H_ | 6 #define CC_ANIMATION_ANIMATION_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "base/macros.h" | 10 #include "base/macros.h" |
11 #include "base/time/time.h" | 11 #include "base/time/time.h" |
12 #include "cc/base/cc_export.h" | 12 #include "cc/animation/animation_export.h" |
13 #include "cc/trees/target_property.h" | 13 #include "cc/trees/target_property.h" |
14 | 14 |
15 namespace cc { | 15 namespace cc { |
16 | 16 |
17 class AnimationCurve; | 17 class AnimationCurve; |
18 | 18 |
19 // An Animation contains all the state required to play an AnimationCurve. | 19 // An Animation contains all the state required to play an AnimationCurve. |
20 // Specifically, the affected property, the run state (paused, finished, etc.), | 20 // Specifically, the affected property, the run state (paused, finished, etc.), |
21 // loop count, last pause time, and the total time spent paused. | 21 // loop count, last pause time, and the total time spent paused. |
22 class CC_EXPORT Animation { | 22 class CC_ANIMATION_EXPORT Animation { |
23 public: | 23 public: |
24 // Animations begin in the 'WAITING_FOR_TARGET_AVAILABILITY' state. An | 24 // Animations begin in the 'WAITING_FOR_TARGET_AVAILABILITY' state. An |
25 // Animation waiting for target availibility will run as soon as its target | 25 // Animation waiting for target availibility will run as soon as its target |
26 // property is free (and all the animations animating with it are also able to | 26 // property is free (and all the animations animating with it are also able to |
27 // run). When this time arrives, the controller will move the animation into | 27 // run). When this time arrives, the controller will move the animation into |
28 // the STARTING state, and then into the RUNNING state. RUNNING animations may | 28 // the STARTING state, and then into the RUNNING state. RUNNING animations may |
29 // toggle between RUNNING and PAUSED, and may be stopped by moving into either | 29 // toggle between RUNNING and PAUSED, and may be stopped by moving into either |
30 // the ABORTED or FINISHED states. A FINISHED animation was allowed to run to | 30 // the ABORTED or FINISHED states. A FINISHED animation was allowed to run to |
31 // completion, but an ABORTED animation was not. An animation in the state | 31 // completion, but an ABORTED animation was not. An animation in the state |
32 // ABORTED_BUT_NEEDS_COMPLETION is an animation that was aborted for | 32 // ABORTED_BUT_NEEDS_COMPLETION is an animation that was aborted for |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
232 // longer affect any elements, and are deleted. | 232 // longer affect any elements, and are deleted. |
233 bool affects_active_elements_; | 233 bool affects_active_elements_; |
234 bool affects_pending_elements_; | 234 bool affects_pending_elements_; |
235 | 235 |
236 DISALLOW_COPY_AND_ASSIGN(Animation); | 236 DISALLOW_COPY_AND_ASSIGN(Animation); |
237 }; | 237 }; |
238 | 238 |
239 } // namespace cc | 239 } // namespace cc |
240 | 240 |
241 #endif // CC_ANIMATION_ANIMATION_H_ | 241 #endif // CC_ANIMATION_ANIMATION_H_ |
OLD | NEW |