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 "BackgroundColor" | 35 "BackgroundColor", |
| 36 "ScrollOffset" |
36 }; | 37 }; |
37 | 38 |
38 COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) == | 39 COMPILE_ASSERT(static_cast<int>(cc::Animation::TargetPropertyEnumSize) == |
39 arraysize(s_targetPropertyNames), | 40 arraysize(s_targetPropertyNames), |
40 TargetProperty_names_match_enum); | 41 TargetProperty_names_match_enum); |
41 | 42 |
42 } // namespace | 43 } // namespace |
43 | 44 |
44 namespace cc { | 45 namespace cc { |
45 | 46 |
(...skipping 187 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
233 // the main thread. | 234 // the main thread. |
234 if (run_state_ == Animation::Paused || | 235 if (run_state_ == Animation::Paused || |
235 other->run_state_ == Animation::Paused) { | 236 other->run_state_ == Animation::Paused) { |
236 other->run_state_ = run_state_; | 237 other->run_state_ = run_state_; |
237 other->pause_time_ = pause_time_; | 238 other->pause_time_ = pause_time_; |
238 other->total_paused_time_ = total_paused_time_; | 239 other->total_paused_time_ = total_paused_time_; |
239 } | 240 } |
240 } | 241 } |
241 | 242 |
242 } // namespace cc | 243 } // namespace cc |
OLD | NEW |