OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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_LAYER_TREE_H_ | 5 #ifndef CC_TREES_LAYER_TREE_H_ |
6 #define CC_TREES_LAYER_TREE_H_ | 6 #define CC_TREES_LAYER_TREE_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <unordered_map> | 9 #include <unordered_map> |
10 #include <unordered_set> | 10 #include <unordered_set> |
(...skipping 20 matching lines...) Expand all Loading... |
31 class LayerTree; | 31 class LayerTree; |
32 class LayerUpdate; | 32 class LayerUpdate; |
33 } // namespace proto | 33 } // namespace proto |
34 | 34 |
35 class AnimationHost; | 35 class AnimationHost; |
36 class HeadsUpDisplayLayer; | 36 class HeadsUpDisplayLayer; |
37 class Layer; | 37 class Layer; |
38 class LayerTreeHost; | 38 class LayerTreeHost; |
39 class LayerTreeImpl; | 39 class LayerTreeImpl; |
40 struct PendingPageScaleAnimation; | 40 struct PendingPageScaleAnimation; |
| 41 class SwapPromiseManager; |
| 42 class SurfaceSequenceGenerator; |
41 | 43 |
42 class CC_EXPORT LayerTree : public MutatorHostClient { | 44 class CC_EXPORT LayerTree : public MutatorHostClient { |
43 public: | 45 public: |
44 using LayerSet = std::unordered_set<Layer*>; | 46 using LayerSet = std::unordered_set<Layer*>; |
45 using LayerIdMap = std::unordered_map<int, Layer*>; | 47 using LayerIdMap = std::unordered_map<int, Layer*>; |
46 | 48 |
47 LayerTree(std::unique_ptr<AnimationHost> animation_host, | 49 LayerTree(std::unique_ptr<AnimationHost> animation_host, |
48 LayerTreeHost* layer_tree_host); | 50 LayerTreeHost* layer_tree_host); |
49 virtual ~LayerTree(); | 51 virtual ~LayerTree(); |
50 | 52 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
113 float device_scale_factor() const { return inputs_.device_scale_factor; } | 115 float device_scale_factor() const { return inputs_.device_scale_factor; } |
114 | 116 |
115 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); | 117 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); |
116 | 118 |
117 // Used externally by blink for setting the PropertyTrees when | 119 // Used externally by blink for setting the PropertyTrees when |
118 // |settings_.use_layer_lists| is true. This is a SPV2 setting. | 120 // |settings_.use_layer_lists| is true. This is a SPV2 setting. |
119 PropertyTrees* property_trees() { return &property_trees_; } | 121 PropertyTrees* property_trees() { return &property_trees_; } |
120 | 122 |
121 void SetNeedsDisplayOnAllLayers(); | 123 void SetNeedsDisplayOnAllLayers(); |
122 | 124 |
| 125 SwapPromiseManager* GetSwapPromiseManager() const; |
| 126 SurfaceSequenceGenerator* GetSurfaceSequenceGenerator() const; |
| 127 |
123 // Methods which should only be used internally in cc ------------------ | 128 // Methods which should only be used internally in cc ------------------ |
124 void RegisterLayer(Layer* layer); | 129 void RegisterLayer(Layer* layer); |
125 void UnregisterLayer(Layer* layer); | 130 void UnregisterLayer(Layer* layer); |
126 Layer* LayerById(int id) const; | 131 Layer* LayerById(int id) const; |
127 | 132 |
128 bool UpdateLayers(const LayerList& update_layer_list, | 133 bool UpdateLayers(const LayerList& update_layer_list, |
129 bool* content_is_suitable_for_gpu); | 134 bool* content_is_suitable_for_gpu); |
130 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 135 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
131 | 136 |
132 void AddLayerShouldPushProperties(Layer* layer); | 137 void AddLayerShouldPushProperties(Layer* layer); |
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 | 280 |
276 std::unique_ptr<AnimationHost> animation_host_; | 281 std::unique_ptr<AnimationHost> animation_host_; |
277 LayerTreeHost* layer_tree_host_; | 282 LayerTreeHost* layer_tree_host_; |
278 | 283 |
279 DISALLOW_COPY_AND_ASSIGN(LayerTree); | 284 DISALLOW_COPY_AND_ASSIGN(LayerTree); |
280 }; | 285 }; |
281 | 286 |
282 } // namespace cc | 287 } // namespace cc |
283 | 288 |
284 #endif // CC_TREES_LAYER_TREE_H_ | 289 #endif // CC_TREES_LAYER_TREE_H_ |
OLD | NEW |