| 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 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 } | 467 } |
| 468 void set_visible_layer_rect(const gfx::Rect& rect) { | 468 void set_visible_layer_rect(const gfx::Rect& rect) { |
| 469 visible_layer_rect_ = rect; | 469 visible_layer_rect_ = rect; |
| 470 } | 470 } |
| 471 | 471 |
| 472 void set_clip_rect(const gfx::Rect& rect) {} | 472 void set_clip_rect(const gfx::Rect& rect) {} |
| 473 | 473 |
| 474 void SetSubtreePropertyChanged(); | 474 void SetSubtreePropertyChanged(); |
| 475 bool subtree_property_changed() const { return subtree_property_changed_; } | 475 bool subtree_property_changed() const { return subtree_property_changed_; } |
| 476 | 476 |
| 477 void SetLayerPropertyChanged(); | |
| 478 bool layer_property_changed() const { return layer_property_changed_; } | |
| 479 | |
| 480 void SetMayContainVideo(bool yes); | 477 void SetMayContainVideo(bool yes); |
| 481 | 478 |
| 482 void DidBeginTracing(); | 479 void DidBeginTracing(); |
| 483 | 480 |
| 484 int num_copy_requests_in_target_subtree(); | 481 int num_copy_requests_in_target_subtree(); |
| 485 | 482 |
| 486 void SetElementId(ElementId id); | 483 void SetElementId(ElementId id); |
| 487 ElementId element_id() const { return inputs_.element_id; } | 484 ElementId element_id() const { return inputs_.element_id; } |
| 488 | 485 |
| 489 void SetMutableProperties(uint32_t properties); | 486 void SetMutableProperties(uint32_t properties); |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 716 int clip_tree_index_; | 713 int clip_tree_index_; |
| 717 int scroll_tree_index_; | 714 int scroll_tree_index_; |
| 718 int property_tree_sequence_number_; | 715 int property_tree_sequence_number_; |
| 719 gfx::Vector2dF offset_to_transform_parent_; | 716 gfx::Vector2dF offset_to_transform_parent_; |
| 720 bool should_flatten_transform_from_property_tree_ : 1; | 717 bool should_flatten_transform_from_property_tree_ : 1; |
| 721 bool draws_content_ : 1; | 718 bool draws_content_ : 1; |
| 722 bool use_local_transform_for_backface_visibility_ : 1; | 719 bool use_local_transform_for_backface_visibility_ : 1; |
| 723 bool should_check_backface_visibility_ : 1; | 720 bool should_check_backface_visibility_ : 1; |
| 724 bool force_render_surface_for_testing_ : 1; | 721 bool force_render_surface_for_testing_ : 1; |
| 725 bool subtree_property_changed_ : 1; | 722 bool subtree_property_changed_ : 1; |
| 726 bool layer_property_changed_ : 1; | |
| 727 bool may_contain_video_ : 1; | 723 bool may_contain_video_ : 1; |
| 728 SkColor safe_opaque_background_color_; | 724 SkColor safe_opaque_background_color_; |
| 729 // draw_blend_mode may be different than blend_mode_, | 725 // draw_blend_mode may be different than blend_mode_, |
| 730 // when a RenderSurface re-parents the layer's blend_mode. | 726 // when a RenderSurface re-parents the layer's blend_mode. |
| 731 SkXfermode::Mode draw_blend_mode_; | 727 SkXfermode::Mode draw_blend_mode_; |
| 732 std::unique_ptr<std::set<Layer*>> scroll_children_; | 728 std::unique_ptr<std::set<Layer*>> scroll_children_; |
| 733 | 729 |
| 734 std::unique_ptr<std::set<Layer*>> clip_children_; | 730 std::unique_ptr<std::set<Layer*>> clip_children_; |
| 735 | 731 |
| 736 PaintProperties paint_properties_; | 732 PaintProperties paint_properties_; |
| 737 | 733 |
| 738 // These all act like draw properties, so don't need push properties. | 734 // These all act like draw properties, so don't need push properties. |
| 739 gfx::Rect visible_layer_rect_; | 735 gfx::Rect visible_layer_rect_; |
| 740 size_t num_unclipped_descendants_; | 736 size_t num_unclipped_descendants_; |
| 741 | 737 |
| 742 DISALLOW_COPY_AND_ASSIGN(Layer); | 738 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 743 }; | 739 }; |
| 744 | 740 |
| 745 } // namespace cc | 741 } // namespace cc |
| 746 | 742 |
| 747 #endif // CC_LAYERS_LAYER_H_ | 743 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |