| 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/strings/string_util.h" | 9 #include "base/strings/string_util.h" |
| 10 #include "base/trace_event/trace_event.h" | 10 #include "base/trace_event/trace_event.h" |
| 11 #include "cc/animation/animation_curve.h" | 11 #include "cc/animation/animation_curve.h" |
| 12 #include "cc/base/time_util.h" | 12 #include "cc/base/time_util.h" |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 // This should match the RunState enum. | 16 // This should match the RunState enum. |
| 17 static const char* const s_runStateNames[] = {"WAITING_FOR_TARGET_AVAILABILITY", | 17 static const char* const s_runStateNames[] = {"WAITING_FOR_TARGET_AVAILABILITY", |
| 18 "WAITING_FOR_DELETION", | 18 "WAITING_FOR_DELETION", |
| 19 "STARTING", | 19 "STARTING", |
| 20 "RUNNING", | 20 "RUNNING", |
| 21 "PAUSED", | 21 "PAUSED", |
| 22 "FINISHED", | 22 "FINISHED", |
| 23 "ABORTED"}; | 23 "ABORTED", |
| 24 "ABORTED_BUT_NEEDS_COMPLETION"}; |
| 24 | 25 |
| 25 static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 == | 26 static_assert(static_cast<int>(cc::Animation::LAST_RUN_STATE) + 1 == |
| 26 arraysize(s_runStateNames), | 27 arraysize(s_runStateNames), |
| 27 "RunStateEnumSize should equal the number of elements in " | 28 "RunStateEnumSize should equal the number of elements in " |
| 28 "s_runStateNames"); | 29 "s_runStateNames"); |
| 29 | 30 |
| 30 } // namespace | 31 } // namespace |
| 31 | 32 |
| 32 namespace cc { | 33 namespace cc { |
| 33 | 34 |
| (...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 // the main thread. | 262 // the main thread. |
| 262 if (run_state_ == Animation::PAUSED || | 263 if (run_state_ == Animation::PAUSED || |
| 263 other->run_state_ == Animation::PAUSED) { | 264 other->run_state_ == Animation::PAUSED) { |
| 264 other->run_state_ = run_state_; | 265 other->run_state_ = run_state_; |
| 265 other->pause_time_ = pause_time_; | 266 other->pause_time_ = pause_time_; |
| 266 other->total_paused_time_ = total_paused_time_; | 267 other->total_paused_time_ = total_paused_time_; |
| 267 } | 268 } |
| 268 } | 269 } |
| 269 | 270 |
| 270 } // namespace cc | 271 } // namespace cc |
| OLD | NEW |