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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void set_use_parent_backface_visibility(bool use) { | 323 void set_use_parent_backface_visibility(bool use) { |
324 use_parent_backface_visibility_ = use; | 324 use_parent_backface_visibility_ = use; |
325 } | 325 } |
326 bool use_parent_backface_visibility() const { | 326 bool use_parent_backface_visibility() const { |
327 return use_parent_backface_visibility_; | 327 return use_parent_backface_visibility_; |
328 } | 328 } |
329 | 329 |
330 virtual void SetLayerTreeHost(LayerTreeHost* host); | 330 virtual void SetLayerTreeHost(LayerTreeHost* host); |
331 | 331 |
332 virtual bool HasDelegatedContent() const; | 332 virtual bool HasDelegatedContent() const; |
| 333 bool IsDrawnFromPropertyTrees() const; |
333 bool HasContributingDelegatedRenderPasses() const { return false; } | 334 bool HasContributingDelegatedRenderPasses() const { return false; } |
334 | 335 |
335 void SetIsDrawable(bool is_drawable); | 336 void SetIsDrawable(bool is_drawable); |
336 | 337 |
337 void SetHideLayerAndSubtree(bool hide); | |
338 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | |
339 | |
340 void SetReplicaLayer(Layer* layer); | 338 void SetReplicaLayer(Layer* layer); |
341 Layer* replica_layer() { return replica_layer_.get(); } | 339 Layer* replica_layer() { return replica_layer_.get(); } |
342 const Layer* replica_layer() const { return replica_layer_.get(); } | 340 const Layer* replica_layer() const { return replica_layer_.get(); } |
343 | 341 |
344 bool has_mask() const { return !!mask_layer_.get(); } | 342 bool has_mask() const { return !!mask_layer_.get(); } |
345 bool has_replica() const { return !!replica_layer_.get(); } | 343 bool has_replica() const { return !!replica_layer_.get(); } |
346 bool replica_has_mask() const { | 344 bool replica_has_mask() const { |
347 return replica_layer_.get() && | 345 return replica_layer_.get() && |
348 (mask_layer_.get() || replica_layer_->mask_layer_.get()); | 346 (mask_layer_.get() || replica_layer_->mask_layer_.get()); |
349 } | 347 } |
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
551 | 549 |
552 void SetMutableProperties(uint32_t properties); | 550 void SetMutableProperties(uint32_t properties); |
553 uint32_t mutable_properties() const { return mutable_properties_; } | 551 uint32_t mutable_properties() const { return mutable_properties_; } |
554 | 552 |
555 void set_visited(bool visited); | 553 void set_visited(bool visited); |
556 bool visited(); | 554 bool visited(); |
557 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); | 555 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); |
558 bool layer_or_descendant_is_drawn(); | 556 bool layer_or_descendant_is_drawn(); |
559 void set_sorted_for_recursion(bool sorted_for_recursion); | 557 void set_sorted_for_recursion(bool sorted_for_recursion); |
560 bool sorted_for_recursion(); | 558 bool sorted_for_recursion(); |
561 void set_is_hidden_from_property_trees(bool is_hidden) { | |
562 if (is_hidden == is_hidden_from_property_trees_) | |
563 return; | |
564 is_hidden_from_property_trees_ = is_hidden; | |
565 SetNeedsPushProperties(); | |
566 } | |
567 | 559 |
568 // LayerAnimationValueProvider implementation. | 560 // LayerAnimationValueProvider implementation. |
569 gfx::ScrollOffset ScrollOffsetForAnimation() const override; | 561 gfx::ScrollOffset ScrollOffsetForAnimation() const override; |
570 | 562 |
571 // LayerAnimationValueObserver implementation. | 563 // LayerAnimationValueObserver implementation. |
572 void OnFilterAnimated(const FilterOperations& filters) override; | 564 void OnFilterAnimated(const FilterOperations& filters) override; |
573 void OnOpacityAnimated(float opacity) override; | 565 void OnOpacityAnimated(float opacity) override; |
574 void OnTransformAnimated(const gfx::Transform& transform) override; | 566 void OnTransformAnimated(const gfx::Transform& transform) override; |
575 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; | 567 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |
576 void OnAnimationWaitingForDeletion() override; | 568 void OnAnimationWaitingForDeletion() override; |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 bool should_flatten_transform_from_property_tree_ : 1; | 718 bool should_flatten_transform_from_property_tree_ : 1; |
727 bool should_scroll_on_main_thread_ : 1; | 719 bool should_scroll_on_main_thread_ : 1; |
728 bool have_wheel_event_handlers_ : 1; | 720 bool have_wheel_event_handlers_ : 1; |
729 bool have_scroll_event_handlers_ : 1; | 721 bool have_scroll_event_handlers_ : 1; |
730 bool user_scrollable_horizontal_ : 1; | 722 bool user_scrollable_horizontal_ : 1; |
731 bool user_scrollable_vertical_ : 1; | 723 bool user_scrollable_vertical_ : 1; |
732 bool is_root_for_isolated_group_ : 1; | 724 bool is_root_for_isolated_group_ : 1; |
733 bool is_container_for_fixed_position_layers_ : 1; | 725 bool is_container_for_fixed_position_layers_ : 1; |
734 bool is_drawable_ : 1; | 726 bool is_drawable_ : 1; |
735 bool draws_content_ : 1; | 727 bool draws_content_ : 1; |
736 bool hide_layer_and_subtree_ : 1; | |
737 bool masks_to_bounds_ : 1; | 728 bool masks_to_bounds_ : 1; |
738 bool contents_opaque_ : 1; | 729 bool contents_opaque_ : 1; |
739 bool double_sided_ : 1; | 730 bool double_sided_ : 1; |
740 bool should_flatten_transform_ : 1; | 731 bool should_flatten_transform_ : 1; |
741 bool use_parent_backface_visibility_ : 1; | 732 bool use_parent_backface_visibility_ : 1; |
742 bool force_render_surface_ : 1; | 733 bool force_render_surface_ : 1; |
743 bool transform_is_invertible_ : 1; | 734 bool transform_is_invertible_ : 1; |
744 bool has_render_surface_ : 1; | 735 bool has_render_surface_ : 1; |
745 ScrollBlocksOn scroll_blocks_on_ : 3; | 736 ScrollBlocksOn scroll_blocks_on_ : 3; |
746 Region non_fast_scrollable_region_; | 737 Region non_fast_scrollable_region_; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
783 | 774 |
784 PaintProperties paint_properties_; | 775 PaintProperties paint_properties_; |
785 | 776 |
786 // These all act like draw properties, so don't need push properties. | 777 // These all act like draw properties, so don't need push properties. |
787 gfx::Rect visible_layer_rect_; | 778 gfx::Rect visible_layer_rect_; |
788 gfx::Rect clip_rect_; | 779 gfx::Rect clip_rect_; |
789 size_t num_unclipped_descendants_; | 780 size_t num_unclipped_descendants_; |
790 | 781 |
791 std::vector<FrameTimingRequest> frame_timing_requests_; | 782 std::vector<FrameTimingRequest> frame_timing_requests_; |
792 bool frame_timing_requests_dirty_; | 783 bool frame_timing_requests_dirty_; |
793 bool is_hidden_from_property_trees_; | |
794 | 784 |
795 DISALLOW_COPY_AND_ASSIGN(Layer); | 785 DISALLOW_COPY_AND_ASSIGN(Layer); |
796 }; | 786 }; |
797 | 787 |
798 } // namespace cc | 788 } // namespace cc |
799 | 789 |
800 #endif // CC_LAYERS_LAYER_H_ | 790 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |