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

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/layers/surface_layer.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 359 matching lines...) Expand 10 before | Expand all | Expand 10 after
370 void set_should_flatten_transform_from_property_tree(bool should_flatten) { 370 void set_should_flatten_transform_from_property_tree(bool should_flatten) {
371 if (should_flatten_transform_from_property_tree_ == should_flatten) 371 if (should_flatten_transform_from_property_tree_ == should_flatten)
372 return; 372 return;
373 should_flatten_transform_from_property_tree_ = should_flatten; 373 should_flatten_transform_from_property_tree_ = should_flatten;
374 SetNeedsPushProperties(); 374 SetNeedsPushProperties();
375 } 375 }
376 bool should_flatten_transform_from_property_tree() const { 376 bool should_flatten_transform_from_property_tree() const {
377 return should_flatten_transform_from_property_tree_; 377 return should_flatten_transform_from_property_tree_;
378 } 378 }
379 379
380 void SetIsHidden(bool is_hidden);
381
382 bool is_hidden() const { return is_hidden_; }
383
380 const gfx::Rect& visible_layer_rect_for_testing() const { 384 const gfx::Rect& visible_layer_rect_for_testing() const {
381 return visible_layer_rect_; 385 return visible_layer_rect_;
382 } 386 }
383 void set_visible_layer_rect(const gfx::Rect& rect) { 387 void set_visible_layer_rect(const gfx::Rect& rect) {
384 visible_layer_rect_ = rect; 388 visible_layer_rect_ = rect;
385 } 389 }
386 390
387 // This is for tracking damage. 391 // This is for tracking damage.
388 void SetSubtreePropertyChanged(); 392 void SetSubtreePropertyChanged();
389 bool subtree_property_changed() const { return subtree_property_changed_; } 393 bool subtree_property_changed() const { return subtree_property_changed_; }
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 610
607 int num_descendants_that_draw_content_; 611 int num_descendants_that_draw_content_;
608 int transform_tree_index_; 612 int transform_tree_index_;
609 int effect_tree_index_; 613 int effect_tree_index_;
610 int clip_tree_index_; 614 int clip_tree_index_;
611 int scroll_tree_index_; 615 int scroll_tree_index_;
612 int property_tree_sequence_number_; 616 int property_tree_sequence_number_;
613 gfx::Vector2dF offset_to_transform_parent_; 617 gfx::Vector2dF offset_to_transform_parent_;
614 bool should_flatten_transform_from_property_tree_ : 1; 618 bool should_flatten_transform_from_property_tree_ : 1;
615 bool draws_content_ : 1; 619 bool draws_content_ : 1;
620 bool is_hidden_ : 1;
616 bool use_local_transform_for_backface_visibility_ : 1; 621 bool use_local_transform_for_backface_visibility_ : 1;
617 bool should_check_backface_visibility_ : 1; 622 bool should_check_backface_visibility_ : 1;
618 bool force_render_surface_for_testing_ : 1; 623 bool force_render_surface_for_testing_ : 1;
619 bool subtree_property_changed_ : 1; 624 bool subtree_property_changed_ : 1;
620 bool may_contain_video_ : 1; 625 bool may_contain_video_ : 1;
621 bool is_scroll_clip_layer_ : 1; 626 bool is_scroll_clip_layer_ : 1;
622 bool needs_show_scrollbars_ : 1; 627 bool needs_show_scrollbars_ : 1;
623 // This value is valid only when LayerTreeHost::has_copy_request() is true 628 // This value is valid only when LayerTreeHost::has_copy_request() is true
624 bool subtree_has_copy_request_ : 1; 629 bool subtree_has_copy_request_ : 1;
625 SkColor safe_opaque_background_color_; 630 SkColor safe_opaque_background_color_;
626 std::unique_ptr<std::set<Layer*>> scroll_children_; 631 std::unique_ptr<std::set<Layer*>> scroll_children_;
627 632
628 std::unique_ptr<std::set<Layer*>> clip_children_; 633 std::unique_ptr<std::set<Layer*>> clip_children_;
629 634
630 // These all act like draw properties, so don't need push properties. 635 // These all act like draw properties, so don't need push properties.
631 gfx::Rect visible_layer_rect_; 636 gfx::Rect visible_layer_rect_;
632 size_t num_unclipped_descendants_; 637 size_t num_unclipped_descendants_;
633 638
634 DISALLOW_COPY_AND_ASSIGN(Layer); 639 DISALLOW_COPY_AND_ASSIGN(Layer);
635 }; 640 };
636 641
637 } // namespace cc 642 } // namespace cc
638 643
639 #endif // CC_LAYERS_LAYER_H_ 644 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/layers/surface_layer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698