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

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

Issue 2216203002: Refactor MutatorHostClient from LayerTreeHost to LayerTree. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase on another LTH refactor CL. Created 4 years, 4 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/trees/property_tree_builder.cc ('k') | cc/trees/tree_synchronizer_unittest.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 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/tree_synchronizer.h" 5 #include "cc/trees/tree_synchronizer.h"
6 6
7 #include <stddef.h> 7 #include <stddef.h>
8 8
9 #include <set> 9 #include <set>
10 10
(...skipping 28 matching lines...) Expand all
39 &old_layer_map, source_tree->LayerById(id), tree_impl)); 39 &old_layer_map, source_tree->LayerById(id), tree_impl));
40 tree_impl->AddLayer(std::move(layer_impl)); 40 tree_impl->AddLayer(std::move(layer_impl));
41 } 41 }
42 } 42 }
43 43
44 void TreeSynchronizer::SynchronizeTrees(Layer* layer_root, 44 void TreeSynchronizer::SynchronizeTrees(Layer* layer_root,
45 LayerTreeImpl* tree_impl) { 45 LayerTreeImpl* tree_impl) {
46 if (!layer_root) { 46 if (!layer_root) {
47 tree_impl->DetachLayers(); 47 tree_impl->DetachLayers();
48 } else { 48 } else {
49 SynchronizeTreesInternal(layer_root->layer_tree_host(), tree_impl, 49 SynchronizeTreesInternal(layer_root->GetLayerTree(), tree_impl,
50 layer_root->GetLayerTree()->property_trees()); 50 layer_root->GetLayerTree()->property_trees());
51 } 51 }
52 } 52 }
53 53
54 void TreeSynchronizer::SynchronizeTrees(LayerTreeImpl* pending_tree, 54 void TreeSynchronizer::SynchronizeTrees(LayerTreeImpl* pending_tree,
55 LayerTreeImpl* active_tree) { 55 LayerTreeImpl* active_tree) {
56 if (pending_tree->LayerListIsEmpty()) { 56 if (pending_tree->LayerListIsEmpty()) {
57 active_tree->DetachLayers(); 57 active_tree->DetachLayers();
58 } else { 58 } else {
59 SynchronizeTreesInternal(pending_tree, active_tree, 59 SynchronizeTreesInternal(pending_tree, active_tree,
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
105 active_tree); 105 active_tree);
106 } 106 }
107 107
108 void TreeSynchronizer::PushLayerProperties(LayerTree* host_tree, 108 void TreeSynchronizer::PushLayerProperties(LayerTree* host_tree,
109 LayerTreeImpl* impl_tree) { 109 LayerTreeImpl* impl_tree) {
110 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(), 110 PushLayerPropertiesInternal(host_tree->LayersThatShouldPushProperties(),
111 impl_tree); 111 impl_tree);
112 } 112 }
113 113
114 } // namespace cc 114 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/property_tree_builder.cc ('k') | cc/trees/tree_synchronizer_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698