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

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

Issue 1912893002: cc : Stop pushing properties not used by LayerImpl to LayerImpl. (2) (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 153
154 bool is_clipped() const { return draw_properties_.is_clipped; } 154 bool is_clipped() const { return draw_properties_.is_clipped; }
155 155
156 void UpdatePropertyTreeTransform(); 156 void UpdatePropertyTreeTransform();
157 void UpdatePropertyTreeTransformIsAnimated(bool is_animated); 157 void UpdatePropertyTreeTransformIsAnimated(bool is_animated);
158 void UpdatePropertyTreeOpacity(); 158 void UpdatePropertyTreeOpacity();
159 void UpdatePropertyTreeScrollOffset(); 159 void UpdatePropertyTreeScrollOffset();
160 160
161 // For compatibility with Layer. 161 // For compatibility with Layer.
162 bool has_render_surface() const { return !!render_surface(); } 162 bool has_render_surface() const { return !!render_surface(); }
163 bool force_render_surface() const { return force_render_surface_; }
164 void SetNumDescendantsThatDrawContent(int num_descendants); 163 void SetNumDescendantsThatDrawContent(int num_descendants);
165 void SetClipParent(LayerImpl* ancestor); 164 void SetClipParent(LayerImpl* ancestor);
166 165
167 LayerImpl* clip_parent() { 166 LayerImpl* clip_parent() {
168 return clip_parent_; 167 return clip_parent_;
169 } 168 }
170 169
171 void SetClipChildren(std::set<LayerImpl*>* children); 170 void SetClipChildren(std::set<LayerImpl*>* children);
172 171
173 std::set<LayerImpl*>* clip_children() { return clip_children_.get(); } 172 std::set<LayerImpl*>* clip_children() { return clip_children_.get(); }
(...skipping 274 matching lines...) Expand 10 before | Expand all | Expand 10 after
448 return non_fast_scrollable_region_; 447 return non_fast_scrollable_region_;
449 } 448 }
450 449
451 void SetTouchEventHandlerRegion(const Region& region) { 450 void SetTouchEventHandlerRegion(const Region& region) {
452 touch_event_handler_region_ = region; 451 touch_event_handler_region_ = region;
453 } 452 }
454 const Region& touch_event_handler_region() const { 453 const Region& touch_event_handler_region() const {
455 return touch_event_handler_region_; 454 return touch_event_handler_region_;
456 } 455 }
457 456
458 void SetDoubleSided(bool double_sided);
459 bool double_sided() const { return double_sided_; }
460
461 void SetTransform(const gfx::Transform& transform); 457 void SetTransform(const gfx::Transform& transform);
462 const gfx::Transform& transform() const { return transform_; } 458 const gfx::Transform& transform() const { return transform_; }
463 bool TransformIsAnimating() const; 459 bool TransformIsAnimating() const;
464 bool HasPotentiallyRunningTransformAnimation() const; 460 bool HasPotentiallyRunningTransformAnimation() const;
465 bool TransformIsAnimatingOnImplOnly() const; 461 bool TransformIsAnimatingOnImplOnly() const;
466 bool HasOnlyTranslationTransforms() const; 462 bool HasOnlyTranslationTransforms() const;
467 bool AnimationsPreserveAxisAlignment() const; 463 bool AnimationsPreserveAxisAlignment() const;
468 void SetTransformAndInvertibility(const gfx::Transform& transform, 464 void SetTransformAndInvertibility(const gfx::Transform& transform,
469 bool transform_is_invertible); 465 bool transform_is_invertible);
470 bool transform_is_invertible() const { return transform_is_invertible_; } 466 bool transform_is_invertible() const { return transform_is_invertible_; }
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
645 641
646 // Properties synchronized from the associated Layer. 642 // Properties synchronized from the associated Layer.
647 gfx::Size bounds_; 643 gfx::Size bounds_;
648 int scroll_clip_layer_id_; 644 int scroll_clip_layer_id_;
649 645
650 gfx::Vector2dF offset_to_transform_parent_; 646 gfx::Vector2dF offset_to_transform_parent_;
651 uint32_t main_thread_scrolling_reasons_; 647 uint32_t main_thread_scrolling_reasons_;
652 648
653 bool user_scrollable_horizontal_ : 1; 649 bool user_scrollable_horizontal_ : 1;
654 bool user_scrollable_vertical_ : 1; 650 bool user_scrollable_vertical_ : 1;
655 // Whether the "back" of this layer should draw.
656 bool double_sided_ : 1;
657 bool should_flatten_transform_ : 1; 651 bool should_flatten_transform_ : 1;
658 bool should_flatten_transform_from_property_tree_ : 1; 652 bool should_flatten_transform_from_property_tree_ : 1;
659 653
660 // Tracks if drawing-related properties have changed since last redraw. 654 // Tracks if drawing-related properties have changed since last redraw.
661 bool layer_property_changed_ : 1; 655 bool layer_property_changed_ : 1;
662 656
663 bool masks_to_bounds_ : 1; 657 bool masks_to_bounds_ : 1;
664 bool contents_opaque_ : 1; 658 bool contents_opaque_ : 1;
665 bool is_root_for_isolated_group_ : 1; 659 bool is_root_for_isolated_group_ : 1;
666 bool use_parent_backface_visibility_ : 1; 660 bool use_parent_backface_visibility_ : 1;
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 // Group of properties that need to be computed based on the layer tree 728 // Group of properties that need to be computed based on the layer tree
735 // hierarchy before layers can be drawn. 729 // hierarchy before layers can be drawn.
736 DrawProperties draw_properties_; 730 DrawProperties draw_properties_;
737 PerformanceProperties<LayerImpl> performance_properties_; 731 PerformanceProperties<LayerImpl> performance_properties_;
738 732
739 std::unique_ptr<base::trace_event::ConvertableToTraceFormat> 733 std::unique_ptr<base::trace_event::ConvertableToTraceFormat>
740 owned_debug_info_; 734 owned_debug_info_;
741 base::trace_event::ConvertableToTraceFormat* debug_info_; 735 base::trace_event::ConvertableToTraceFormat* debug_info_;
742 std::unique_ptr<RenderSurfaceImpl> render_surface_; 736 std::unique_ptr<RenderSurfaceImpl> render_surface_;
743 737
744 bool force_render_surface_;
745
746 bool scrolls_drawn_descendant_; 738 bool scrolls_drawn_descendant_;
747 // If true, the layer or one of its descendants has a touch handler. 739 // If true, the layer or one of its descendants has a touch handler.
748 bool layer_or_descendant_has_touch_handler_; 740 bool layer_or_descendant_has_touch_handler_;
749 741
750 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 742 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
751 }; 743 };
752 744
753 } // namespace cc 745 } // namespace cc
754 746
755 #endif // CC_LAYERS_LAYER_IMPL_H_ 747 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698