| 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 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 128 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); | 128 virtual void SetNeedsDisplayRect(const gfx::Rect& dirty_rect); |
| 129 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } | 129 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::Rect(bounds())); } |
| 130 | 130 |
| 131 void SetOpacity(float opacity); | 131 void SetOpacity(float opacity); |
| 132 float opacity() const { return opacity_; } | 132 float opacity() const { return opacity_; } |
| 133 float EffectiveOpacity() const; | 133 float EffectiveOpacity() const; |
| 134 bool OpacityIsAnimating() const; | 134 bool OpacityIsAnimating() const; |
| 135 bool HasPotentiallyRunningOpacityAnimation() const; | 135 bool HasPotentiallyRunningOpacityAnimation() const; |
| 136 virtual bool OpacityCanAnimateOnImplThread() const; | 136 virtual bool OpacityCanAnimateOnImplThread() const; |
| 137 | 137 |
| 138 virtual bool AlwaysUseActiveTreeOpacity() const; |
| 139 |
| 138 void SetBlendMode(SkXfermode::Mode blend_mode); | 140 void SetBlendMode(SkXfermode::Mode blend_mode); |
| 139 SkXfermode::Mode blend_mode() const { return blend_mode_; } | 141 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 140 | 142 |
| 141 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { | 143 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { |
| 142 if (draw_blend_mode_ == blend_mode) | 144 if (draw_blend_mode_ == blend_mode) |
| 143 return; | 145 return; |
| 144 draw_blend_mode_ = blend_mode; | 146 draw_blend_mode_ = blend_mode; |
| 145 SetNeedsPushProperties(); | 147 SetNeedsPushProperties(); |
| 146 } | 148 } |
| 147 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } | 149 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } |
| (...skipping 523 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 671 // These all act like draw properties, so don't need push properties. | 673 // These all act like draw properties, so don't need push properties. |
| 672 gfx::Rect visible_layer_rect_; | 674 gfx::Rect visible_layer_rect_; |
| 673 size_t num_unclipped_descendants_; | 675 size_t num_unclipped_descendants_; |
| 674 | 676 |
| 675 DISALLOW_COPY_AND_ASSIGN(Layer); | 677 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 676 }; | 678 }; |
| 677 | 679 |
| 678 } // namespace cc | 680 } // namespace cc |
| 679 | 681 |
| 680 #endif // CC_LAYERS_LAYER_H_ | 682 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |