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