| 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 22 matching lines...) Expand all Loading... |
| 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 class LayerTreeSettings; | 40 class LayerTreeSettings; |
| 41 struct PendingPageScaleAnimation; | 41 struct PendingPageScaleAnimation; |
| 42 class UIResourceManager; | 42 class UIResourceManager; |
| 43 class SwapPromiseManager; |
| 44 class SurfaceSequenceGenerator; |
| 43 | 45 |
| 44 class CC_EXPORT LayerTree : public MutatorHostClient { | 46 class CC_EXPORT LayerTree : public MutatorHostClient { |
| 45 public: | 47 public: |
| 46 using LayerSet = std::unordered_set<Layer*>; | 48 using LayerSet = std::unordered_set<Layer*>; |
| 47 using LayerIdMap = std::unordered_map<int, Layer*>; | 49 using LayerIdMap = std::unordered_map<int, Layer*>; |
| 48 | 50 |
| 49 LayerTree(std::unique_ptr<AnimationHost> animation_host, | 51 LayerTree(std::unique_ptr<AnimationHost> animation_host, |
| 50 LayerTreeHost* layer_tree_host); | 52 LayerTreeHost* layer_tree_host); |
| 51 virtual ~LayerTree(); | 53 virtual ~LayerTree(); |
| 52 | 54 |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 117 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); | 119 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor); |
| 118 | 120 |
| 119 // Used externally by blink for setting the PropertyTrees when | 121 // Used externally by blink for setting the PropertyTrees when |
| 120 // |settings_.use_layer_lists| is true. This is a SPV2 setting. | 122 // |settings_.use_layer_lists| is true. This is a SPV2 setting. |
| 121 PropertyTrees* property_trees() { return &property_trees_; } | 123 PropertyTrees* property_trees() { return &property_trees_; } |
| 122 | 124 |
| 123 void SetNeedsDisplayOnAllLayers(); | 125 void SetNeedsDisplayOnAllLayers(); |
| 124 | 126 |
| 125 UIResourceManager* GetUIResourceManager() const; | 127 UIResourceManager* GetUIResourceManager() const; |
| 126 const LayerTreeSettings& GetSettings() const; | 128 const LayerTreeSettings& GetSettings() const; |
| 129 SwapPromiseManager* GetSwapPromiseManager() const; |
| 130 SurfaceSequenceGenerator* GetSurfaceSequenceGenerator() const; |
| 127 | 131 |
| 128 // Methods which should only be used internally in cc ------------------ | 132 // Methods which should only be used internally in cc ------------------ |
| 129 void RegisterLayer(Layer* layer); | 133 void RegisterLayer(Layer* layer); |
| 130 void UnregisterLayer(Layer* layer); | 134 void UnregisterLayer(Layer* layer); |
| 131 Layer* LayerById(int id) const; | 135 Layer* LayerById(int id) const; |
| 132 | 136 |
| 133 bool UpdateLayers(const LayerList& update_layer_list, | 137 bool UpdateLayers(const LayerList& update_layer_list, |
| 134 bool* content_is_suitable_for_gpu); | 138 bool* content_is_suitable_for_gpu); |
| 135 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 139 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 136 | 140 |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 280 | 284 |
| 281 std::unique_ptr<AnimationHost> animation_host_; | 285 std::unique_ptr<AnimationHost> animation_host_; |
| 282 LayerTreeHost* layer_tree_host_; | 286 LayerTreeHost* layer_tree_host_; |
| 283 | 287 |
| 284 DISALLOW_COPY_AND_ASSIGN(LayerTree); | 288 DISALLOW_COPY_AND_ASSIGN(LayerTree); |
| 285 }; | 289 }; |
| 286 | 290 |
| 287 } // namespace cc | 291 } // namespace cc |
| 288 | 292 |
| 289 #endif // CC_TREES_LAYER_TREE_H_ | 293 #endif // CC_TREES_LAYER_TREE_H_ |
| OLD | NEW |