| 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 323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 334 void UnregisterLayer(Layer* layer); | 334 void UnregisterLayer(Layer* layer); |
| 335 Layer* LayerById(int id) const; | 335 Layer* LayerById(int id) const; |
| 336 | 336 |
| 337 size_t NumLayers() const; | 337 size_t NumLayers() const; |
| 338 | 338 |
| 339 bool in_update_property_trees() const { return in_update_property_trees_; } | 339 bool in_update_property_trees() const { return in_update_property_trees_; } |
| 340 bool PaintContent(const LayerList& update_layer_list, | 340 bool PaintContent(const LayerList& update_layer_list, |
| 341 bool* content_is_suitable_for_gpu); | 341 bool* content_is_suitable_for_gpu); |
| 342 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } | 342 bool in_paint_layer_contents() const { return in_paint_layer_contents_; } |
| 343 | 343 |
| 344 void SetHasCopyRequest(bool has_copy_request); |
| 345 bool has_copy_request() const { return has_copy_request_; } |
| 346 |
| 344 void AddLayerShouldPushProperties(Layer* layer); | 347 void AddLayerShouldPushProperties(Layer* layer); |
| 345 void RemoveLayerShouldPushProperties(Layer* layer); | 348 void RemoveLayerShouldPushProperties(Layer* layer); |
| 346 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); | 349 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); |
| 347 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; | 350 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; |
| 348 | 351 |
| 349 void SetPageScaleFromImplSide(float page_scale); | 352 void SetPageScaleFromImplSide(float page_scale); |
| 350 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll); | 353 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll); |
| 351 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } | 354 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } |
| 352 | 355 |
| 353 void UpdateHudLayer(bool show_hud_info); | 356 void UpdateHudLayer(bool show_hud_info); |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 std::unordered_set<Layer*> layers_that_should_push_properties_; | 607 std::unordered_set<Layer*> layers_that_should_push_properties_; |
| 605 | 608 |
| 606 // Layer id to Layer map. | 609 // Layer id to Layer map. |
| 607 std::unordered_map<int, Layer*> layer_id_map_; | 610 std::unordered_map<int, Layer*> layer_id_map_; |
| 608 | 611 |
| 609 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; | 612 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; |
| 610 | 613 |
| 611 bool in_paint_layer_contents_ = false; | 614 bool in_paint_layer_contents_ = false; |
| 612 bool in_update_property_trees_ = false; | 615 bool in_update_property_trees_ = false; |
| 613 | 616 |
| 617 // This is true if atleast one layer in the layer tree has a copy request. We |
| 618 // use this bool to decide whether we need to compute subtree has copy request |
| 619 // for every layer during property tree building. |
| 620 bool has_copy_request_ = false; |
| 621 |
| 614 MutatorHost* mutator_host_; | 622 MutatorHost* mutator_host_; |
| 615 | 623 |
| 616 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>> | 624 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>> |
| 617 queued_image_decodes_; | 625 queued_image_decodes_; |
| 618 | 626 |
| 619 bool did_navigate_ = false; | 627 bool did_navigate_ = false; |
| 620 | 628 |
| 621 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 629 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
| 622 }; | 630 }; |
| 623 | 631 |
| 624 } // namespace cc | 632 } // namespace cc |
| 625 | 633 |
| 626 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 634 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
| OLD | NEW |