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

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

Issue 1921503005: cc: Move main thread hierarchy dependencies into PropertyTreeBuilder (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix telemetry unittest problem Created 4 years, 7 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
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_impl.h" 5 #include "cc/trees/layer_tree_impl.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 929 matching lines...) Expand 10 before | Expand all | Expand 10 after
940 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles", 940 TRACE_EVENT_END1("cc", "LayerTreeImpl::UpdateDrawProperties::UpdateTiles",
941 "layers_updated_count", layers_updated_count); 941 "layers_updated_count", layers_updated_count);
942 } 942 }
943 943
944 DCHECK(!needs_update_draw_properties_) 944 DCHECK(!needs_update_draw_properties_)
945 << "CalcDrawProperties should not set_needs_update_draw_properties()"; 945 << "CalcDrawProperties should not set_needs_update_draw_properties()";
946 return true; 946 return true;
947 } 947 }
948 948
949 void LayerTreeImpl::BuildPropertyTreesForTesting() { 949 void LayerTreeImpl::BuildPropertyTreesForTesting() {
950 LayerTreeHostCommon::PreCalculateMetaInformationForTesting(root_layer_); 950 PropertyTreeBuilder::PreCalculateMetaInformation(root_layer_);
951 property_trees_.transform_tree.set_source_to_parent_updates_allowed(true); 951 property_trees_.transform_tree.set_source_to_parent_updates_allowed(true);
952 PropertyTreeBuilder::BuildPropertyTrees( 952 PropertyTreeBuilder::BuildPropertyTrees(
953 root_layer_, PageScaleLayer(), InnerViewportScrollLayer(), 953 root_layer_, PageScaleLayer(), InnerViewportScrollLayer(),
954 OuterViewportScrollLayer(), OverscrollElasticityLayer(), 954 OuterViewportScrollLayer(), OverscrollElasticityLayer(),
955 elastic_overscroll()->Current(IsActiveTree()), 955 elastic_overscroll()->Current(IsActiveTree()),
956 current_page_scale_factor(), device_scale_factor(), 956 current_page_scale_factor(), device_scale_factor(),
957 gfx::Rect(DrawViewportSize()), layer_tree_host_impl_->DrawTransform(), 957 gfx::Rect(DrawViewportSize()), layer_tree_host_impl_->DrawTransform(),
958 &property_trees_); 958 &property_trees_);
959 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false); 959 property_trees_.transform_tree.set_source_to_parent_updates_allowed(false);
960 } 960 }
(...skipping 1117 matching lines...) Expand 10 before | Expand all | Expand 10 after
2078 } 2078 }
2079 2079
2080 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) { 2080 void LayerTreeImpl::ResetAllChangeTracking(PropertyTrees::ResetFlags flag) {
2081 layers_that_should_push_properties_.clear(); 2081 layers_that_should_push_properties_.clear();
2082 for (auto* layer : *this) 2082 for (auto* layer : *this)
2083 layer->ResetChangeTracking(); 2083 layer->ResetChangeTracking();
2084 property_trees_.ResetAllChangeTracking(flag); 2084 property_trees_.ResetAllChangeTracking(flag);
2085 } 2085 }
2086 2086
2087 } // namespace cc 2087 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698