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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 245 } |
246 bool draw_transform_is_animating() const { | 246 bool draw_transform_is_animating() const { |
247 return draw_properties_.target_space_transform_is_animating; | 247 return draw_properties_.target_space_transform_is_animating; |
248 } | 248 } |
249 bool screen_space_transform_is_animating() const { | 249 bool screen_space_transform_is_animating() const { |
250 return draw_properties_.screen_space_transform_is_animating; | 250 return draw_properties_.screen_space_transform_is_animating; |
251 } | 251 } |
252 bool screen_space_opacity_is_animating() const { | 252 bool screen_space_opacity_is_animating() const { |
253 return draw_properties_.screen_space_opacity_is_animating; | 253 return draw_properties_.screen_space_opacity_is_animating; |
254 } | 254 } |
255 bool is_clipped() const { return draw_properties_.is_clipped; } | |
256 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } | 255 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } |
257 gfx::Rect drawable_content_rect() const { | 256 gfx::Rect drawable_content_rect() const { |
258 return draw_properties_.drawable_content_rect; | 257 return draw_properties_.drawable_content_rect; |
259 } | 258 } |
260 gfx::Rect visible_layer_rect() const { | 259 gfx::Rect visible_layer_rect() const { |
261 return draw_properties_.visible_layer_rect; | 260 return draw_properties_.visible_layer_rect; |
262 } | 261 } |
263 Layer* render_target() { | 262 Layer* render_target() { |
264 DCHECK(!draw_properties_.render_target || | 263 DCHECK(!draw_properties_.render_target || |
265 draw_properties_.render_target->render_surface()); | 264 draw_properties_.render_target->render_surface()); |
(...skipping 227 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 void set_should_flatten_transform_from_property_tree(bool should_flatten) { | 492 void set_should_flatten_transform_from_property_tree(bool should_flatten) { |
494 if (should_flatten_transform_from_property_tree_ == should_flatten) | 493 if (should_flatten_transform_from_property_tree_ == should_flatten) |
495 return; | 494 return; |
496 should_flatten_transform_from_property_tree_ = should_flatten; | 495 should_flatten_transform_from_property_tree_ = should_flatten; |
497 SetNeedsPushProperties(); | 496 SetNeedsPushProperties(); |
498 } | 497 } |
499 bool should_flatten_transform_from_property_tree() const { | 498 bool should_flatten_transform_from_property_tree() const { |
500 return should_flatten_transform_from_property_tree_; | 499 return should_flatten_transform_from_property_tree_; |
501 } | 500 } |
502 | 501 |
| 502 void set_is_clipped(bool is_clipped) { |
| 503 if (is_clipped_ == is_clipped) |
| 504 return; |
| 505 is_clipped_ = is_clipped; |
| 506 SetNeedsPushProperties(); |
| 507 } |
| 508 bool is_clipped() const { return is_clipped_; } |
| 509 |
503 // TODO(vollick): These values are temporary and will be removed as soon as | 510 // TODO(vollick): These values are temporary and will be removed as soon as |
504 // render surface determinations are moved out of CDP. They only exist because | 511 // render surface determinations are moved out of CDP. They only exist because |
505 // certain logic depends on whether or not a layer would render to a separate | 512 // certain logic depends on whether or not a layer would render to a separate |
506 // surface, but CDP destroys surfaces and targets it doesn't need, so without | 513 // surface, but CDP destroys surfaces and targets it doesn't need, so without |
507 // this boolean, this is impossible to determine after the fact without | 514 // this boolean, this is impossible to determine after the fact without |
508 // wastefully recomputing it. This is public for the time being so that it can | 515 // wastefully recomputing it. This is public for the time being so that it can |
509 // be accessed from CDP. | 516 // be accessed from CDP. |
510 bool has_render_surface() const { | 517 bool has_render_surface() const { |
511 return has_render_surface_; | 518 return has_render_surface_; |
512 } | 519 } |
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
691 int num_descendants_that_draw_content_; | 698 int num_descendants_that_draw_content_; |
692 int transform_tree_index_; | 699 int transform_tree_index_; |
693 int opacity_tree_index_; | 700 int opacity_tree_index_; |
694 int clip_tree_index_; | 701 int clip_tree_index_; |
695 int property_tree_sequence_number_; | 702 int property_tree_sequence_number_; |
696 int num_layer_or_descendants_with_copy_request_; | 703 int num_layer_or_descendants_with_copy_request_; |
697 int num_layer_or_descendants_with_input_handler_; | 704 int num_layer_or_descendants_with_input_handler_; |
698 int num_children_with_scroll_parent_; | 705 int num_children_with_scroll_parent_; |
699 gfx::Vector2dF offset_to_transform_parent_; | 706 gfx::Vector2dF offset_to_transform_parent_; |
700 bool should_flatten_transform_from_property_tree_ : 1; | 707 bool should_flatten_transform_from_property_tree_ : 1; |
| 708 bool is_clipped_ : 1; |
701 bool should_scroll_on_main_thread_ : 1; | 709 bool should_scroll_on_main_thread_ : 1; |
702 bool have_wheel_event_handlers_ : 1; | 710 bool have_wheel_event_handlers_ : 1; |
703 bool have_scroll_event_handlers_ : 1; | 711 bool have_scroll_event_handlers_ : 1; |
704 bool user_scrollable_horizontal_ : 1; | 712 bool user_scrollable_horizontal_ : 1; |
705 bool user_scrollable_vertical_ : 1; | 713 bool user_scrollable_vertical_ : 1; |
706 bool is_root_for_isolated_group_ : 1; | 714 bool is_root_for_isolated_group_ : 1; |
707 bool is_container_for_fixed_position_layers_ : 1; | 715 bool is_container_for_fixed_position_layers_ : 1; |
708 bool is_drawable_ : 1; | 716 bool is_drawable_ : 1; |
709 bool draws_content_ : 1; | 717 bool draws_content_ : 1; |
710 bool hide_layer_and_subtree_ : 1; | 718 bool hide_layer_and_subtree_ : 1; |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
764 | 772 |
765 std::vector<FrameTimingRequest> frame_timing_requests_; | 773 std::vector<FrameTimingRequest> frame_timing_requests_; |
766 bool frame_timing_requests_dirty_; | 774 bool frame_timing_requests_dirty_; |
767 | 775 |
768 DISALLOW_COPY_AND_ASSIGN(Layer); | 776 DISALLOW_COPY_AND_ASSIGN(Layer); |
769 }; | 777 }; |
770 | 778 |
771 } // namespace cc | 779 } // namespace cc |
772 | 780 |
773 #endif // CC_LAYERS_LAYER_H_ | 781 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |