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 866 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
877 bool LayerTreeHost::UpdateLayers() { | 877 bool LayerTreeHost::UpdateLayers() { |
878 DCHECK(!output_surface_lost_); | 878 DCHECK(!output_surface_lost_); |
879 if (!root_layer()) | 879 if (!root_layer()) |
880 return false; | 880 return false; |
881 DCHECK(!root_layer()->parent()); | 881 DCHECK(!root_layer()->parent()); |
882 bool result = DoUpdateLayers(root_layer()); | 882 bool result = DoUpdateLayers(root_layer()); |
883 micro_benchmark_controller_.DidUpdateLayers(); | 883 micro_benchmark_controller_.DidUpdateLayers(); |
884 return result || next_commit_forces_redraw_; | 884 return result || next_commit_forces_redraw_; |
885 } | 885 } |
886 | 886 |
887 LayerListIterator<Layer> LayerTreeHost::begin() { | 887 LayerListIterator<Layer> LayerTreeHost::begin() const { |
888 return LayerListIterator<Layer>(root_layer_.get()); | 888 return LayerListIterator<Layer>(root_layer_.get()); |
889 } | 889 } |
890 | 890 |
891 LayerListIterator<Layer> LayerTreeHost::end() { | 891 LayerListIterator<Layer> LayerTreeHost::end() const { |
892 return LayerListIterator<Layer>(nullptr); | 892 return LayerListIterator<Layer>(nullptr); |
893 } | 893 } |
894 | 894 |
895 const LayerListIterator<Layer> LayerTreeHost::begin() const { | |
896 return LayerListIterator<Layer>(root_layer_.get()); | |
897 } | |
898 | |
899 const LayerListIterator<Layer> LayerTreeHost::end() const { | |
900 return LayerListIterator<Layer>(nullptr); | |
901 } | |
902 | |
903 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { | 895 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { |
904 return LayerListReverseIterator<Layer>(root_layer_.get()); | 896 return LayerListReverseIterator<Layer>(root_layer_.get()); |
905 } | 897 } |
906 | 898 |
907 LayerListReverseIterator<Layer> LayerTreeHost::rend() { | 899 LayerListReverseIterator<Layer> LayerTreeHost::rend() { |
908 return LayerListReverseIterator<Layer>(nullptr); | 900 return LayerListReverseIterator<Layer>(nullptr); |
909 } | 901 } |
910 | 902 |
911 void LayerTreeHost::DidCompletePageScaleAnimation() { | 903 void LayerTreeHost::DidCompletePageScaleAnimation() { |
912 did_complete_scale_animation_ = true; | 904 did_complete_scale_animation_ = true; |
(...skipping 764 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1677 int seq_num = property_trees_.sequence_number; | 1669 int seq_num = property_trees_.sequence_number; |
1678 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1670 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
1679 layer->set_property_tree_sequence_number(seq_num); | 1671 layer->set_property_tree_sequence_number(seq_num); |
1680 }); | 1672 }); |
1681 | 1673 |
1682 surface_id_namespace_ = proto.surface_id_namespace(); | 1674 surface_id_namespace_ = proto.surface_id_namespace(); |
1683 next_surface_sequence_ = proto.next_surface_sequence(); | 1675 next_surface_sequence_ = proto.next_surface_sequence(); |
1684 } | 1676 } |
1685 | 1677 |
1686 } // namespace cc | 1678 } // namespace cc |
OLD | NEW |