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(bool is_clipped) { | |
187 is_clipped_ = is_clipped; | |
188 SetNeedsPushProperties(); | |
189 } | |
190 bool is_clipped() const { return is_clipped_; } | |
191 | |
192 void UpdatePropertyTreeTransform(); | 186 void UpdatePropertyTreeTransform(); |
193 void UpdatePropertyTreeOpacity(); | 187 void UpdatePropertyTreeOpacity(); |
194 void UpdatePropertyTreeScrollOffset(); | 188 void UpdatePropertyTreeScrollOffset(); |
195 | 189 |
196 // For compatibility with Layer. | 190 // For compatibility with Layer. |
197 bool has_render_surface() const { return !!render_surface(); } | 191 bool has_render_surface() const { return !!render_surface(); } |
198 | 192 |
199 void SetNumDescendantsThatDrawContent(int num_descendants); | 193 void SetNumDescendantsThatDrawContent(int num_descendants); |
200 void SetClipParent(LayerImpl* ancestor); | 194 void SetClipParent(LayerImpl* ancestor); |
201 | 195 |
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
392 bool draw_transform_is_animating() const { | 386 bool draw_transform_is_animating() const { |
393 return draw_properties_.target_space_transform_is_animating; | 387 return draw_properties_.target_space_transform_is_animating; |
394 } | 388 } |
395 bool screen_space_transform_is_animating() const { | 389 bool screen_space_transform_is_animating() const { |
396 return draw_properties_.screen_space_transform_is_animating; | 390 return draw_properties_.screen_space_transform_is_animating; |
397 } | 391 } |
398 bool screen_space_opacity_is_animating() const { | 392 bool screen_space_opacity_is_animating() const { |
399 return draw_properties_.screen_space_opacity_is_animating; | 393 return draw_properties_.screen_space_opacity_is_animating; |
400 } | 394 } |
401 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } | 395 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } |
| 396 bool is_clipped() const { return draw_properties_.is_clipped; } |
402 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } | 397 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } |
403 gfx::Rect drawable_content_rect() const { | 398 gfx::Rect drawable_content_rect() const { |
404 return draw_properties_.drawable_content_rect; | 399 return draw_properties_.drawable_content_rect; |
405 } | 400 } |
406 gfx::Rect visible_layer_rect() const { | 401 gfx::Rect visible_layer_rect() const { |
407 return draw_properties_.visible_layer_rect; | 402 return draw_properties_.visible_layer_rect; |
408 } | 403 } |
409 LayerImpl* render_target() { | 404 LayerImpl* render_target() { |
410 DCHECK(!draw_properties_.render_target || | 405 DCHECK(!draw_properties_.render_target || |
411 draw_properties_.render_target->render_surface()); | 406 draw_properties_.render_target->render_surface()); |
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
762 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); | 757 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); |
763 ScrollBlocksOn scroll_blocks_on_ : 3; | 758 ScrollBlocksOn scroll_blocks_on_ : 3; |
764 | 759 |
765 bool user_scrollable_horizontal_ : 1; | 760 bool user_scrollable_horizontal_ : 1; |
766 bool user_scrollable_vertical_ : 1; | 761 bool user_scrollable_vertical_ : 1; |
767 bool stacking_order_changed_ : 1; | 762 bool stacking_order_changed_ : 1; |
768 // Whether the "back" of this layer should draw. | 763 // Whether the "back" of this layer should draw. |
769 bool double_sided_ : 1; | 764 bool double_sided_ : 1; |
770 bool should_flatten_transform_ : 1; | 765 bool should_flatten_transform_ : 1; |
771 bool should_flatten_transform_from_property_tree_ : 1; | 766 bool should_flatten_transform_from_property_tree_ : 1; |
772 bool is_clipped_ : 1; | |
773 | 767 |
774 // Tracks if drawing-related properties have changed since last redraw. | 768 // Tracks if drawing-related properties have changed since last redraw. |
775 bool layer_property_changed_ : 1; | 769 bool layer_property_changed_ : 1; |
776 | 770 |
777 bool masks_to_bounds_ : 1; | 771 bool masks_to_bounds_ : 1; |
778 bool contents_opaque_ : 1; | 772 bool contents_opaque_ : 1; |
779 bool is_root_for_isolated_group_ : 1; | 773 bool is_root_for_isolated_group_ : 1; |
780 bool use_parent_backface_visibility_ : 1; | 774 bool use_parent_backface_visibility_ : 1; |
781 bool draw_checkerboard_for_missing_tiles_ : 1; | 775 bool draw_checkerboard_for_missing_tiles_ : 1; |
782 bool draws_content_ : 1; | 776 bool draws_content_ : 1; |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
867 bool visited_; | 861 bool visited_; |
868 bool layer_or_descendant_is_drawn_; | 862 bool layer_or_descendant_is_drawn_; |
869 bool sorted_for_recursion_; | 863 bool sorted_for_recursion_; |
870 | 864 |
871 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 865 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
872 }; | 866 }; |
873 | 867 |
874 } // namespace cc | 868 } // namespace cc |
875 | 869 |
876 #endif // CC_LAYERS_LAYER_IMPL_H_ | 870 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |