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 <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
176 } | 176 } |
177 | 177 |
178 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 178 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
179 should_flatten_transform_from_property_tree_ = should_flatten; | 179 should_flatten_transform_from_property_tree_ = should_flatten; |
180 SetNeedsPushProperties(); | 180 SetNeedsPushProperties(); |
181 } | 181 } |
182 bool should_flatten_transform_from_property_tree() const { | 182 bool should_flatten_transform_from_property_tree() const { |
183 return should_flatten_transform_from_property_tree_; | 183 return should_flatten_transform_from_property_tree_; |
184 } | 184 } |
185 | 185 |
| 186 void set_is_clipped_from_property_tree(bool is_clipped) { |
| 187 is_clipped_from_property_tree_ = is_clipped; |
| 188 SetNeedsPushProperties(); |
| 189 } |
| 190 bool is_clipped_from_property_tree() const { |
| 191 return is_clipped_from_property_tree_; |
| 192 } |
| 193 |
186 void UpdatePropertyTreeTransform(); | 194 void UpdatePropertyTreeTransform(); |
187 void UpdatePropertyTreeOpacity(); | 195 void UpdatePropertyTreeOpacity(); |
188 void UpdatePropertyTreeScrollOffset(); | 196 void UpdatePropertyTreeScrollOffset(); |
189 | 197 |
190 // For compatibility with Layer. | 198 // For compatibility with Layer. |
191 bool has_render_surface() const { return !!render_surface(); } | 199 bool has_render_surface() const { return !!render_surface(); } |
192 | 200 |
193 void SetNumDescendantsThatDrawContent(int num_descendants); | 201 void SetNumDescendantsThatDrawContent(int num_descendants); |
194 void SetClipParent(LayerImpl* ancestor); | 202 void SetClipParent(LayerImpl* ancestor); |
195 | 203 |
(...skipping 561 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
757 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); | 765 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); |
758 ScrollBlocksOn scroll_blocks_on_ : 3; | 766 ScrollBlocksOn scroll_blocks_on_ : 3; |
759 | 767 |
760 bool user_scrollable_horizontal_ : 1; | 768 bool user_scrollable_horizontal_ : 1; |
761 bool user_scrollable_vertical_ : 1; | 769 bool user_scrollable_vertical_ : 1; |
762 bool stacking_order_changed_ : 1; | 770 bool stacking_order_changed_ : 1; |
763 // Whether the "back" of this layer should draw. | 771 // Whether the "back" of this layer should draw. |
764 bool double_sided_ : 1; | 772 bool double_sided_ : 1; |
765 bool should_flatten_transform_ : 1; | 773 bool should_flatten_transform_ : 1; |
766 bool should_flatten_transform_from_property_tree_ : 1; | 774 bool should_flatten_transform_from_property_tree_ : 1; |
| 775 bool is_clipped_from_property_tree_ : 1; |
767 | 776 |
768 // Tracks if drawing-related properties have changed since last redraw. | 777 // Tracks if drawing-related properties have changed since last redraw. |
769 bool layer_property_changed_ : 1; | 778 bool layer_property_changed_ : 1; |
770 | 779 |
771 bool masks_to_bounds_ : 1; | 780 bool masks_to_bounds_ : 1; |
772 bool contents_opaque_ : 1; | 781 bool contents_opaque_ : 1; |
773 bool is_root_for_isolated_group_ : 1; | 782 bool is_root_for_isolated_group_ : 1; |
774 bool use_parent_backface_visibility_ : 1; | 783 bool use_parent_backface_visibility_ : 1; |
775 bool draw_checkerboard_for_missing_tiles_ : 1; | 784 bool draw_checkerboard_for_missing_tiles_ : 1; |
776 bool draws_content_ : 1; | 785 bool draws_content_ : 1; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
861 bool visited_; | 870 bool visited_; |
862 bool layer_or_descendant_is_drawn_; | 871 bool layer_or_descendant_is_drawn_; |
863 bool sorted_for_recursion_; | 872 bool sorted_for_recursion_; |
864 | 873 |
865 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 874 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
866 }; | 875 }; |
867 | 876 |
868 } // namespace cc | 877 } // namespace cc |
869 | 878 |
870 #endif // CC_LAYERS_LAYER_IMPL_H_ | 879 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |