| 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 880 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 891 bool LayerTreeHost::UpdateLayers() { | 891 bool LayerTreeHost::UpdateLayers() { |
| 892 DCHECK(!output_surface_lost_); | 892 DCHECK(!output_surface_lost_); |
| 893 if (!root_layer()) | 893 if (!root_layer()) |
| 894 return false; | 894 return false; |
| 895 DCHECK(!root_layer()->parent()); | 895 DCHECK(!root_layer()->parent()); |
| 896 bool result = DoUpdateLayers(root_layer()); | 896 bool result = DoUpdateLayers(root_layer()); |
| 897 micro_benchmark_controller_.DidUpdateLayers(); | 897 micro_benchmark_controller_.DidUpdateLayers(); |
| 898 return result || next_commit_forces_redraw_; | 898 return result || next_commit_forces_redraw_; |
| 899 } | 899 } |
| 900 | 900 |
| 901 LayerListIterator<Layer> LayerTreeHost::begin() { |
| 902 return LayerListIterator<Layer>(root_layer_.get()); |
| 903 } |
| 904 |
| 905 LayerListIterator<Layer> LayerTreeHost::end() { |
| 906 return LayerListIterator<Layer>(nullptr); |
| 907 } |
| 908 |
| 909 LayerListReverseIterator<Layer> LayerTreeHost::rbegin() { |
| 910 return LayerListReverseIterator<Layer>(root_layer_.get()); |
| 911 } |
| 912 |
| 913 LayerListReverseIterator<Layer> LayerTreeHost::rend() { |
| 914 return LayerListReverseIterator<Layer>(nullptr); |
| 915 } |
| 916 |
| 901 void LayerTreeHost::DidCompletePageScaleAnimation() { | 917 void LayerTreeHost::DidCompletePageScaleAnimation() { |
| 902 did_complete_scale_animation_ = true; | 918 did_complete_scale_animation_ = true; |
| 903 } | 919 } |
| 904 | 920 |
| 905 static Layer* FindFirstScrollableLayer(Layer* layer) { | 921 static Layer* FindFirstScrollableLayer(Layer* layer) { |
| 906 if (!layer) | 922 if (!layer) |
| 907 return NULL; | 923 return NULL; |
| 908 | 924 |
| 909 if (layer->scrollable()) | 925 if (layer->scrollable()) |
| 910 return layer; | 926 return layer; |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1631 int seq_num = property_trees_.sequence_number; | 1647 int seq_num = property_trees_.sequence_number; |
| 1632 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { | 1648 LayerTreeHostCommon::CallFunctionForEveryLayer(this, [seq_num](Layer* layer) { |
| 1633 layer->set_property_tree_sequence_number(seq_num); | 1649 layer->set_property_tree_sequence_number(seq_num); |
| 1634 }); | 1650 }); |
| 1635 | 1651 |
| 1636 surface_id_namespace_ = proto.surface_id_namespace(); | 1652 surface_id_namespace_ = proto.surface_id_namespace(); |
| 1637 next_surface_sequence_ = proto.next_surface_sequence(); | 1653 next_surface_sequence_ = proto.next_surface_sequence(); |
| 1638 } | 1654 } |
| 1639 | 1655 |
| 1640 } // namespace cc | 1656 } // namespace cc |
| OLD | NEW |