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

Unified Diff: cc/trees/layer_tree_impl.cc

Issue 2609243003: [NOT FOR REVIEW]
Patch Set: Created 3 years, 12 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/property_tree_builder.h » ('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 edfd5b0aeeea09e74d7d92ef3d91362070fd3ba4..12dfba44ef2b57d838413fe8ed16182f4820a06c 100644
--- a/cc/trees/layer_tree_impl.cc
+++ b/cc/trees/layer_tree_impl.cc
@@ -378,7 +378,8 @@ static void UpdateClipTreeForBoundsDeltaOnLayer(LayerImpl* layer,
}
}
-void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) {
+void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees,
+ PropertyTrees* test_property_trees_with_new_clip_tree) {
property_trees_ = *property_trees;
property_trees->effect_tree.PushCopyRequestsTo(&property_trees_.effect_tree);
property_trees_.is_main_thread = false;
@@ -389,6 +390,10 @@ void LayerTreeImpl::SetPropertyTrees(PropertyTrees* property_trees) {
// effect tree.
if (IsActiveTree())
property_trees_.effect_tree.set_needs_update(true);
+ if (settings().verify_clip_tree_calculations) {
+ *test_property_trees_with_new_clip_tree_ =
+ *test_property_trees_with_new_clip_tree;
+ }
}
void LayerTreeImpl::UpdatePropertyTreesForBoundsDelta() {
@@ -420,7 +425,8 @@ void LayerTreeImpl::PushPropertiesTo(LayerTreeImpl* target_tree) {
DCHECK_EQ(ui_resource_request_queue_.size(), 0u);
LayerImpl* layer = target_tree->CurrentlyScrollingLayer();
- target_tree->SetPropertyTrees(&property_trees_);
+ target_tree->SetPropertyTrees(&property_trees_,
+ test_property_trees_with_new_clip_tree_);
target_tree->SetCurrentlyScrollingLayer(layer);
target_tree->UpdatePropertyTreeScrollOffset(&property_trees_);
@@ -1121,6 +1127,14 @@ void LayerTreeImpl::BuildPropertyTreesForTesting() {
PropertyTreeBuilder::PreCalculateMetaInformationForTesting(layer_list_[0]);
property_trees_.needs_rebuild = true;
property_trees_.transform_tree.set_source_to_parent_updates_allowed(true);
+ bool build_new_clip_tree = true;
+ PropertyTreeBuilder::BuildPropertyTrees(
+ layer_list_[0], PageScaleLayer(), InnerViewportScrollLayer(),
+ OuterViewportScrollLayer(), OverscrollElasticityLayer(),
+ elastic_overscroll()->Current(IsActiveTree()),
+ current_page_scale_factor(), device_scale_factor(),
+ gfx::Rect(DrawViewportSize()), layer_tree_host_impl_->DrawTransform(),
+ test_property_trees_with_new_clip_tree(), build_new_clip_tree);
PropertyTreeBuilder::BuildPropertyTrees(
layer_list_[0], PageScaleLayer(), InnerViewportScrollLayer(),
OuterViewportScrollLayer(), OverscrollElasticityLayer(),
« no previous file with comments | « cc/trees/layer_tree_impl.h ('k') | cc/trees/property_tree_builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698