| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 122 const Layer* mask_layer() const { return inputs_.mask_layer.get(); } | 122 const Layer* mask_layer() const { return inputs_.mask_layer.get(); } |
| 123 | 123 |
| 124 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); | 124 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); |
| 125 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } | 125 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } |
| 126 | 126 |
| 127 virtual void SetOpacity(float opacity); | 127 virtual void SetOpacity(float opacity); |
| 128 float opacity() const { return inputs_.opacity; } | 128 float opacity() const { return inputs_.opacity; } |
| 129 float EffectiveOpacity() const; | 129 float EffectiveOpacity() const; |
| 130 virtual bool OpacityCanAnimateOnImplThread() const; | 130 virtual bool OpacityCanAnimateOnImplThread() const; |
| 131 | 131 |
| 132 virtual bool AlwaysUseActiveTreeOpacity() const; | |
| 133 | |
| 134 void SetBlendMode(SkBlendMode blend_mode); | 132 void SetBlendMode(SkBlendMode blend_mode); |
| 135 SkBlendMode blend_mode() const { return inputs_.blend_mode; } | 133 SkBlendMode blend_mode() const { return inputs_.blend_mode; } |
| 136 | 134 |
| 137 // A layer is root for an isolated group when it and all its descendants are | 135 // A layer is root for an isolated group when it and all its descendants are |
| 138 // drawn over a black and fully transparent background, creating an isolated | 136 // drawn over a black and fully transparent background, creating an isolated |
| 139 // group. It should be used along with SetBlendMode(), in order to restrict | 137 // group. It should be used along with SetBlendMode(), in order to restrict |
| 140 // layers within the group to blend with layers outside this group. | 138 // layers within the group to blend with layers outside this group. |
| 141 void SetIsRootForIsolatedGroup(bool root); | 139 void SetIsRootForIsolatedGroup(bool root); |
| 142 bool is_root_for_isolated_group() const { | 140 bool is_root_for_isolated_group() const { |
| 143 return inputs_.is_root_for_isolated_group; | 141 return inputs_.is_root_for_isolated_group; |
| (...skipping 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 629 // These all act like draw properties, so don't need push properties. | 627 // These all act like draw properties, so don't need push properties. |
| 630 gfx::Rect visible_layer_rect_; | 628 gfx::Rect visible_layer_rect_; |
| 631 size_t num_unclipped_descendants_; | 629 size_t num_unclipped_descendants_; |
| 632 | 630 |
| 633 DISALLOW_COPY_AND_ASSIGN(Layer); | 631 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 634 }; | 632 }; |
| 635 | 633 |
| 636 } // namespace cc | 634 } // namespace cc |
| 637 | 635 |
| 638 #endif // CC_LAYERS_LAYER_H_ | 636 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |