| 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/animation.h" | 5 #include "cc/animation/animation.h" |
| 6 | 6 |
| 7 #include <cmath> | 7 #include <cmath> |
| 8 | 8 |
| 9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 iterations_(1), | 54 iterations_(1), |
| 55 iteration_start_(0), | 55 iteration_start_(0), |
| 56 direction_(DIRECTION_NORMAL), | 56 direction_(DIRECTION_NORMAL), |
| 57 playback_rate_(1), | 57 playback_rate_(1), |
| 58 fill_mode_(FILL_MODE_BOTH), | 58 fill_mode_(FILL_MODE_BOTH), |
| 59 needs_synchronized_start_time_(false), | 59 needs_synchronized_start_time_(false), |
| 60 received_finished_event_(false), | 60 received_finished_event_(false), |
| 61 suspended_(false), | 61 suspended_(false), |
| 62 is_controlling_instance_(false), | 62 is_controlling_instance_(false), |
| 63 is_impl_only_(false), | 63 is_impl_only_(false), |
| 64 affects_active_observers_(true), | 64 affects_active_elements_(true), |
| 65 affects_pending_observers_(true) {} | 65 affects_pending_elements_(true) {} |
| 66 | 66 |
| 67 Animation::~Animation() { | 67 Animation::~Animation() { |
| 68 if (run_state_ == RUNNING || run_state_ == PAUSED) | 68 if (run_state_ == RUNNING || run_state_ == PAUSED) |
| 69 SetRunState(ABORTED, base::TimeTicks()); | 69 SetRunState(ABORTED, base::TimeTicks()); |
| 70 } | 70 } |
| 71 | 71 |
| 72 void Animation::SetRunState(RunState run_state, | 72 void Animation::SetRunState(RunState run_state, |
| 73 base::TimeTicks monotonic_time) { | 73 base::TimeTicks monotonic_time) { |
| 74 if (suspended_) | 74 if (suspended_) |
| 75 return; | 75 return; |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 260 // the main thread. | 260 // the main thread. |
| 261 if (run_state_ == Animation::PAUSED || | 261 if (run_state_ == Animation::PAUSED || |
| 262 other->run_state_ == Animation::PAUSED) { | 262 other->run_state_ == Animation::PAUSED) { |
| 263 other->run_state_ = run_state_; | 263 other->run_state_ = run_state_; |
| 264 other->pause_time_ = pause_time_; | 264 other->pause_time_ = pause_time_; |
| 265 other->total_paused_time_ = total_paused_time_; | 265 other->total_paused_time_ = total_paused_time_; |
| 266 } | 266 } |
| 267 } | 267 } |
| 268 | 268 |
| 269 } // namespace cc | 269 } // namespace cc |
| OLD | NEW |