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

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

Powered by Google App Engine
This is Rietveld 408576698