Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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/layers/layer.h" | 5 #include "cc/layers/layer.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/debug/trace_event.h" | 9 #include "base/debug/trace_event.h" |
| 10 #include "base/location.h" | 10 #include "base/location.h" |
| (...skipping 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1113 return false; | 1113 return false; |
| 1114 | 1114 |
| 1115 UMA_HISTOGRAM_BOOLEAN("Renderer.AnimationAddedToOrphanLayer", | 1115 UMA_HISTOGRAM_BOOLEAN("Renderer.AnimationAddedToOrphanLayer", |
| 1116 !layer_tree_host_); | 1116 !layer_tree_host_); |
| 1117 layer_animation_controller_->AddAnimation(animation.Pass()); | 1117 layer_animation_controller_->AddAnimation(animation.Pass()); |
| 1118 SetNeedsCommit(); | 1118 SetNeedsCommit(); |
| 1119 return true; | 1119 return true; |
| 1120 } | 1120 } |
| 1121 | 1121 |
| 1122 void Layer::PauseAnimation(int animation_id, double time_offset) { | 1122 void Layer::PauseAnimation(int animation_id, double time_offset) { |
| 1123 layer_animation_controller_->PauseAnimation(animation_id, time_offset); | 1123 layer_animation_controller_->PauseAnimation( |
| 1124 animation_id, | |
| 1125 base::TimeTicks::FromInternalValue(time_offset * | |
|
ajuma
2014/04/24 20:41:36
The second argument to PauseAnimation should be a
Sikugu_
2014/05/05 07:09:19
Done.
| |
| 1126 base::Time::kMicrosecondsPerSecond) - | |
| 1127 base::TimeTicks()); | |
| 1124 SetNeedsCommit(); | 1128 SetNeedsCommit(); |
| 1125 } | 1129 } |
| 1126 | 1130 |
| 1127 void Layer::RemoveAnimation(int animation_id) { | 1131 void Layer::RemoveAnimation(int animation_id) { |
| 1128 layer_animation_controller_->RemoveAnimation(animation_id); | 1132 layer_animation_controller_->RemoveAnimation(animation_id); |
| 1129 SetNeedsCommit(); | 1133 SetNeedsCommit(); |
| 1130 } | 1134 } |
| 1131 | 1135 |
| 1132 void Layer::SetLayerAnimationControllerForTest( | 1136 void Layer::SetLayerAnimationControllerForTest( |
| 1133 scoped_refptr<LayerAnimationController> controller) { | 1137 scoped_refptr<LayerAnimationController> controller) { |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1192 if (clip_parent_) | 1196 if (clip_parent_) |
| 1193 clip_parent_->RemoveClipChild(this); | 1197 clip_parent_->RemoveClipChild(this); |
| 1194 | 1198 |
| 1195 clip_parent_ = NULL; | 1199 clip_parent_ = NULL; |
| 1196 } | 1200 } |
| 1197 | 1201 |
| 1198 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { | 1202 void Layer::RunMicroBenchmark(MicroBenchmark* benchmark) { |
| 1199 benchmark->RunOnLayer(this); | 1203 benchmark->RunOnLayer(this); |
| 1200 } | 1204 } |
| 1201 } // namespace cc | 1205 } // namespace cc |
| OLD | NEW |