| OLD | NEW |
| 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 Loading... |
| 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 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 555 |
| 555 void SetMutableProperties(uint32_t properties); | 556 void SetMutableProperties(uint32_t properties); |
| 556 uint32_t mutable_properties() const { return mutable_properties_; } | 557 uint32_t mutable_properties() const { return mutable_properties_; } |
| 557 | 558 |
| 558 void set_visited(bool visited); | 559 void set_visited(bool visited); |
| 559 bool visited(); | 560 bool visited(); |
| 560 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); | 561 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn); |
| 561 bool layer_or_descendant_is_drawn(); | 562 bool layer_or_descendant_is_drawn(); |
| 562 void set_sorted_for_recursion(bool sorted_for_recursion); | 563 void set_sorted_for_recursion(bool sorted_for_recursion); |
| 563 bool sorted_for_recursion(); | 564 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 | 565 |
| 571 // LayerAnimationValueProvider implementation. | 566 // LayerAnimationValueProvider implementation. |
| 572 gfx::ScrollOffset ScrollOffsetForAnimation() const override; | 567 gfx::ScrollOffset ScrollOffsetForAnimation() const override; |
| 573 | 568 |
| 574 // LayerAnimationValueObserver implementation. | 569 // LayerAnimationValueObserver implementation. |
| 575 void OnFilterAnimated(const FilterOperations& filters) override; | 570 void OnFilterAnimated(const FilterOperations& filters) override; |
| 576 void OnOpacityAnimated(float opacity) override; | 571 void OnOpacityAnimated(float opacity) override; |
| 577 void OnTransformAnimated(const gfx::Transform& transform) override; | 572 void OnTransformAnimated(const gfx::Transform& transform) override; |
| 578 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; | 573 void OnScrollOffsetAnimated(const gfx::ScrollOffset& scroll_offset) override; |
| 579 void OnAnimationWaitingForDeletion() override; | 574 void OnAnimationWaitingForDeletion() override; |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 | 781 |
| 787 PaintProperties paint_properties_; | 782 PaintProperties paint_properties_; |
| 788 | 783 |
| 789 // These all act like draw properties, so don't need push properties. | 784 // These all act like draw properties, so don't need push properties. |
| 790 gfx::Rect visible_layer_rect_; | 785 gfx::Rect visible_layer_rect_; |
| 791 gfx::Rect clip_rect_; | 786 gfx::Rect clip_rect_; |
| 792 size_t num_unclipped_descendants_; | 787 size_t num_unclipped_descendants_; |
| 793 | 788 |
| 794 std::vector<FrameTimingRequest> frame_timing_requests_; | 789 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 795 bool frame_timing_requests_dirty_; | 790 bool frame_timing_requests_dirty_; |
| 796 bool is_hidden_from_property_trees_; | |
| 797 | 791 |
| 798 DISALLOW_COPY_AND_ASSIGN(Layer); | 792 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 799 }; | 793 }; |
| 800 | 794 |
| 801 } // namespace cc | 795 } // namespace cc |
| 802 | 796 |
| 803 #endif // CC_LAYERS_LAYER_H_ | 797 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |