| 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_LAYERS_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
| 6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
| 7 | 7 |
| 8 #include <stddef.h> | 8 #include <stddef.h> |
| 9 #include <stdint.h> | 9 #include <stdint.h> |
| 10 | 10 |
| (...skipping 270 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 281 virtual void NotifyTileStateChanged(const Tile* tile) {} | 281 virtual void NotifyTileStateChanged(const Tile* tile) {} |
| 282 | 282 |
| 283 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); | 283 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); |
| 284 | 284 |
| 285 // Returns true if this layer has content to draw. | 285 // Returns true if this layer has content to draw. |
| 286 void SetDrawsContent(bool draws_content); | 286 void SetDrawsContent(bool draws_content); |
| 287 bool DrawsContent() const { return draws_content_; } | 287 bool DrawsContent() const { return draws_content_; } |
| 288 | 288 |
| 289 int NumDescendantsThatDrawContent() const; | 289 int NumDescendantsThatDrawContent() const; |
| 290 void SetHideLayerAndSubtree(bool hide); | 290 void SetHideLayerAndSubtree(bool hide); |
| 291 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; } | |
| 292 | 291 |
| 293 void SetTransformOrigin(const gfx::Point3F& transform_origin); | 292 void SetTransformOrigin(const gfx::Point3F& transform_origin); |
| 294 gfx::Point3F transform_origin() const { return transform_origin_; } | 293 gfx::Point3F transform_origin() const { return transform_origin_; } |
| 295 | 294 |
| 296 void SetBackgroundColor(SkColor background_color); | 295 void SetBackgroundColor(SkColor background_color); |
| 297 SkColor background_color() const { return background_color_; } | 296 SkColor background_color() const { return background_color_; } |
| 298 // If contents_opaque(), return an opaque color else return a | 297 // If contents_opaque(), return an opaque color else return a |
| 299 // non-opaque color. Tries to return background_color(), if possible. | 298 // non-opaque color. Tries to return background_color(), if possible. |
| 300 SkColor SafeOpaqueBackgroundColor() const; | 299 SkColor SafeOpaqueBackgroundColor() const; |
| 301 | 300 |
| (...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 674 | 673 |
| 675 void set_sorted_for_recursion(bool sorted_for_recursion) { | 674 void set_sorted_for_recursion(bool sorted_for_recursion) { |
| 676 sorted_for_recursion_ = sorted_for_recursion; | 675 sorted_for_recursion_ = sorted_for_recursion; |
| 677 } | 676 } |
| 678 bool sorted_for_recursion() { return sorted_for_recursion_; } | 677 bool sorted_for_recursion() { return sorted_for_recursion_; } |
| 679 | 678 |
| 680 int num_copy_requests_in_target_subtree(); | 679 int num_copy_requests_in_target_subtree(); |
| 681 | 680 |
| 682 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); | 681 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); |
| 683 | 682 |
| 684 void set_is_hidden_from_property_trees(bool is_hidden) { | 683 bool IsHidden() const; |
| 685 if (is_hidden == is_hidden_from_property_trees_) | |
| 686 return; | |
| 687 is_hidden_from_property_trees_ = is_hidden; | |
| 688 SetNeedsPushProperties(); | |
| 689 } | |
| 690 bool LayerIsHidden() const; | |
| 691 | 684 |
| 692 float GetIdealContentsScale() const; | 685 float GetIdealContentsScale() const; |
| 693 | 686 |
| 694 bool was_ever_ready_since_last_transform_animation() const { | 687 bool was_ever_ready_since_last_transform_animation() const { |
| 695 return was_ever_ready_since_last_transform_animation_; | 688 return was_ever_ready_since_last_transform_animation_; |
| 696 } | 689 } |
| 697 | 690 |
| 698 void set_was_ever_ready_since_last_transform_animation(bool was_ready) { | 691 void set_was_ever_ready_since_last_transform_animation(bool was_ready) { |
| 699 was_ever_ready_since_last_transform_animation_ = was_ready; | 692 was_ever_ready_since_last_transform_animation_ = was_ready; |
| 700 } | 693 } |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 787 bool should_flatten_transform_from_property_tree_ : 1; | 780 bool should_flatten_transform_from_property_tree_ : 1; |
| 788 | 781 |
| 789 // Tracks if drawing-related properties have changed since last redraw. | 782 // Tracks if drawing-related properties have changed since last redraw. |
| 790 bool layer_property_changed_ : 1; | 783 bool layer_property_changed_ : 1; |
| 791 | 784 |
| 792 bool masks_to_bounds_ : 1; | 785 bool masks_to_bounds_ : 1; |
| 793 bool contents_opaque_ : 1; | 786 bool contents_opaque_ : 1; |
| 794 bool is_root_for_isolated_group_ : 1; | 787 bool is_root_for_isolated_group_ : 1; |
| 795 bool use_parent_backface_visibility_ : 1; | 788 bool use_parent_backface_visibility_ : 1; |
| 796 bool draws_content_ : 1; | 789 bool draws_content_ : 1; |
| 797 bool hide_layer_and_subtree_ : 1; | |
| 798 | 790 |
| 799 // Cache transform_'s invertibility. | 791 // Cache transform_'s invertibility. |
| 800 bool transform_is_invertible_ : 1; | 792 bool transform_is_invertible_ : 1; |
| 801 | 793 |
| 802 // Set for the layer that other layers are fixed to. | 794 // Set for the layer that other layers are fixed to. |
| 803 bool is_container_for_fixed_position_layers_ : 1; | 795 bool is_container_for_fixed_position_layers_ : 1; |
| 804 | 796 |
| 805 bool is_affected_by_page_scale_ : 1; | 797 bool is_affected_by_page_scale_ : 1; |
| 806 | 798 |
| 807 // This is true if and only if the layer was ever ready since it last animated | 799 // This is true if and only if the layer was ever ready since it last animated |
| (...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 885 | 877 |
| 886 bool force_render_surface_; | 878 bool force_render_surface_; |
| 887 | 879 |
| 888 std::vector<FrameTimingRequest> frame_timing_requests_; | 880 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 889 bool frame_timing_requests_dirty_; | 881 bool frame_timing_requests_dirty_; |
| 890 bool visited_; | 882 bool visited_; |
| 891 bool layer_or_descendant_is_drawn_; | 883 bool layer_or_descendant_is_drawn_; |
| 892 // If true, the layer or one of its descendants has a wheel or touch handler. | 884 // If true, the layer or one of its descendants has a wheel or touch handler. |
| 893 bool layer_or_descendant_has_input_handler_; | 885 bool layer_or_descendant_has_input_handler_; |
| 894 bool sorted_for_recursion_; | 886 bool sorted_for_recursion_; |
| 895 bool is_hidden_from_property_trees_; | |
| 896 | 887 |
| 897 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 888 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 898 }; | 889 }; |
| 899 | 890 |
| 900 } // namespace cc | 891 } // namespace cc |
| 901 | 892 |
| 902 #endif // CC_LAYERS_LAYER_IMPL_H_ | 893 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |