Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(124)

Side by Side Diff: cc/trees/layer_tree_host.cc

Issue 1900723002: Revert of cc: Add a main thread LayerListIterator (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
921 void LayerTreeHost::DidCompletePageScaleAnimation() { 905 void LayerTreeHost::DidCompletePageScaleAnimation() {
922 did_complete_scale_animation_ = true; 906 did_complete_scale_animation_ = true;
923 } 907 }
924 908
925 static Layer* FindFirstScrollableLayer(Layer* layer) { 909 static Layer* FindFirstScrollableLayer(Layer* layer) {
926 if (!layer) 910 if (!layer)
927 return NULL; 911 return NULL;
928 912
929 if (layer->scrollable()) 913 if (layer->scrollable())
930 return layer; 914 return layer;
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
1665 [seq_num](Layer* layer) { 1649 [seq_num](Layer* layer) {
1666 layer->set_property_tree_sequence_number(seq_num); 1650 layer->set_property_tree_sequence_number(seq_num);
1667 }, 1651 },
1668 CallFunctionLayerType::ALL_LAYERS); 1652 CallFunctionLayerType::ALL_LAYERS);
1669 1653
1670 surface_id_namespace_ = proto.surface_id_namespace(); 1654 surface_id_namespace_ = proto.surface_id_namespace();
1671 next_surface_sequence_ = proto.next_surface_sequence(); 1655 next_surface_sequence_ = proto.next_surface_sequence();
1672 } 1656 }
1673 1657
1674 } // namespace cc 1658 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698