OLD | NEW |
1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 365 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 376 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
377 if (should_flatten_transform_from_property_tree_ == should_flatten) | 377 if (should_flatten_transform_from_property_tree_ == should_flatten) |
378 return; | 378 return; |
379 should_flatten_transform_from_property_tree_ = should_flatten; | 379 should_flatten_transform_from_property_tree_ = should_flatten; |
380 SetNeedsPushProperties(); | 380 SetNeedsPushProperties(); |
381 } | 381 } |
382 bool should_flatten_transform_from_property_tree() const { | 382 bool should_flatten_transform_from_property_tree() const { |
383 return should_flatten_transform_from_property_tree_; | 383 return should_flatten_transform_from_property_tree_; |
384 } | 384 } |
385 | 385 |
| 386 void SetIsHidden(bool is_hidden); |
| 387 |
| 388 bool is_hidden() const { return is_hidden_; } |
| 389 |
386 const gfx::Rect& visible_layer_rect_for_testing() const { | 390 const gfx::Rect& visible_layer_rect_for_testing() const { |
387 return visible_layer_rect_; | 391 return visible_layer_rect_; |
388 } | 392 } |
389 void set_visible_layer_rect(const gfx::Rect& rect) { | 393 void set_visible_layer_rect(const gfx::Rect& rect) { |
390 visible_layer_rect_ = rect; | 394 visible_layer_rect_ = rect; |
391 } | 395 } |
392 | 396 |
393 // This is for tracking damage. | 397 // This is for tracking damage. |
394 void SetSubtreePropertyChanged(); | 398 void SetSubtreePropertyChanged(); |
395 bool subtree_property_changed() const { return subtree_property_changed_; } | 399 bool subtree_property_changed() const { return subtree_property_changed_; } |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
622 | 626 |
623 int num_descendants_that_draw_content_; | 627 int num_descendants_that_draw_content_; |
624 int transform_tree_index_; | 628 int transform_tree_index_; |
625 int effect_tree_index_; | 629 int effect_tree_index_; |
626 int clip_tree_index_; | 630 int clip_tree_index_; |
627 int scroll_tree_index_; | 631 int scroll_tree_index_; |
628 int property_tree_sequence_number_; | 632 int property_tree_sequence_number_; |
629 gfx::Vector2dF offset_to_transform_parent_; | 633 gfx::Vector2dF offset_to_transform_parent_; |
630 bool should_flatten_transform_from_property_tree_ : 1; | 634 bool should_flatten_transform_from_property_tree_ : 1; |
631 bool draws_content_ : 1; | 635 bool draws_content_ : 1; |
| 636 bool is_hidden_ : 1; |
632 bool should_check_backface_visibility_ : 1; | 637 bool should_check_backface_visibility_ : 1; |
633 bool force_render_surface_for_testing_ : 1; | 638 bool force_render_surface_for_testing_ : 1; |
634 bool subtree_property_changed_ : 1; | 639 bool subtree_property_changed_ : 1; |
635 bool may_contain_video_ : 1; | 640 bool may_contain_video_ : 1; |
636 bool is_scroll_clip_layer_ : 1; | 641 bool is_scroll_clip_layer_ : 1; |
637 bool needs_show_scrollbars_ : 1; | 642 bool needs_show_scrollbars_ : 1; |
638 // Whether the nodes referred to by *_tree_index_ | 643 // Whether the nodes referred to by *_tree_index_ |
639 // "belong" to this layer. Only applicable if use_layer_lists is false. | 644 // "belong" to this layer. Only applicable if use_layer_lists is false. |
640 bool has_transform_node_ : 1; | 645 bool has_transform_node_ : 1; |
641 bool has_scroll_node_ : 1; | 646 bool has_scroll_node_ : 1; |
642 // This value is valid only when LayerTreeHost::has_copy_request() is true | 647 // This value is valid only when LayerTreeHost::has_copy_request() is true |
643 bool subtree_has_copy_request_ : 1; | 648 bool subtree_has_copy_request_ : 1; |
644 SkColor safe_opaque_background_color_; | 649 SkColor safe_opaque_background_color_; |
645 std::unique_ptr<std::set<Layer*>> scroll_children_; | 650 std::unique_ptr<std::set<Layer*>> scroll_children_; |
646 | 651 |
647 std::unique_ptr<std::set<Layer*>> clip_children_; | 652 std::unique_ptr<std::set<Layer*>> clip_children_; |
648 | 653 |
649 // These all act like draw properties, so don't need push properties. | 654 // These all act like draw properties, so don't need push properties. |
650 gfx::Rect visible_layer_rect_; | 655 gfx::Rect visible_layer_rect_; |
651 size_t num_unclipped_descendants_; | 656 size_t num_unclipped_descendants_; |
652 | 657 |
653 DISALLOW_COPY_AND_ASSIGN(Layer); | 658 DISALLOW_COPY_AND_ASSIGN(Layer); |
654 }; | 659 }; |
655 | 660 |
656 } // namespace cc | 661 } // namespace cc |
657 | 662 |
658 #endif // CC_LAYERS_LAYER_H_ | 663 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |