| OLD | NEW |
| 1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 1343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1354 | 1354 |
| 1355 void LayerTreeHost::ElementTransformIsPotentiallyAnimatingChanged( | 1355 void LayerTreeHost::ElementTransformIsPotentiallyAnimatingChanged( |
| 1356 ElementId element_id, | 1356 ElementId element_id, |
| 1357 ElementListType list_type, | 1357 ElementListType list_type, |
| 1358 bool is_animating) { | 1358 bool is_animating) { |
| 1359 Layer* layer = LayerById(element_id); | 1359 Layer* layer = LayerById(element_id); |
| 1360 DCHECK(layer); | 1360 DCHECK(layer); |
| 1361 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); | 1361 layer->OnTransformIsPotentiallyAnimatingChanged(is_animating); |
| 1362 } | 1362 } |
| 1363 | 1363 |
| 1364 void LayerTreeHost::ElementOpacityIsCurrentlyAnimatingChanged( |
| 1365 ElementId element_id, |
| 1366 bool is_currently_animating) { |
| 1367 Layer* layer = LayerById(element_id); |
| 1368 DCHECK(layer); |
| 1369 layer->OnOpacityIsCurrentlyAnimatingChanged(is_currently_animating); |
| 1370 } |
| 1371 |
| 1364 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( | 1372 gfx::ScrollOffset LayerTreeHost::GetScrollOffsetForAnimation( |
| 1365 ElementId element_id) const { | 1373 ElementId element_id) const { |
| 1366 Layer* layer = LayerById(element_id); | 1374 Layer* layer = LayerById(element_id); |
| 1367 DCHECK(layer); | 1375 DCHECK(layer); |
| 1368 return layer->ScrollOffsetForAnimation(); | 1376 return layer->ScrollOffsetForAnimation(); |
| 1369 } | 1377 } |
| 1370 | 1378 |
| 1371 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( | 1379 bool LayerTreeHost::ScrollOffsetAnimationWasInterrupted( |
| 1372 const Layer* layer) const { | 1380 const Layer* layer) const { |
| 1373 return animation_host_->ScrollOffsetAnimationWasInterrupted(layer->id()); | 1381 return animation_host_->ScrollOffsetAnimationWasInterrupted(layer->id()); |
| (...skipping 263 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1637 int seq_num = property_trees_.sequence_number; | 1645 int seq_num = property_trees_.sequence_number; |
| 1638 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1646 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
| 1639 layer->set_property_tree_sequence_number(seq_num); | 1647 layer->set_property_tree_sequence_number(seq_num); |
| 1640 }); | 1648 }); |
| 1641 | 1649 |
| 1642 surface_id_namespace_ = proto.surface_id_namespace(); | 1650 surface_id_namespace_ = proto.surface_id_namespace(); |
| 1643 next_surface_sequence_ = proto.next_surface_sequence(); | 1651 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1644 } | 1652 } |
| 1645 | 1653 |
| 1646 } // namespace cc | 1654 } // namespace cc |
| OLD | NEW |