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 #include "cc/animation.h" | 5 #include "cc/animation.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 | 8 |
9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
10 #include "base/string_util.h" | 10 #include "base/string_util.h" |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
52 , m_runState(WaitingForTargetAvailability) | 52 , m_runState(WaitingForTargetAvailability) |
53 , m_iterations(1) | 53 , m_iterations(1) |
54 , m_startTime(0) | 54 , m_startTime(0) |
55 , m_alternatesDirection(false) | 55 , m_alternatesDirection(false) |
56 , m_timeOffset(0) | 56 , m_timeOffset(0) |
57 , m_needsSynchronizedStartTime(false) | 57 , m_needsSynchronizedStartTime(false) |
58 , m_suspended(false) | 58 , m_suspended(false) |
59 , m_pauseTime(0) | 59 , m_pauseTime(0) |
60 , m_totalPausedTime(0) | 60 , m_totalPausedTime(0) |
61 , m_isControllingInstance(false) | 61 , m_isControllingInstance(false) |
| 62 , m_isImplAnimationOnly(false) |
62 { | 63 { |
63 } | 64 } |
64 | 65 |
65 Animation::~Animation() | 66 Animation::~Animation() |
66 { | 67 { |
67 if (m_runState == Running || m_runState == Paused) | 68 if (m_runState == Running || m_runState == Paused) |
68 setRunState(Aborted, 0); | 69 setRunState(Aborted, 0); |
69 } | 70 } |
70 | 71 |
71 void Animation::setRunState(RunState runState, double monotonicTime) | 72 void Animation::setRunState(RunState runState, double monotonicTime) |
(...skipping 129 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
201 { | 202 { |
202 // Currently, we only push changes due to pausing and resuming animations on
the main thread. | 203 // Currently, we only push changes due to pausing and resuming animations on
the main thread. |
203 if (m_runState == Animation::Paused || other->m_runState == Animation::Pause
d) { | 204 if (m_runState == Animation::Paused || other->m_runState == Animation::Pause
d) { |
204 other->m_runState = m_runState; | 205 other->m_runState = m_runState; |
205 other->m_pauseTime = m_pauseTime; | 206 other->m_pauseTime = m_pauseTime; |
206 other->m_totalPausedTime = m_totalPausedTime; | 207 other->m_totalPausedTime = m_totalPausedTime; |
207 } | 208 } |
208 } | 209 } |
209 | 210 |
210 } // namespace cc | 211 } // namespace cc |
OLD | NEW |