Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(155)

Side by Side Diff: cc/layers/layer.h

Issue 1231453002: Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: DrawProperties is_clipped removed Created 5 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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_from_property_tree(bool is_clipped) {
503 if (is_clipped_from_property_tree_ == is_clipped)
504 return;
505 is_clipped_from_property_tree_ = is_clipped;
506 SetNeedsPushProperties();
507 }
508 bool is_clipped_from_property_tree() const {
Ian Vollick 2015/07/09 14:26:27 the "from_property_tree" suffix is only used to di
jaydasika 2015/07/09 15:11:49 Done.
509 return is_clipped_from_property_tree_;
510 }
511
503 // TODO(vollick): These values are temporary and will be removed as soon as 512 // 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 513 // 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 514 // 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 515 // 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 516 // 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 517 // wastefully recomputing it. This is public for the time being so that it can
509 // be accessed from CDP. 518 // be accessed from CDP.
510 bool has_render_surface() const { 519 bool has_render_surface() const {
511 return has_render_surface_; 520 return has_render_surface_;
512 } 521 }
(...skipping 178 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 int num_descendants_that_draw_content_; 700 int num_descendants_that_draw_content_;
692 int transform_tree_index_; 701 int transform_tree_index_;
693 int opacity_tree_index_; 702 int opacity_tree_index_;
694 int clip_tree_index_; 703 int clip_tree_index_;
695 int property_tree_sequence_number_; 704 int property_tree_sequence_number_;
696 int num_layer_or_descendants_with_copy_request_; 705 int num_layer_or_descendants_with_copy_request_;
697 int num_layer_or_descendants_with_input_handler_; 706 int num_layer_or_descendants_with_input_handler_;
698 int num_children_with_scroll_parent_; 707 int num_children_with_scroll_parent_;
699 gfx::Vector2dF offset_to_transform_parent_; 708 gfx::Vector2dF offset_to_transform_parent_;
700 bool should_flatten_transform_from_property_tree_ : 1; 709 bool should_flatten_transform_from_property_tree_ : 1;
710 bool is_clipped_from_property_tree_ : 1;
701 bool should_scroll_on_main_thread_ : 1; 711 bool should_scroll_on_main_thread_ : 1;
702 bool have_wheel_event_handlers_ : 1; 712 bool have_wheel_event_handlers_ : 1;
703 bool have_scroll_event_handlers_ : 1; 713 bool have_scroll_event_handlers_ : 1;
704 bool user_scrollable_horizontal_ : 1; 714 bool user_scrollable_horizontal_ : 1;
705 bool user_scrollable_vertical_ : 1; 715 bool user_scrollable_vertical_ : 1;
706 bool is_root_for_isolated_group_ : 1; 716 bool is_root_for_isolated_group_ : 1;
707 bool is_container_for_fixed_position_layers_ : 1; 717 bool is_container_for_fixed_position_layers_ : 1;
708 bool is_drawable_ : 1; 718 bool is_drawable_ : 1;
709 bool draws_content_ : 1; 719 bool draws_content_ : 1;
710 bool hide_layer_and_subtree_ : 1; 720 bool hide_layer_and_subtree_ : 1;
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
764 774
765 std::vector<FrameTimingRequest> frame_timing_requests_; 775 std::vector<FrameTimingRequest> frame_timing_requests_;
766 bool frame_timing_requests_dirty_; 776 bool frame_timing_requests_dirty_;
767 777
768 DISALLOW_COPY_AND_ASSIGN(Layer); 778 DISALLOW_COPY_AND_ASSIGN(Layer);
769 }; 779 };
770 780
771 } // namespace cc 781 } // namespace cc
772 782
773 #endif // CC_LAYERS_LAYER_H_ 783 #endif // CC_LAYERS_LAYER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698