OLD | NEW |
---|---|
(Empty) | |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
2 // Use of this source code is governed by a BSD-style license that can be | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef CC_TREES_LAYER_TREE_H_ | |
6 #define CC_TREES_LAYER_TREE_H_ | |
7 | |
8 #include <unordered_map> | |
9 #include <unordered_set> | |
10 | |
11 #include "base/macros.h" | |
12 #include "cc/base/cc_export.h" | |
13 | |
14 namespace cc { | |
15 | |
16 namespace proto { | |
17 class LayerTree; | |
18 } | |
19 | |
20 class Layer; | |
21 | |
22 using LayerSet = std::unordered_set<Layer*>; | |
23 using LayerIdMap = std::unordered_map<int, Layer*>; | |
24 | |
25 class CC_EXPORT LayerTree { | |
Khushal
2016/07/18 16:59:33
I would suggest move Register/UnregisterLayer to t
xingliu
2016/07/19 22:47:38
Register/UnregisterLayer moved to LayerTree.
| |
26 public: | |
27 LayerTree(); | |
28 ~LayerTree(); | |
29 | |
30 void AddLayerShouldPushProperties(Layer* layer); | |
31 void RemoveLayerShouldPushProperties(Layer* layer); | |
32 | |
33 void ToProtobuf(proto::LayerTree* proto); | |
34 void FromProtobuf(const proto::LayerTree& proto, LayerIdMap* layer_id_map); | |
Khushal
2016/07/18 16:59:32
The LayerIdMap would move to the LayerTree, wouldn
xingliu
2016/07/19 22:47:37
Done.
| |
35 LayerSet& layers_that_should_push_properties(); | |
Khushal
2016/07/18 16:59:33
You shouldn't have to expose this after you move t
xingliu
2016/07/19 22:47:37
Done.
| |
36 | |
37 private: | |
38 // Set of layers that need to push properties. | |
39 LayerSet layers_that_should_push_properties_; | |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(LayerTree); | |
42 }; | |
43 | |
44 } // namespace cc | |
45 | |
46 #endif // CC_TREES_LAYER_TREE_H_ | |
OLD | NEW |