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 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 AddLayerShouldPushProperties(Layer* layer); | 344 void AddLayerShouldPushProperties(Layer* layer); |
345 void RemoveLayerShouldPushProperties(Layer* layer); | 345 void RemoveLayerShouldPushProperties(Layer* layer); |
346 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); | 346 std::unordered_set<Layer*>& LayersThatShouldPushProperties(); |
347 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; | 347 bool LayerNeedsPushPropertiesForTesting(Layer* layer) const; |
348 | 348 |
349 virtual void SetNeedsMetaInfoRecomputation( | |
350 bool needs_meta_info_recomputation); | |
351 bool needs_meta_info_recomputation() const { | |
352 return needs_meta_info_recomputation_; | |
353 } | |
354 | |
355 void SetPageScaleFromImplSide(float page_scale); | 349 void SetPageScaleFromImplSide(float page_scale); |
356 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll); | 350 void SetElasticOverscrollFromImplSide(gfx::Vector2dF elastic_overscroll); |
357 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } | 351 gfx::Vector2dF elastic_overscroll() const { return elastic_overscroll_; } |
358 | 352 |
359 void UpdateHudLayer(bool show_hud_info); | 353 void UpdateHudLayer(bool show_hud_info); |
360 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } | 354 HeadsUpDisplayLayer* hud_layer() const { return hud_layer_.get(); } |
361 | 355 |
362 virtual void SetNeedsFullTreeSync(); | 356 virtual void SetNeedsFullTreeSync(); |
363 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } | 357 bool needs_full_tree_sync() const { return needs_full_tree_sync_; } |
364 | 358 |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 | 587 |
594 bool have_scroll_event_handlers_ = false; | 588 bool have_scroll_event_handlers_ = false; |
595 EventListenerProperties event_listener_properties_[static_cast<size_t>( | 589 EventListenerProperties event_listener_properties_[static_cast<size_t>( |
596 EventListenerClass::kNumClasses)]; | 590 EventListenerClass::kNumClasses)]; |
597 | 591 |
598 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 592 std::unique_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
599 | 593 |
600 PropertyTrees property_trees_; | 594 PropertyTrees property_trees_; |
601 | 595 |
602 bool needs_full_tree_sync_ = true; | 596 bool needs_full_tree_sync_ = true; |
603 bool needs_meta_info_recomputation_ = true; | |
604 | 597 |
605 gfx::Vector2dF elastic_overscroll_; | 598 gfx::Vector2dF elastic_overscroll_; |
606 | 599 |
607 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; | 600 scoped_refptr<HeadsUpDisplayLayer> hud_layer_; |
608 | 601 |
609 // Set of layers that need to push properties. | 602 // Set of layers that need to push properties. |
610 std::unordered_set<Layer*> layers_that_should_push_properties_; | 603 std::unordered_set<Layer*> layers_that_should_push_properties_; |
611 | 604 |
612 // Layer id to Layer map. | 605 // Layer id to Layer map. |
613 std::unordered_map<int, Layer*> layer_id_map_; | 606 std::unordered_map<int, Layer*> layer_id_map_; |
614 | 607 |
615 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; | 608 std::unordered_map<ElementId, Layer*, ElementIdHash> element_layers_map_; |
616 | 609 |
617 bool in_paint_layer_contents_ = false; | 610 bool in_paint_layer_contents_ = false; |
618 bool in_update_property_trees_ = false; | 611 bool in_update_property_trees_ = false; |
619 | 612 |
620 MutatorHost* mutator_host_; | 613 MutatorHost* mutator_host_; |
621 | 614 |
622 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>> | 615 std::vector<std::pair<sk_sp<const SkImage>, base::Callback<void(bool)>>> |
623 queued_image_decodes_; | 616 queued_image_decodes_; |
624 | 617 |
625 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); | 618 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); |
626 }; | 619 }; |
627 | 620 |
628 } // namespace cc | 621 } // namespace cc |
629 | 622 |
630 #endif // CC_TREES_LAYER_TREE_HOST_H_ | 623 #endif // CC_TREES_LAYER_TREE_HOST_H_ |
OLD | NEW |