| 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_ACTIVE_ANIMATION_H_ | 5 #ifndef CC_ACTIVE_ANIMATION_H_ |
| 6 #define CC_ACTIVE_ANIMATION_H_ | 6 #define CC_ACTIVE_ANIMATION_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 #include "cc/cc_export.h" |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 void setRunState(RunState, double monotonicTime); | 59 void setRunState(RunState, double monotonicTime); |
| 60 | 60 |
| 61 // This is the number of times that the animation will play. If this | 61 // This is the number of times that the animation will play. If this |
| 62 // value is zero the animation will not play. If it is negative, then | 62 // value is zero the animation will not play. If it is negative, then |
| 63 // the animation will loop indefinitely. | 63 // the animation will loop indefinitely. |
| 64 int iterations() const { return m_iterations; } | 64 int iterations() const { return m_iterations; } |
| 65 void setIterations(int n) { m_iterations = n; } | 65 void setIterations(int n) { m_iterations = n; } |
| 66 | 66 |
| 67 double startTime() const { return m_startTime; } | 67 double startTime() const { return m_startTime; } |
| 68 void setStartTime(double monotonicTime) { m_startTime = monotonicTime; } | 68 void setStartTime(double monotonicTime) { m_startTime = monotonicTime; } |
| 69 bool hasSetStartTime() const { return m_startTime; } | 69 bool hasSetStartTime() const { return !!m_startTime; } |
| 70 | 70 |
| 71 double timeOffset() const { return m_timeOffset; } | 71 double timeOffset() const { return m_timeOffset; } |
| 72 void setTimeOffset(double monotonicTime) { m_timeOffset = monotonicTime; } | 72 void setTimeOffset(double monotonicTime) { m_timeOffset = monotonicTime; } |
| 73 | 73 |
| 74 void suspend(double monotonicTime); | 74 void suspend(double monotonicTime); |
| 75 void resume(double monotonicTime); | 75 void resume(double monotonicTime); |
| 76 | 76 |
| 77 // If alternatesDirection is true, on odd numbered iterations we reverse the
curve. | 77 // If alternatesDirection is true, on odd numbered iterations we reverse the
curve. |
| 78 bool alternatesDirection() const { return m_alternatesDirection; } | 78 bool alternatesDirection() const { return m_alternatesDirection; } |
| 79 void setAlternatesDirection(bool alternates) { m_alternatesDirection = alter
nates; } | 79 void setAlternatesDirection(bool alternates) { m_alternatesDirection = alter
nates; } |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 // 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 |
| 154 // to it as the 'controlling instance'. | 154 // to it as the 'controlling instance'. |
| 155 bool m_isControllingInstance; | 155 bool m_isControllingInstance; |
| 156 | 156 |
| 157 DISALLOW_COPY_AND_ASSIGN(ActiveAnimation); | 157 DISALLOW_COPY_AND_ASSIGN(ActiveAnimation); |
| 158 }; | 158 }; |
| 159 | 159 |
| 160 } // namespace cc | 160 } // namespace cc |
| 161 | 161 |
| 162 #endif // CC_ACTIVE_ANIMATION_H_ | 162 #endif // CC_ACTIVE_ANIMATION_H_ |
| OLD | NEW |