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

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

Issue 2887053002: Remove scroll_clip_layer dependency from viewport layer tracking (Closed)
Patch Set: Cleanup return stmt Created 3 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
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('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 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/single_thread_task_runner.h" 8 #include "base/single_thread_task_runner.h"
9 #include "base/threading/thread_task_runner_handle.h" 9 #include "base/threading/thread_task_runner_handle.h"
10 #include "cc/animation/animation_host.h" 10 #include "cc/animation/animation_host.h"
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 active_tree()); 75 active_tree());
76 mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); 76 mutator_host()->PushPropertiesTo(host_impl_.mutator_host());
77 77
78 active_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( 78 active_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread(
79 property_trees(), active_tree()); 79 property_trees(), active_tree());
80 80
81 if (page_scale_layer() && inner_viewport_scroll_layer()) { 81 if (page_scale_layer() && inner_viewport_scroll_layer()) {
82 active_tree()->SetViewportLayersFromIds( 82 active_tree()->SetViewportLayersFromIds(
83 overscroll_elasticity_layer() ? overscroll_elasticity_layer()->id() 83 overscroll_elasticity_layer() ? overscroll_elasticity_layer()->id()
84 : Layer::INVALID_ID, 84 : Layer::INVALID_ID,
85 page_scale_layer()->id(), inner_viewport_scroll_layer()->id(), 85 page_scale_layer()->id(),
86 inner_viewport_container_layer()
87 ? inner_viewport_container_layer()->id()
88 : Layer::INVALID_ID,
89 outer_viewport_container_layer()
90 ? outer_viewport_container_layer()->id()
91 : Layer::INVALID_ID,
92 inner_viewport_scroll_layer()->id(),
86 outer_viewport_scroll_layer() ? outer_viewport_scroll_layer()->id() 93 outer_viewport_scroll_layer() ? outer_viewport_scroll_layer()->id()
87 : Layer::INVALID_ID); 94 : Layer::INVALID_ID);
88 } 95 }
89 96
90 return active_tree()->root_layer_for_testing(); 97 return active_tree()->root_layer_for_testing();
91 } 98 }
92 99
93 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() { 100 LayerImpl* FakeLayerTreeHost::CommitAndCreatePendingTree() {
94 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree()); 101 TreeSynchronizer::SynchronizeTrees(root_layer(), pending_tree());
95 pending_tree()->SetPropertyTrees(property_trees()); 102 pending_tree()->SetPropertyTrees(property_trees());
96 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(), 103 TreeSynchronizer::PushLayerProperties(root_layer()->layer_tree_host(),
97 pending_tree()); 104 pending_tree());
98 mutator_host()->PushPropertiesTo(host_impl_.mutator_host()); 105 mutator_host()->PushPropertiesTo(host_impl_.mutator_host());
99 106
100 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread( 107 pending_tree()->property_trees()->scroll_tree.PushScrollUpdatesFromMainThread(
101 property_trees(), pending_tree()); 108 property_trees(), pending_tree());
102 return pending_tree()->root_layer_for_testing(); 109 return pending_tree()->root_layer_for_testing();
103 } 110 }
104 111
105 } // namespace cc 112 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_position_constraint_unittest.cc ('k') | cc/test/layer_tree_test.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698