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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2032303004: cc : Add layer_list to LayerTreeImpl and build it for tests (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_impl.cc
diff --git a/cc/trees/layer_tree_impl.cc b/cc/trees/layer_tree_impl.cc
index e3e719f63926424384489fb7f8a660d155f3cf9e..6c714945e2136e0b00b16daf296e140c7cda89cd 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -264,6 +264,14 @@ void LayerTreeImpl::SetRootLayer(std::unique_ptr<LayerImpl> layer) {
layer_tree_host_impl_->OnCanDrawStateChangedForTree();
}
+void LayerTreeImpl::BuildLayerListForTesting() {
+ layer_list_.clear();
+ LayerListIterator<LayerImpl> it(root_layer_);
+ for (; it != LayerListIterator<LayerImpl>(nullptr); ++it) {
+ layer_list_.push_back(*it);
+ }
+}
+
bool LayerTreeImpl::IsRootLayer(const LayerImpl* layer) const {
return root_layer_ == layer;
}
@@ -976,7 +984,8 @@ bool LayerTreeImpl::UpdateDrawProperties(bool update_lcd_text) {
return true;
}
-void LayerTreeImpl::BuildPropertyTreesForTesting() {
+void LayerTreeImpl::BuildLayerListAndPropertyTreesForTesting() {
+ BuildLayerListForTesting();
PropertyTreeBuilder::PreCalculateMetaInformationForTesting(root_layer_);
property_trees_.transform_tree.set_source_to_parent_updates_allowed(true);
PropertyTreeBuilder::BuildPropertyTrees(
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/layer_tree_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698