| 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 881 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 bool LayerTreeHost::UpdateLayers() { | 892 bool LayerTreeHost::UpdateLayers() { |
| 893 DCHECK(!output_surface_lost_); | 893 DCHECK(!output_surface_lost_); |
| 894 if (!root_layer()) | 894 if (!root_layer()) |
| 895 return false; | 895 return false; |
| 896 DCHECK(!root_layer()->parent()); | 896 DCHECK(!root_layer()->parent()); |
| 897 bool result = DoUpdateLayers(root_layer()); | 897 bool result = DoUpdateLayers(root_layer()); |
| 898 micro_benchmark_controller_.DidUpdateLayers(); | 898 micro_benchmark_controller_.DidUpdateLayers(); |
| 899 return result || next_commit_forces_redraw_; | 899 return result || next_commit_forces_redraw_; |
| 900 } | 900 } |
| 901 | 901 |
| 902 LayerListIterator<Layer> LayerTreeHost::begin() { | |
| 903 return LayerListIterator<Layer>(root_layer_.get()); | |
| 904 } | |
| 905 | |
| 906 LayerListIterator<Layer> LayerTreeHost::end() { | |
| 907 return LayerListIterator<Layer>(nullptr); | |
| 908 } | |
| 909 | |
| 910 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { | |
| 911 return LayerListReverseIterator<Layer>(root_layer_.get()); | |
| 912 } | |
| 913 | |
| 914 LayerListReverseIterator<Layer> LayerTreeHost::rend() { | |
| 915 return LayerListReverseIterator<Layer>(nullptr); | |
| 916 } | |
| 917 | |
| 918 void LayerTreeHost::DidCompletePageScaleAnimation() { | 902 void LayerTreeHost::DidCompletePageScaleAnimation() { |
| 919 did_complete_scale_animation_ = true; | 903 did_complete_scale_animation_ = true; |
| 920 } | 904 } |
| 921 | 905 |
| 922 static Layer* FindFirstScrollableLayer(Layer* layer) { | 906 static Layer* FindFirstScrollableLayer(Layer* layer) { |
| 923 if (!layer) | 907 if (!layer) |
| 924 return NULL; | 908 return NULL; |
| 925 | 909 |
| 926 if (layer->scrollable()) | 910 if (layer->scrollable()) |
| 927 return layer; | 911 return layer; |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 [seq_num](Layer* layer) { | 1637 [seq_num](Layer* layer) { |
| 1654 layer->set_property_tree_sequence_number(seq_num); | 1638 layer->set_property_tree_sequence_number(seq_num); |
| 1655 }, | 1639 }, |
| 1656 CallFunctionLayerType::ALL_LAYERS); | 1640 CallFunctionLayerType::ALL_LAYERS); |
| 1657 | 1641 |
| 1658 surface_id_namespace_ = proto.surface_id_namespace(); | 1642 surface_id_namespace_ = proto.surface_id_namespace(); |
| 1659 next_surface_sequence_ = proto.next_surface_sequence(); | 1643 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1660 } | 1644 } |
| 1661 | 1645 |
| 1662 } // namespace cc | 1646 } // namespace cc |
| OLD | NEW |