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

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

Issue 2846653002: cc : Stop pushing layers from hidden subtrees at commit
Patch Set: . Created 3 years, 7 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 | « no previous file | cc/layers/layer.cc » ('j') | cc/trees/layer_tree_host_common_unittest.cc » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
384 void set_should_flatten_transform_from_property_tree(bool should_flatten) { 384 void set_should_flatten_transform_from_property_tree(bool should_flatten) {
385 if (should_flatten_transform_from_property_tree_ == should_flatten) 385 if (should_flatten_transform_from_property_tree_ == should_flatten)
386 return; 386 return;
387 should_flatten_transform_from_property_tree_ = should_flatten; 387 should_flatten_transform_from_property_tree_ = should_flatten;
388 SetNeedsPushProperties(); 388 SetNeedsPushProperties();
389 } 389 }
390 bool should_flatten_transform_from_property_tree() const { 390 bool should_flatten_transform_from_property_tree() const {
391 return should_flatten_transform_from_property_tree_; 391 return should_flatten_transform_from_property_tree_;
392 } 392 }
393 393
394 void SetIsHidden(bool is_hidden);
395
396 bool is_hidden() const { return is_hidden_; }
397
394 const gfx::Rect& visible_layer_rect_for_testing() const { 398 const gfx::Rect& visible_layer_rect_for_testing() const {
395 return visible_layer_rect_; 399 return visible_layer_rect_;
396 } 400 }
397 void set_visible_layer_rect(const gfx::Rect& rect) { 401 void set_visible_layer_rect(const gfx::Rect& rect) {
398 visible_layer_rect_ = rect; 402 visible_layer_rect_ = rect;
399 } 403 }
400 404
401 // This is for tracking damage. 405 // This is for tracking damage.
402 void SetSubtreePropertyChanged(); 406 void SetSubtreePropertyChanged();
403 bool subtree_property_changed() const { return subtree_property_changed_; } 407 bool subtree_property_changed() const { return subtree_property_changed_; }
(...skipping 213 matching lines...) Expand 10 before | Expand all | Expand 10 after
617 621
618 int num_descendants_that_draw_content_; 622 int num_descendants_that_draw_content_;
619 int transform_tree_index_; 623 int transform_tree_index_;
620 int effect_tree_index_; 624 int effect_tree_index_;
621 int clip_tree_index_; 625 int clip_tree_index_;
622 int scroll_tree_index_; 626 int scroll_tree_index_;
623 int property_tree_sequence_number_; 627 int property_tree_sequence_number_;
624 gfx::Vector2dF offset_to_transform_parent_; 628 gfx::Vector2dF offset_to_transform_parent_;
625 bool should_flatten_transform_from_property_tree_ : 1; 629 bool should_flatten_transform_from_property_tree_ : 1;
626 bool draws_content_ : 1; 630 bool draws_content_ : 1;
631 bool is_hidden_ : 1;
627 bool use_local_transform_for_backface_visibility_ : 1; 632 bool use_local_transform_for_backface_visibility_ : 1;
628 bool should_check_backface_visibility_ : 1; 633 bool should_check_backface_visibility_ : 1;
629 bool force_render_surface_for_testing_ : 1; 634 bool force_render_surface_for_testing_ : 1;
630 bool subtree_property_changed_ : 1; 635 bool subtree_property_changed_ : 1;
631 bool may_contain_video_ : 1; 636 bool may_contain_video_ : 1;
632 bool is_scroll_clip_layer_ : 1; 637 bool is_scroll_clip_layer_ : 1;
633 bool needs_show_scrollbars_ : 1; 638 bool needs_show_scrollbars_ : 1;
634 // This value is valid only when LayerTreeHost::has_copy_request() is true 639 // This value is valid only when LayerTreeHost::has_copy_request() is true
635 bool subtree_has_copy_request_ : 1; 640 bool subtree_has_copy_request_ : 1;
636 SkColor safe_opaque_background_color_; 641 SkColor safe_opaque_background_color_;
637 std::unique_ptr<std::set<Layer*>> scroll_children_; 642 std::unique_ptr<std::set<Layer*>> scroll_children_;
638 643
639 std::unique_ptr<std::set<Layer*>> clip_children_; 644 std::unique_ptr<std::set<Layer*>> clip_children_;
640 645
641 PaintProperties paint_properties_; 646 PaintProperties paint_properties_;
642 647
643 // These all act like draw properties, so don't need push properties. 648 // These all act like draw properties, so don't need push properties.
644 gfx::Rect visible_layer_rect_; 649 gfx::Rect visible_layer_rect_;
645 size_t num_unclipped_descendants_; 650 size_t num_unclipped_descendants_;
646 651
647 DISALLOW_COPY_AND_ASSIGN(Layer); 652 DISALLOW_COPY_AND_ASSIGN(Layer);
648 }; 653 };
649 654
650 } // namespace cc 655 } // namespace cc
651 656
652 #endif // CC_LAYERS_LAYER_H_ 657 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/trees/layer_tree_host_common_unittest.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698