| 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 CCActiveAnimation_h | 5 #ifndef CCActiveAnimation_h |
| 6 #define CCActiveAnimation_h | 6 #define CCActiveAnimation_h |
| 7 | 7 |
| 8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
| 9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
| 10 #include "cc/cc_export.h" |
| 10 | 11 |
| 11 namespace cc { | 12 namespace cc { |
| 12 | 13 |
| 13 class AnimationCurve; | 14 class AnimationCurve; |
| 14 | 15 |
| 15 // An ActiveAnimation, contains all the state required to play an AnimationCurve
. | 16 // An ActiveAnimation, contains all the state required to play an AnimationCurve
. |
| 16 // Specifically, the affected property, the run state (paused, finished, etc.), | 17 // Specifically, the affected property, the run state (paused, finished, etc.), |
| 17 // loop count, last pause time, and the total time spent paused. | 18 // loop count, last pause time, and the total time spent paused. |
| 18 class ActiveAnimation { | 19 class CC_EXPORT ActiveAnimation { |
| 19 public: | 20 public: |
| 20 // Animations begin in one of the 'waiting' states. Animations waiting for t
he next tick | 21 // Animations begin in one of the 'waiting' states. Animations waiting for t
he next tick |
| 21 // will start the next time the controller animates. Animations waiting for
target | 22 // will start the next time the controller animates. Animations waiting for
target |
| 22 // availibility will run as soon as their target property is free (and all t
he animations | 23 // availibility will run as soon as their target property is free (and all t
he animations |
| 23 // animating with it are also able to run). Animations waiting for their sta
rt time to | 24 // animating with it are also able to run). Animations waiting for their sta
rt time to |
| 24 // come have be scheduled to run at a particular point in time. When this ti
me arrives, | 25 // come have be scheduled to run at a particular point in time. When this ti
me arrives, |
| 25 // the controller will move the animations into the Running state. Running a
nimations | 26 // the controller will move the animations into the Running state. Running a
nimations |
| 26 // may toggle between Running and Paused, and may be stopped by moving into
either the | 27 // may toggle between Running and Paused, and may be stopped by moving into
either the |
| 27 // Aborted or Finished states. A Finished animation was allowed to run to co
mpletion, but | 28 // Aborted or Finished states. A Finished animation was allowed to run to co
mpletion, but |
| 28 // an Aborted animation was not. | 29 // an Aborted animation was not. |
| (...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 // that ultimately controls the values of the animating layer and so we will
refer | 153 // that ultimately controls the values of the animating layer and so we will
refer |
| 153 // to it as the 'controlling instance'. | 154 // to it as the 'controlling instance'. |
| 154 bool m_isControllingInstance; | 155 bool m_isControllingInstance; |
| 155 | 156 |
| 156 DISALLOW_COPY_AND_ASSIGN(ActiveAnimation); | 157 DISALLOW_COPY_AND_ASSIGN(ActiveAnimation); |
| 157 }; | 158 }; |
| 158 | 159 |
| 159 } // namespace cc | 160 } // namespace cc |
| 160 | 161 |
| 161 #endif // CCActiveAnimation_h | 162 #endif // CCActiveAnimation_h |
| OLD | NEW |