Chromium Code Reviews| OLD | NEW |
|---|---|
| 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); |
| 32 static void PushLayerProperties(LayerTree* host_tree, | |
| 33 LayerTreeImpl* impl_tree); | |
| 31 static void PushLayerProperties(LayerTreeHost* host_tree, | 34 static void PushLayerProperties(LayerTreeHost* host_tree, |
|
Khushal
2016/07/20 00:46:52
Is there a reason why we still need the the PushPr
xingliu
2016/07/20 20:33:06
Fixed.
| |
| 32 LayerTreeImpl* impl_tree); | 35 LayerTreeImpl* impl_tree); |
| 33 | 36 |
| 34 private: | 37 private: |
| 35 TreeSynchronizer(); // Not instantiable. | 38 TreeSynchronizer(); // Not instantiable. |
| 36 | 39 |
| 37 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer); | 40 DISALLOW_COPY_AND_ASSIGN(TreeSynchronizer); |
| 38 }; | 41 }; |
| 39 | 42 |
| 40 } // namespace cc | 43 } // namespace cc |
| 41 | 44 |
| 42 #endif // CC_TREES_TREE_SYNCHRONIZER_H_ | 45 #endif // CC_TREES_TREE_SYNCHRONIZER_H_ |
| OLD | NEW |