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

Side by Side Diff: cc/layers/layer_impl.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
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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
284 virtual void NotifyTileStateChanged(const Tile* tile) {} 284 virtual void NotifyTileStateChanged(const Tile* tile) {}
285 285
286 virtual ScrollbarLayerImplBase* ToScrollbarLayer(); 286 virtual ScrollbarLayerImplBase* ToScrollbarLayer();
287 287
288 // Returns true if this layer has content to draw. 288 // Returns true if this layer has content to draw.
289 void SetDrawsContent(bool draws_content); 289 void SetDrawsContent(bool draws_content);
290 bool DrawsContent() const { return draws_content_; } 290 bool DrawsContent() const { return draws_content_; }
291 291
292 int NumDescendantsThatDrawContent() const; 292 int NumDescendantsThatDrawContent() const;
293 void SetHideLayerAndSubtree(bool hide); 293 void SetHideLayerAndSubtree(bool hide);
294 bool hide_layer_and_subtree() const { return hide_layer_and_subtree_; }
295 294
296 void SetTransformOrigin(const gfx::Point3F& transform_origin); 295 void SetTransformOrigin(const gfx::Point3F& transform_origin);
297 gfx::Point3F transform_origin() const { return transform_origin_; } 296 gfx::Point3F transform_origin() const { return transform_origin_; }
298 297
299 void SetBackgroundColor(SkColor background_color); 298 void SetBackgroundColor(SkColor background_color);
300 SkColor background_color() const { return background_color_; } 299 SkColor background_color() const { return background_color_; }
301 // If contents_opaque(), return an opaque color else return a 300 // If contents_opaque(), return an opaque color else return a
302 // non-opaque color. Tries to return background_color(), if possible. 301 // non-opaque color. Tries to return background_color(), if possible.
303 SkColor SafeOpaqueBackgroundColor() const; 302 SkColor SafeOpaqueBackgroundColor() const;
304 303
(...skipping 373 matching lines...) Expand 10 before | Expand all | Expand 10 after
678 677
679 void set_sorted_for_recursion(bool sorted_for_recursion) { 678 void set_sorted_for_recursion(bool sorted_for_recursion) {
680 sorted_for_recursion_ = sorted_for_recursion; 679 sorted_for_recursion_ = sorted_for_recursion;
681 } 680 }
682 bool sorted_for_recursion() { return sorted_for_recursion_; } 681 bool sorted_for_recursion() { return sorted_for_recursion_; }
683 682
684 int num_copy_requests_in_target_subtree(); 683 int num_copy_requests_in_target_subtree();
685 684
686 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); 685 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded();
687 686
688 void set_is_hidden_from_property_trees(bool is_hidden) { 687 bool IsHidden() const;
689 if (is_hidden == is_hidden_from_property_trees_)
690 return;
691 is_hidden_from_property_trees_ = is_hidden;
692 SetNeedsPushProperties();
693 }
694 bool LayerIsHidden() const;
695 688
696 float GetIdealContentsScale() const; 689 float GetIdealContentsScale() const;
697 690
698 bool was_ever_ready_since_last_transform_animation() const { 691 bool was_ever_ready_since_last_transform_animation() const {
699 return was_ever_ready_since_last_transform_animation_; 692 return was_ever_ready_since_last_transform_animation_;
700 } 693 }
701 694
702 void set_was_ever_ready_since_last_transform_animation(bool was_ready) { 695 void set_was_ever_ready_since_last_transform_animation(bool was_ready) {
703 was_ever_ready_since_last_transform_animation_ = was_ready; 696 was_ever_ready_since_last_transform_animation_ = was_ready;
704 } 697 }
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
790 bool should_flatten_transform_from_property_tree_ : 1; 783 bool should_flatten_transform_from_property_tree_ : 1;
791 784
792 // Tracks if drawing-related properties have changed since last redraw. 785 // Tracks if drawing-related properties have changed since last redraw.
793 bool layer_property_changed_ : 1; 786 bool layer_property_changed_ : 1;
794 787
795 bool masks_to_bounds_ : 1; 788 bool masks_to_bounds_ : 1;
796 bool contents_opaque_ : 1; 789 bool contents_opaque_ : 1;
797 bool is_root_for_isolated_group_ : 1; 790 bool is_root_for_isolated_group_ : 1;
798 bool use_parent_backface_visibility_ : 1; 791 bool use_parent_backface_visibility_ : 1;
799 bool draws_content_ : 1; 792 bool draws_content_ : 1;
800 bool hide_layer_and_subtree_ : 1;
801 793
802 // Cache transform_'s invertibility. 794 // Cache transform_'s invertibility.
803 bool transform_is_invertible_ : 1; 795 bool transform_is_invertible_ : 1;
804 796
805 // Set for the layer that other layers are fixed to. 797 // Set for the layer that other layers are fixed to.
806 bool is_container_for_fixed_position_layers_ : 1; 798 bool is_container_for_fixed_position_layers_ : 1;
807 799
808 bool is_affected_by_page_scale_ : 1; 800 bool is_affected_by_page_scale_ : 1;
809 801
810 // This is true if and only if the layer was ever ready since it last animated 802 // This is true if and only if the layer was ever ready since it last animated
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
888 880
889 bool force_render_surface_; 881 bool force_render_surface_;
890 882
891 std::vector<FrameTimingRequest> frame_timing_requests_; 883 std::vector<FrameTimingRequest> frame_timing_requests_;
892 bool frame_timing_requests_dirty_; 884 bool frame_timing_requests_dirty_;
893 bool visited_; 885 bool visited_;
894 bool layer_or_descendant_is_drawn_; 886 bool layer_or_descendant_is_drawn_;
895 // If true, the layer or one of its descendants has a wheel or touch handler. 887 // If true, the layer or one of its descendants has a wheel or touch handler.
896 bool layer_or_descendant_has_input_handler_; 888 bool layer_or_descendant_has_input_handler_;
897 bool sorted_for_recursion_; 889 bool sorted_for_recursion_;
898 bool is_hidden_from_property_trees_;
899 890
900 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 891 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
901 }; 892 };
902 893
903 } // namespace cc 894 } // namespace cc
904 895
905 #endif // CC_LAYERS_LAYER_IMPL_H_ 896 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | cc/trees/property_tree.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698