| 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/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 COMPILE_ASSERT(static_cast<int>(cc::Animation::RunStateEnumSize) == | 26 COMPILE_ASSERT(static_cast<int>(cc::Animation::RunStateEnumSize) == |
| 27 arraysize(s_runStateNames), | 27 arraysize(s_runStateNames), |
| 28 RunState_names_match_enum); | 28 RunState_names_match_enum); |
| 29 | 29 |
| 30 // This should match the TargetProperty enum. | 30 // This should match the TargetProperty enum. |
| 31 static const char* const s_targetPropertyNames[] = { | 31 static const char* const s_targetPropertyNames[] = { |
| 32 "Transform", | 32 "Transform", |
| 33 "Opacity", | 33 "Opacity", |
| 34 "Filter", | 34 "Filter", |
| 35 "ScrollOffset", | 35 "BackgroundColor", |
| 36 "BackgroundColor" | 36 "ScrollOffset" |
| 37 }; | 37 }; |
| 38 | 38 |
| 39 COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) == | 39 COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) == |
| 40 arraysize(s_targetPropertyNames), | 40 arraysize(s_targetPropertyNames), |
| 41 TargetProperty_names_match_enum); | 41 TargetProperty_names_match_enum); |
| 42 | 42 |
| 43 } // namespace | 43 } // namespace |
| 44 | 44 |
| 45 namespace cc { | 45 namespace cc { |
| 46 | 46 |
| (...skipping 188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 235 // the main thread. | 235 // the main thread. |
| 236 if (run_state_ == Animation::Paused || | 236 if (run_state_ == Animation::Paused || |
| 237 other->run_state_ == Animation::Paused) { | 237 other->run_state_ == Animation::Paused) { |
| 238 other->run_state_ = run_state_; | 238 other->run_state_ = run_state_; |
| 239 other->pause_time_ = pause_time_; | 239 other->pause_time_ = pause_time_; |
| 240 other->total_paused_time_ = total_paused_time_; | 240 other->total_paused_time_ = total_paused_time_; |
| 241 } | 241 } |
| 242 } | 242 } |
| 243 | 243 |
| 244 } // namespace cc | 244 } // namespace cc |
| OLD | NEW |