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/atomic_sequence_num.h" | 9 #include "base/atomic_sequence_num.h" |
10 #include "base/location.h" | 10 #include "base/location.h" |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 layer_animation_controller_->PauseAnimation( | 1197 layer_animation_controller_->PauseAnimation( |
1198 animation_id, base::TimeDelta::FromSecondsD(time_offset)); | 1198 animation_id, base::TimeDelta::FromSecondsD(time_offset)); |
1199 SetNeedsCommit(); | 1199 SetNeedsCommit(); |
1200 } | 1200 } |
1201 | 1201 |
1202 void Layer::RemoveAnimation(int animation_id) { | 1202 void Layer::RemoveAnimation(int animation_id) { |
1203 layer_animation_controller_->RemoveAnimation(animation_id); | 1203 layer_animation_controller_->RemoveAnimation(animation_id); |
1204 SetNeedsCommit(); | 1204 SetNeedsCommit(); |
1205 } | 1205 } |
1206 | 1206 |
| 1207 void Layer::RemoveAnimation(int animation_id, |
| 1208 Animation::TargetProperty property) { |
| 1209 layer_animation_controller_->RemoveAnimation(animation_id, property); |
| 1210 SetNeedsCommit(); |
| 1211 } |
| 1212 |
1207 void Layer::SetLayerAnimationControllerForTest( | 1213 void Layer::SetLayerAnimationControllerForTest( |
1208 scoped_refptr<LayerAnimationController> controller) { | 1214 scoped_refptr<LayerAnimationController> controller) { |
1209 layer_animation_controller_->RemoveValueObserver(this); | 1215 layer_animation_controller_->RemoveValueObserver(this); |
1210 layer_animation_controller_ = controller; | 1216 layer_animation_controller_ = controller; |
1211 layer_animation_controller_->AddValueObserver(this); | 1217 layer_animation_controller_->AddValueObserver(this); |
1212 SetNeedsCommit(); | 1218 SetNeedsCommit(); |
1213 } | 1219 } |
1214 | 1220 |
1215 bool Layer::HasActiveAnimation() const { | 1221 bool Layer::HasActiveAnimation() const { |
1216 return layer_animation_controller_->HasActiveAnimation(); | 1222 return layer_animation_controller_->HasActiveAnimation(); |
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1319 } | 1325 } |
1320 | 1326 |
1321 void Layer::SetFrameTimingRequests( | 1327 void Layer::SetFrameTimingRequests( |
1322 const std::vector<FrameTimingRequest>& requests) { | 1328 const std::vector<FrameTimingRequest>& requests) { |
1323 frame_timing_requests_ = requests; | 1329 frame_timing_requests_ = requests; |
1324 frame_timing_requests_dirty_ = true; | 1330 frame_timing_requests_dirty_ = true; |
1325 SetNeedsCommit(); | 1331 SetNeedsCommit(); |
1326 } | 1332 } |
1327 | 1333 |
1328 } // namespace cc | 1334 } // namespace cc |
OLD | NEW |