| 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_LAYER_TREE_HOST_H_ | 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_ |
| 6 #define CC_TREES_LAYER_TREE_HOST_H_ | 6 #define CC_TREES_LAYER_TREE_HOST_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 304 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 315 PropertyTrees* property_trees() { return &property_trees_; } | 315 PropertyTrees* property_trees() { return &property_trees_; } |
| 316 | 316 |
| 317 void SetNeedsDisplayOnAllLayers(); | 317 void SetNeedsDisplayOnAllLayers(); |
| 318 | 318 |
| 319 void RegisterLayer(Layer* layer); | 319 void RegisterLayer(Layer* layer); |
| 320 void UnregisterLayer(Layer* layer); | 320 void UnregisterLayer(Layer* layer); |
| 321 Layer* LayerById(int id) const; | 321 Layer* LayerById(int id) const; |
| 322 | 322 |
| 323 size_t NumLayers() const; | 323 size_t NumLayers() const; |
| 324 | 324 |
| 325 bool UpdateLayers(const LayerList& update_layer_list, | 325 bool in_update_property_trees() const { return in_update_property_trees_; } |
| 326 bool PaintContent(const LayerList& update_layer_list, |
| 326 bool* content_is_suitable_for_gpu); | 327 bool* content_is_suitable_for_gpu); |
| 327 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 328 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 328 | 329 |
| 329 void AddLayerShouldPushProperties(Layer* layer); | 330 void AddLayerShouldPushProperties(Layer* layer); |
| 330 void RemoveLayerShouldPushProperties(Layer* layer); | 331 void RemoveLayerShouldPushProperties(Layer* layer); |
| 331 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); | 332 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); |
| 332 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; | 333 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; |
| 333 | 334 |
| 334 virtual void SetNeedsMetaInfoRecomputation( | 335 virtual void SetNeedsMetaInfoRecomputation( |
| 335 bool needs_meta_info_recomputation); | 336 bool needs_meta_info_recomputation); |
| (...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 587 | 588 |
| 588 // Set of layers that need to push properties. | 589 // Set of layers that need to push properties. |
| 589 std::unordered_set<Layer*> layers_that_should_push_properties_; | 590 std::unordered_set<Layer*> layers_that_should_push_properties_; |
| 590 | 591 |
| 591 // Layer id to Layer map. | 592 // Layer id to Layer map. |
| 592 std::unordered_map<int, Layer*> layer_id_map_; | 593 std::unordered_map<int, Layer*> layer_id_map_; |
| 593 | 594 |
| 594 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; | 595 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; |
| 595 | 596 |
| 596 bool in_paint_layer_contents_ = false; | 597 bool in_paint_layer_contents_ = false; |
| 598 bool in_update_property_trees_ = false; |
| 597 | 599 |
| 598 MutatorHost* mutator_host_; | 600 MutatorHost* mutator_host_; |
| 599 | 601 |
| 600 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner_; | 602 scoped_refptr<base::SequencedTaskRunner> image_worker_task_runner_; |
| 601 | 603 |
| 602 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 604 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 603 }; | 605 }; |
| 604 | 606 |
| 605 } // namespace cc | 607 } // namespace cc |
| 606 | 608 |
| 607 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 609 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |