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

Side by Side Diff: cc/test/fake_layer_tree_host.cc

Issue 2840433002: Move LayerImpl's bounds_delta to property trees (Closed)
Patch Set: Document ViewportBoundsDelta better Created 3 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
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/test/fake_layer_tree_host.h" 5 #include "cc/test/fake_layer_tree_host.h"
6 6
7 #include "base/memory/ptr_util.h" 7 #include "base/memory/ptr_util.h"
8 #include "base/threading/thread_task_runner_handle.h" 8 #include "base/threading/thread_task_runner_handle.h"
9 #include "cc/animation/animation_host.h" 9 #include "cc/animation/animation_host.h"
10 #include "cc/layers/layer.h" 10 #include "cc/layers/layer.h"
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 if (page_scale_layer() && inner_viewport_scroll_layer()) { 80 if (page_scale_layer() && inner_viewport_scroll_layer()) {
81 active_tree()->SetViewportLayersFromIds( 81 active_tree()->SetViewportLayersFromIds(
82 overscroll_elasticity_layer() ? overscroll_elasticity_layer()->id() 82 overscroll_elasticity_layer() ? overscroll_elasticity_layer()->id()
83 : Layer::INVALID_ID, 83 : Layer::INVALID_ID,
84 page_scale_layer()->id(), inner_viewport_scroll_layer()->id(), 84 page_scale_layer()->id(), inner_viewport_scroll_layer()->id(),
85 outer_viewport_scroll_layer() ? outer_viewport_scroll_layer()->id() 85 outer_viewport_scroll_layer() ? outer_viewport_scroll_layer()->id()
86 : Layer::INVALID_ID); 86 : Layer::INVALID_ID);
87 } 87 }
88 88
89 active_tree()->UpdatePropertyTreesForBoundsDelta();
90 return active_tree()->root_layer_for_testing(); 89 return active_tree()->root_layer_for_testing();
91 } 90 }
92 91
93 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() { 92 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() {
94 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree()); 93 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree());
95 pending_tree()->SetPropertyTrees(property_trees()); 94 pending_tree()->SetPropertyTrees(property_trees());
96 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(), 95 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(),
97 pending_tree()); 96 pending_tree());
98 mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); 97 mutator_host()->PushPropertiesTo(host_impl_.mutator_host());
99 98
100 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( 99 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread(
101 property_trees(), pending_tree()); 100 property_trees(), pending_tree());
102 return pending_tree()->root_layer_for_testing(); 101 return pending_tree()->root_layer_for_testing();
103 } 102 }
104 103
105 } // namespace cc 104 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/trees/layer_tree_host_common_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698