| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 380 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
| 381 if (should_flatten_transform_from_property_tree_ == should_flatten) | 381 if (should_flatten_transform_from_property_tree_ == should_flatten) |
| 382 return; | 382 return; |
| 383 should_flatten_transform_from_property_tree_ = should_flatten; | 383 should_flatten_transform_from_property_tree_ = should_flatten; |
| 384 SetNeedsPushProperties(); | 384 SetNeedsPushProperties(); |
| 385 } | 385 } |
| 386 bool should_flatten_transform_from_property_tree() const { | 386 bool should_flatten_transform_from_property_tree() const { |
| 387 return should_flatten_transform_from_property_tree_; | 387 return should_flatten_transform_from_property_tree_; |
| 388 } | 388 } |
| 389 | 389 |
| 390 void SetIsHidden(bool is_hidden); |
| 391 |
| 392 bool is_hidden() const { return is_hidden_; } |
| 393 |
| 390 const gfx::Rect& visible_layer_rect_for_testing() const { | 394 const gfx::Rect& visible_layer_rect_for_testing() const { |
| 391 return visible_layer_rect_; | 395 return visible_layer_rect_; |
| 392 } | 396 } |
| 393 void set_visible_layer_rect(const gfx::Rect& rect) { | 397 void set_visible_layer_rect(const gfx::Rect& rect) { |
| 394 visible_layer_rect_ = rect; | 398 visible_layer_rect_ = rect; |
| 395 } | 399 } |
| 396 | 400 |
| 397 // This is for tracking damage. | 401 // This is for tracking damage. |
| 398 void SetSubtreePropertyChanged(); | 402 void SetSubtreePropertyChanged(); |
| 399 bool subtree_property_changed() const { return subtree_property_changed_; } | 403 bool subtree_property_changed() const { return subtree_property_changed_; } |
| (...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 613 | 617 |
| 614 int num_descendants_that_draw_content_; | 618 int num_descendants_that_draw_content_; |
| 615 int transform_tree_index_; | 619 int transform_tree_index_; |
| 616 int effect_tree_index_; | 620 int effect_tree_index_; |
| 617 int clip_tree_index_; | 621 int clip_tree_index_; |
| 618 int scroll_tree_index_; | 622 int scroll_tree_index_; |
| 619 int property_tree_sequence_number_; | 623 int property_tree_sequence_number_; |
| 620 gfx::Vector2dF offset_to_transform_parent_; | 624 gfx::Vector2dF offset_to_transform_parent_; |
| 621 bool should_flatten_transform_from_property_tree_ : 1; | 625 bool should_flatten_transform_from_property_tree_ : 1; |
| 622 bool draws_content_ : 1; | 626 bool draws_content_ : 1; |
| 627 bool is_hidden_ : 1; |
| 623 bool use_local_transform_for_backface_visibility_ : 1; | 628 bool use_local_transform_for_backface_visibility_ : 1; |
| 624 bool should_check_backface_visibility_ : 1; | 629 bool should_check_backface_visibility_ : 1; |
| 625 bool force_render_surface_for_testing_ : 1; | 630 bool force_render_surface_for_testing_ : 1; |
| 626 bool subtree_property_changed_ : 1; | 631 bool subtree_property_changed_ : 1; |
| 627 bool may_contain_video_ : 1; | 632 bool may_contain_video_ : 1; |
| 628 bool is_scroll_clip_layer_ : 1; | 633 bool is_scroll_clip_layer_ : 1; |
| 629 bool needs_show_scrollbars_ : 1; | 634 bool needs_show_scrollbars_ : 1; |
| 630 // This value is valid only when LayerTreeHost::has_copy_request() is true | 635 // This value is valid only when LayerTreeHost::has_copy_request() is true |
| 631 bool subtree_has_copy_request_ : 1; | 636 bool subtree_has_copy_request_ : 1; |
| 632 SkColor safe_opaque_background_color_; | 637 SkColor safe_opaque_background_color_; |
| 633 std::unique_ptr<std::set<Layer*>> scroll_children_; | 638 std::unique_ptr<std::set<Layer*>> scroll_children_; |
| 634 | 639 |
| 635 std::unique_ptr<std::set<Layer*>> clip_children_; | 640 std::unique_ptr<std::set<Layer*>> clip_children_; |
| 636 | 641 |
| 637 PaintProperties paint_properties_; | 642 PaintProperties paint_properties_; |
| 638 | 643 |
| 639 // These all act like draw properties, so don't need push properties. | 644 // These all act like draw properties, so don't need push properties. |
| 640 gfx::Rect visible_layer_rect_; | 645 gfx::Rect visible_layer_rect_; |
| 641 size_t num_unclipped_descendants_; | 646 size_t num_unclipped_descendants_; |
| 642 | 647 |
| 643 DISALLOW_COPY_AND_ASSIGN(Layer); | 648 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 644 }; | 649 }; |
| 645 | 650 |
| 646 } // namespace cc | 651 } // namespace cc |
| 647 | 652 |
| 648 #endif // CC_LAYERS_LAYER_H_ | 653 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |