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

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

Issue 2159513003: Setup LayerTree class, refactor 2 functions from LayerTreeHost to it. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Layer GetLayerTree now directly uses LayerTree pointer. 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
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 <memory> 8 #include <memory>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
11 #include "cc/base/cc_export.h" 11 #include "cc/base/cc_export.h"
12 12
13 namespace cc { 13 namespace cc {
14 14
15 class LayerImpl; 15 class LayerImpl;
16 class LayerTree;
16 class LayerTreeHost; 17 class LayerTreeHost;
17 class LayerTreeImpl; 18 class LayerTreeImpl;
18 class Layer; 19 class Layer;
19 20
20 class CC_EXPORT TreeSynchronizer { 21 class CC_EXPORT TreeSynchronizer {
21 public: 22 public:
22 // Accepts a Layer tree and returns a reference to a LayerImpl tree that 23 // Accepts a Layer tree and returns a reference to a LayerImpl tree that
23 // duplicates the structure of the Layer tree, reusing the LayerImpls in the 24 // duplicates the structure of the Layer tree, reusing the LayerImpls in the
24 // tree provided by old_layer_impl_root if possible. 25 // tree provided by old_layer_impl_root if possible.
25 static void SynchronizeTrees(Layer* layer_root, LayerTreeImpl* tree_impl); 26 static void SynchronizeTrees(Layer* layer_root, LayerTreeImpl* tree_impl);
26 static void SynchronizeTrees(LayerTreeImpl* pending_tree, 27 static void SynchronizeTrees(LayerTreeImpl* pending_tree,
27 LayerTreeImpl* active_tree); 28 LayerTreeImpl* active_tree);
28 29
29 static void PushLayerProperties(LayerTreeImpl* pending_tree, 30 static void PushLayerProperties(LayerTreeImpl* pending_tree,
30 LayerTreeImpl* active_tree); 31 LayerTreeImpl* active_tree);
31 static void PushLayerProperties(LayerTreeHost* host_tree, 32 static void PushLayerProperties(LayerTree* host_tree,
32 LayerTreeImpl* impl_tree); 33 LayerTreeImpl* impl_tree);
33 34
34 private: 35 private:
35 TreeSynchronizer(); // Not instantiable. 36 TreeSynchronizer(); // Not instantiable.
36 37
37 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer); 38 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer);
38 }; 39 };
39 40
40 } // namespace cc 41 } // namespace cc
41 42
42 #endif // CC_TREES_TREE_SYNCHRONIZER_H_ 43 #endif // CC_TREES_TREE_SYNCHRONIZER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698