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

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

Issue 1633203002: cc :: Reland compute if layer is drawn from property trees (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/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 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
134 134
135 void SetMaskLayer(Layer* mask_layer); 135 void SetMaskLayer(Layer* mask_layer);
136 Layer* mask_layer() { return mask_layer_.get(); } 136 Layer* mask_layer() { return mask_layer_.get(); }
137 const Layer* mask_layer() const { return mask_layer_.get(); } 137 const Layer* mask_layer() const { return mask_layer_.get(); }
138 138
139 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); 139 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect);
140 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } 140 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); }
141 141
142 void SetOpacity(float opacity); 142 void SetOpacity(float opacity);
143 float opacity() const { return opacity_; } 143 float opacity() const { return opacity_; }
144 float EffectiveOpacity() const;
144 bool OpacityIsAnimating() const; 145 bool OpacityIsAnimating() const;
145 bool HasPotentiallyRunningOpacityAnimation() const; 146 bool HasPotentiallyRunningOpacityAnimation() const;
146 virtual bool OpacityCanAnimateOnImplThread() const; 147 virtual bool OpacityCanAnimateOnImplThread() const;
147 148
148 void SetBlendMode(SkXfermode::Mode blend_mode); 149 void SetBlendMode(SkXfermode::Mode blend_mode);
149 SkXfermode::Mode blend_mode() const { return blend_mode_; } 150 SkXfermode::Mode blend_mode() const { return blend_mode_; }
150 151
151 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { 152 void set_draw_blend_mode(SkXfermode::Mode blend_mode) {
152 if (draw_blend_mode_ == blend_mode) 153 if (draw_blend_mode_ == blend_mode)
153 return; 154 return;
(...skipping 399 matching lines...) Expand 10 before | Expand all | Expand 10 after
553 554
554 void SetMutableProperties(uint32_t properties); 555 void SetMutableProperties(uint32_t properties);
555 uint32_t mutable_properties() const { return mutable_properties_; } 556 uint32_t mutable_properties() const { return mutable_properties_; }
556 557
557 void set_visited(bool visited); 558 void set_visited(bool visited);
558 bool visited(); 559 bool visited();
559 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); 560 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn);
560 bool layer_or_descendant_is_drawn(); 561 bool layer_or_descendant_is_drawn();
561 void set_sorted_for_recursion(bool sorted_for_recursion); 562 void set_sorted_for_recursion(bool sorted_for_recursion);
562 bool sorted_for_recursion(); 563 bool sorted_for_recursion();
563 void set_is_hidden_from_property_trees(bool is_hidden) {
564 if (is_hidden == is_hidden_from_property_trees_)
565 return;
566 is_hidden_from_property_trees_ = is_hidden;
567 SetNeedsPushProperties();
568 }
569 564
570 // LayerAnimationValueProvider implementation. 565 // LayerAnimationValueProvider implementation.
571 gfx::ScrollOffset ScrollOffsetForAnimation() const override; 566 gfx::ScrollOffset ScrollOffsetForAnimation() const override;
572 567
573 // LayerAnimationValueObserver implementation. 568 // LayerAnimationValueObserver implementation.
574 void OnFilterAnimated(const FilterOperations& filters) override; 569 void OnFilterAnimated(const FilterOperations& filters) override;
575 void OnOpacityAnimated(float opacity) override; 570 void OnOpacityAnimated(float opacity) override;
576 void OnTransformAnimated(const gfx::Transform& transform) override; 571 void OnTransformAnimated(const gfx::Transform& transform) override;
577 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; 572 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override;
578 void OnAnimationWaitingForDeletion() override; 573 void OnAnimationWaitingForDeletion() override;
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
785 780
786 PaintProperties paint_properties_; 781 PaintProperties paint_properties_;
787 782
788 // These all act like draw properties, so don't need push properties. 783 // These all act like draw properties, so don't need push properties.
789 gfx::Rect visible_layer_rect_; 784 gfx::Rect visible_layer_rect_;
790 gfx::Rect clip_rect_; 785 gfx::Rect clip_rect_;
791 size_t num_unclipped_descendants_; 786 size_t num_unclipped_descendants_;
792 787
793 std::vector<FrameTimingRequest> frame_timing_requests_; 788 std::vector<FrameTimingRequest> frame_timing_requests_;
794 bool frame_timing_requests_dirty_; 789 bool frame_timing_requests_dirty_;
795 bool is_hidden_from_property_trees_;
796 790
797 DISALLOW_COPY_AND_ASSIGN(Layer); 791 DISALLOW_COPY_AND_ASSIGN(Layer);
798 }; 792 };
799 793
800 } // namespace cc 794 } // namespace cc
801 795
802 #endif // CC_LAYERS_LAYER_H_ 796 #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