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

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

Issue 1588093004: Compute if a layer is drawn without LayerTree hierarchy (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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/property_tree.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 319 matching lines...) Expand 10 before | Expand all | Expand 10 after
330 return use_parent_backface_visibility_; 330 return use_parent_backface_visibility_;
331 } 331 }
332 332
333 virtual void SetLayerTreeHost(LayerTreeHost* host); 333 virtual void SetLayerTreeHost(LayerTreeHost* host);
334 334
335 virtual bool HasDelegatedContent() const; 335 virtual bool HasDelegatedContent() const;
336 bool HasContributingDelegatedRenderPasses() const { return false; } 336 bool HasContributingDelegatedRenderPasses() const { return false; }
337 337
338 void SetIsDrawable(bool is_drawable); 338 void SetIsDrawable(bool is_drawable);
339 339
340 void SetHideLayerAndSubtree(bool hide);
341 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
342
343 void SetReplicaLayer(Layer* layer); 340 void SetReplicaLayer(Layer* layer);
344 Layer* replica_layer() { return replica_layer_.get(); } 341 Layer* replica_layer() { return replica_layer_.get(); }
345 const Layer* replica_layer() const { return replica_layer_.get(); } 342 const Layer* replica_layer() const { return replica_layer_.get(); }
346 343
347 bool has_mask() const { return !!mask_layer_.get(); } 344 bool has_mask() const { return !!mask_layer_.get(); }
348 bool has_replica() const { return !!replica_layer_.get(); } 345 bool has_replica() const { return !!replica_layer_.get(); }
349 bool replica_has_mask() const { 346 bool replica_has_mask() const {
350 return replica_layer_.get() && 347 return replica_layer_.get() &&
351 (mask_layer_.get() || replica_layer_->mask_layer_.get()); 348 (mask_layer_.get() || replica_layer_->mask_layer_.get());
352 } 349 }
(...skipping 201 matching lines...) Expand 10 before | Expand all | Expand 10 after
554 551
555 void SetMutableProperties(uint32_t properties); 552 void SetMutableProperties(uint32_t properties);
556 uint32_t mutable_properties() const { return mutable_properties_; } 553 uint32_t mutable_properties() const { return mutable_properties_; }
557 554
558 void set_visited(bool visited); 555 void set_visited(bool visited);
559 bool visited(); 556 bool visited();
560 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); 557 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn);
561 bool layer_or_descendant_is_drawn(); 558 bool layer_or_descendant_is_drawn();
562 void set_sorted_for_recursion(bool sorted_for_recursion); 559 void set_sorted_for_recursion(bool sorted_for_recursion);
563 bool sorted_for_recursion(); 560 bool sorted_for_recursion();
564 void set_is_hidden_from_property_trees(bool is_hidden) {
565 if (is_hidden == is_hidden_from_property_trees_)
566 return;
567 is_hidden_from_property_trees_ = is_hidden;
568 SetNeedsPushProperties();
569 }
570 561
571 // LayerAnimationValueProvider implementation. 562 // LayerAnimationValueProvider implementation.
572 gfx::ScrollOffset ScrollOffsetForAnimation() const override; 563 gfx::ScrollOffset ScrollOffsetForAnimation() const override;
573 564
574 // LayerAnimationValueObserver implementation. 565 // LayerAnimationValueObserver implementation.
575 void OnFilterAnimated(const FilterOperations& filters) override; 566 void OnFilterAnimated(const FilterOperations& filters) override;
576 void OnOpacityAnimated(float opacity) override; 567 void OnOpacityAnimated(float opacity) override;
577 void OnTransformAnimated(const gfx::Transform& transform) override; 568 void OnTransformAnimated(const gfx::Transform& transform) override;
578 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; 569 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
579 void OnAnimationWaitingForDeletion() override; 570 void OnAnimationWaitingForDeletion() override;
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after
729 InputHandler::MainThreadScrollingReason main_thread_scrolling_reasons_; 720 InputHandler::MainThreadScrollingReason main_thread_scrolling_reasons_;
730 bool should_flatten_transform_from_property_tree_ : 1; 721 bool should_flatten_transform_from_property_tree_ : 1;
731 bool have_wheel_event_handlers_ : 1; 722 bool have_wheel_event_handlers_ : 1;
732 bool have_scroll_event_handlers_ : 1; 723 bool have_scroll_event_handlers_ : 1;
733 bool user_scrollable_horizontal_ : 1; 724 bool user_scrollable_horizontal_ : 1;
734 bool user_scrollable_vertical_ : 1; 725 bool user_scrollable_vertical_ : 1;
735 bool is_root_for_isolated_group_ : 1; 726 bool is_root_for_isolated_group_ : 1;
736 bool is_container_for_fixed_position_layers_ : 1; 727 bool is_container_for_fixed_position_layers_ : 1;
737 bool is_drawable_ : 1; 728 bool is_drawable_ : 1;
738 bool draws_content_ : 1; 729 bool draws_content_ : 1;
739 bool hide_layer_and_subtree_ : 1;
740 bool masks_to_bounds_ : 1; 730 bool masks_to_bounds_ : 1;
741 bool contents_opaque_ : 1; 731 bool contents_opaque_ : 1;
742 bool double_sided_ : 1; 732 bool double_sided_ : 1;
743 bool should_flatten_transform_ : 1; 733 bool should_flatten_transform_ : 1;
744 bool use_parent_backface_visibility_ : 1; 734 bool use_parent_backface_visibility_ : 1;
745 bool force_render_surface_ : 1; 735 bool force_render_surface_ : 1;
746 bool transform_is_invertible_ : 1; 736 bool transform_is_invertible_ : 1;
747 bool has_render_surface_ : 1; 737 bool has_render_surface_ : 1;
748 ScrollBlocksOn scroll_blocks_on_ : 3; 738 ScrollBlocksOn scroll_blocks_on_ : 3;
749 Region non_fast_scrollable_region_; 739 Region non_fast_scrollable_region_;
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
786 776
787 PaintProperties paint_properties_; 777 PaintProperties paint_properties_;
788 778
789 // These all act like draw properties, so don't need push properties. 779 // These all act like draw properties, so don't need push properties.
790 gfx::Rect visible_layer_rect_; 780 gfx::Rect visible_layer_rect_;
791 gfx::Rect clip_rect_; 781 gfx::Rect clip_rect_;
792 size_t num_unclipped_descendants_; 782 size_t num_unclipped_descendants_;
793 783
794 std::vector<FrameTimingRequest> frame_timing_requests_; 784 std::vector<FrameTimingRequest> frame_timing_requests_;
795 bool frame_timing_requests_dirty_; 785 bool frame_timing_requests_dirty_;
796 bool is_hidden_from_property_trees_;
797 786
798 DISALLOW_COPY_AND_ASSIGN(Layer); 787 DISALLOW_COPY_AND_ASSIGN(Layer);
799 }; 788 };
800 789
801 } // namespace cc 790 } // namespace cc
802 791
803 #endif // CC_LAYERS_LAYER_H_ 792 #endif // CC_LAYERS_LAYER_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/layer.cc » ('j') | cc/trees/property_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698