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

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

Issue 1801853002: Transfer LayerImpl ownership to LayerTreeImpl (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more asan. Created 4 years, 9 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/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer.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 #ifndef CC_TREES_TREE_SYNCHRONIZER_H_ 5 #ifndef CC_TREES_TREE_SYNCHRONIZER_H_
6 #define CC_TREES_TREE_SYNCHRONIZER_H_ 6 #define CC_TREES_TREE_SYNCHRONIZER_H_
7 7
8 #include "base/macros.h" 8 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "cc/base/cc_export.h" 10 #include "cc/base/cc_export.h"
11 11
12 namespace cc { 12 namespace cc {
13 13
14 class LayerImpl; 14 class LayerImpl;
15 class LayerTreeHost; 15 class LayerTreeHost;
16 class LayerTreeImpl; 16 class LayerTreeImpl;
17 class Layer; 17 class Layer;
18 18
19 class CC_EXPORT TreeSynchronizer { 19 class CC_EXPORT TreeSynchronizer {
20 public: 20 public:
21 // Accepts a Layer tree and returns a reference to a LayerImpl tree that 21 // Accepts a Layer tree and returns a reference to a LayerImpl tree that
22 // duplicates the structure of the Layer tree, reusing the LayerImpls in the 22 // duplicates the structure of the Layer tree, reusing the LayerImpls in the
23 // tree provided by old_layer_impl_root if possible. 23 // tree provided by old_layer_impl_root if possible.
24 static scoped_ptr<LayerImpl> SynchronizeTrees( 24 static void SynchronizeTrees(Layer* layer_root, LayerTreeImpl* tree_impl);
25 Layer* layer_root, 25 static void SynchronizeTrees(LayerImpl* layer_root, LayerTreeImpl* tree_impl);
26 scoped_ptr<LayerImpl> old_layer_impl_root, 26
27 LayerTreeImpl* tree_impl);
28 static scoped_ptr<LayerImpl> SynchronizeTrees(
29 LayerImpl* layer_root,
30 scoped_ptr<LayerImpl> old_layer_impl_root,
31 LayerTreeImpl* tree_impl);
32 static void PushLayerProperties(LayerTreeImpl* pending_tree, 27 static void PushLayerProperties(LayerTreeImpl* pending_tree,
33 LayerTreeImpl* active_tree); 28 LayerTreeImpl* active_tree);
34 static void PushLayerProperties(LayerTreeHost* host_tree, 29 static void PushLayerProperties(LayerTreeHost* host_tree,
35 LayerTreeImpl* impl_tree); 30 LayerTreeImpl* impl_tree);
36 31
37 private: 32 private:
38 TreeSynchronizer(); // Not instantiable. 33 TreeSynchronizer(); // Not instantiable.
39 34
40 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer); 35 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer);
41 }; 36 };
42 37
43 } // namespace cc 38 } // namespace cc
44 39
45 #endif // CC_TREES_TREE_SYNCHRONIZER_H_ 40 #endif // CC_TREES_TREE_SYNCHRONIZER_H_
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_impl_unittest.cc ('k') | cc/trees/tree_synchronizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698