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

Side by Side Diff: cc/layers/layer_impl.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 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
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) {
Ian Vollick 2015/07/09 14:26:27 nit: I see that you've followed the example of set
jaydasika 2015/07/09 15:11:49 It is defined in the header file. I have followed
Ian Vollick 2015/07/09 16:42:18 Hah. I was clearly skimming your patch too quickly
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 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
386 bool draw_transform_is_animating() const { 394 bool draw_transform_is_animating() const {
387 return draw_properties_.target_space_transform_is_animating; 395 return draw_properties_.target_space_transform_is_animating;
388 } 396 }
389 bool screen_space_transform_is_animating() const { 397 bool screen_space_transform_is_animating() const {
390 return draw_properties_.screen_space_transform_is_animating; 398 return draw_properties_.screen_space_transform_is_animating;
391 } 399 }
392 bool screen_space_opacity_is_animating() const { 400 bool screen_space_opacity_is_animating() const {
393 return draw_properties_.screen_space_opacity_is_animating; 401 return draw_properties_.screen_space_opacity_is_animating;
394 } 402 }
395 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; } 403 bool can_use_lcd_text() const { return draw_properties_.can_use_lcd_text; }
396 bool is_clipped() const { return draw_properties_.is_clipped; }
397 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; } 404 gfx::Rect clip_rect() const { return draw_properties_.clip_rect; }
398 gfx::Rect drawable_content_rect() const { 405 gfx::Rect drawable_content_rect() const {
399 return draw_properties_.drawable_content_rect; 406 return draw_properties_.drawable_content_rect;
400 } 407 }
401 gfx::Rect visible_layer_rect() const { 408 gfx::Rect visible_layer_rect() const {
402 return draw_properties_.visible_layer_rect; 409 return draw_properties_.visible_layer_rect;
403 } 410 }
404 LayerImpl* render_target() { 411 LayerImpl* render_target() {
405 DCHECK(!draw_properties_.render_target || 412 DCHECK(!draw_properties_.render_target ||
406 draw_properties_.render_target->render_surface()); 413 draw_properties_.render_target->render_surface());
(...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after
757 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); 764 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big");
758 ScrollBlocksOn scroll_blocks_on_ : 3; 765 ScrollBlocksOn scroll_blocks_on_ : 3;
759 766
760 bool user_scrollable_horizontal_ : 1; 767 bool user_scrollable_horizontal_ : 1;
761 bool user_scrollable_vertical_ : 1; 768 bool user_scrollable_vertical_ : 1;
762 bool stacking_order_changed_ : 1; 769 bool stacking_order_changed_ : 1;
763 // Whether the "back" of this layer should draw. 770 // Whether the "back" of this layer should draw.
764 bool double_sided_ : 1; 771 bool double_sided_ : 1;
765 bool should_flatten_transform_ : 1; 772 bool should_flatten_transform_ : 1;
766 bool should_flatten_transform_from_property_tree_ : 1; 773 bool should_flatten_transform_from_property_tree_ : 1;
774 bool is_clipped_from_property_tree_ : 1;
767 775
768 // Tracks if drawing-related properties have changed since last redraw. 776 // Tracks if drawing-related properties have changed since last redraw.
769 bool layer_property_changed_ : 1; 777 bool layer_property_changed_ : 1;
770 778
771 bool masks_to_bounds_ : 1; 779 bool masks_to_bounds_ : 1;
772 bool contents_opaque_ : 1; 780 bool contents_opaque_ : 1;
773 bool is_root_for_isolated_group_ : 1; 781 bool is_root_for_isolated_group_ : 1;
774 bool use_parent_backface_visibility_ : 1; 782 bool use_parent_backface_visibility_ : 1;
775 bool draw_checkerboard_for_missing_tiles_ : 1; 783 bool draw_checkerboard_for_missing_tiles_ : 1;
776 bool draws_content_ : 1; 784 bool draws_content_ : 1;
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after
861 bool visited_; 869 bool visited_;
862 bool layer_or_descendant_is_drawn_; 870 bool layer_or_descendant_is_drawn_;
863 bool sorted_for_recursion_; 871 bool sorted_for_recursion_;
864 872
865 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 873 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
866 }; 874 };
867 875
868 } // namespace cc 876 } // namespace cc
869 877
870 #endif // CC_LAYERS_LAYER_IMPL_H_ 878 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698