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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
134 | 134 |
135 void SetNeedsCommit(); | 135 void SetNeedsCommit(); |
136 | 136 |
137 const LayerTreeSettings& GetSettings() const; | 137 const LayerTreeSettings& GetSettings() const; |
138 | 138 |
139 // Methods which should only be used internally in cc ------------------ | 139 // Methods which should only be used internally in cc ------------------ |
140 void RegisterLayer(Layer* layer); | 140 void RegisterLayer(Layer* layer); |
141 void UnregisterLayer(Layer* layer); | 141 void UnregisterLayer(Layer* layer); |
142 Layer* LayerById(int id) const; | 142 Layer* LayerById(int id) const; |
143 | 143 |
| 144 size_t NumLayers() const; |
| 145 |
144 bool UpdateLayers(const LayerList& update_layer_list, | 146 bool UpdateLayers(const LayerList& update_layer_list, |
145 bool* content_is_suitable_for_gpu); | 147 bool* content_is_suitable_for_gpu); |
146 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 148 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
147 | 149 |
148 void AddLayerShouldPushProperties(Layer* layer); | 150 void AddLayerShouldPushProperties(Layer* layer); |
149 void RemoveLayerShouldPushProperties(Layer* layer); | 151 void RemoveLayerShouldPushProperties(Layer* layer); |
150 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); | 152 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); |
151 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; | 153 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; |
152 | 154 |
153 virtual void SetNeedsMetaInfoRecomputation( | 155 virtual void SetNeedsMetaInfoRecomputation( |
(...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
305 // external embedder. | 307 // external embedder. |
306 EnginePictureCache* engine_picture_cache_; | 308 EnginePictureCache* engine_picture_cache_; |
307 ClientPictureCache* client_picture_cache_; | 309 ClientPictureCache* client_picture_cache_; |
308 | 310 |
309 DISALLOW_COPY_AND_ASSIGN(LayerTree); | 311 DISALLOW_COPY_AND_ASSIGN(LayerTree); |
310 }; | 312 }; |
311 | 313 |
312 } // namespace cc | 314 } // namespace cc |
313 | 315 |
314 #endif // CC_TREES_LAYER_TREE_H_ | 316 #endif // CC_TREES_LAYER_TREE_H_ |
OLD | NEW |