| 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 884 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 bool LayerTreeHost::UpdateLayers() { | 895 bool LayerTreeHost::UpdateLayers() { |
| 896 DCHECK(!output_surface_lost_); | 896 DCHECK(!output_surface_lost_); |
| 897 if (!root_layer()) | 897 if (!root_layer()) |
| 898 return false; | 898 return false; |
| 899 DCHECK(!root_layer()->parent()); | 899 DCHECK(!root_layer()->parent()); |
| 900 bool result = DoUpdateLayers(root_layer()); | 900 bool result = DoUpdateLayers(root_layer()); |
| 901 micro_benchmark_controller_.DidUpdateLayers(); | 901 micro_benchmark_controller_.DidUpdateLayers(); |
| 902 return result || next_commit_forces_redraw_; | 902 return result || next_commit_forces_redraw_; |
| 903 } | 903 } |
| 904 | 904 |
| 905 LayerListIterator<Layer> LayerTreeHost::begin() { |
| 906 return LayerListIterator<Layer>(root_layer_.get()); |
| 907 } |
| 908 |
| 909 LayerListIterator<Layer> LayerTreeHost::end() { |
| 910 return LayerListIterator<Layer>(nullptr); |
| 911 } |
| 912 |
| 913 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { |
| 914 return LayerListReverseIterator<Layer>(root_layer_.get()); |
| 915 } |
| 916 |
| 917 LayerListReverseIterator<Layer> LayerTreeHost::rend() { |
| 918 return LayerListReverseIterator<Layer>(nullptr); |
| 919 } |
| 920 |
| 905 void LayerTreeHost::DidCompletePageScaleAnimation() { | 921 void LayerTreeHost::DidCompletePageScaleAnimation() { |
| 906 did_complete_scale_animation_ = true; | 922 did_complete_scale_animation_ = true; |
| 907 } | 923 } |
| 908 | 924 |
| 909 static Layer* FindFirstScrollableLayer(Layer* layer) { | 925 static Layer* FindFirstScrollableLayer(Layer* layer) { |
| 910 if (!layer) | 926 if (!layer) |
| 911 return NULL; | 927 return NULL; |
| 912 | 928 |
| 913 if (layer->scrollable()) | 929 if (layer->scrollable()) |
| 914 return layer; | 930 return layer; |
| (...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1649 [seq_num](Layer* layer) { | 1665 [seq_num](Layer* layer) { |
| 1650 layer->set_property_tree_sequence_number(seq_num); | 1666 layer->set_property_tree_sequence_number(seq_num); |
| 1651 }, | 1667 }, |
| 1652 CallFunctionLayerType::ALL_LAYERS); | 1668 CallFunctionLayerType::ALL_LAYERS); |
| 1653 | 1669 |
| 1654 surface_id_namespace_ = proto.surface_id_namespace(); | 1670 surface_id_namespace_ = proto.surface_id_namespace(); |
| 1655 next_surface_sequence_ = proto.next_surface_sequence(); | 1671 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1656 } | 1672 } |
| 1657 | 1673 |
| 1658 } // namespace cc | 1674 } // namespace cc |
| OLD | NEW |