| OLD | NEW |
| 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 <map> | 8 #include <map> |
| 9 #include <set> | 9 #include <set> |
| 10 #include <string> | 10 #include <string> |
| (...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 311 | 311 |
| 312 void SetContentsOpaque(bool opaque); | 312 void SetContentsOpaque(bool opaque); |
| 313 bool contents_opaque() const { return contents_opaque_; } | 313 bool contents_opaque() const { return contents_opaque_; } |
| 314 | 314 |
| 315 void SetOpacity(float opacity); | 315 void SetOpacity(float opacity); |
| 316 float opacity() const { return opacity_; } | 316 float opacity() const { return opacity_; } |
| 317 bool OpacityIsAnimating() const; | 317 bool OpacityIsAnimating() const; |
| 318 bool HasPotentiallyRunningOpacityAnimation() const; | 318 bool HasPotentiallyRunningOpacityAnimation() const; |
| 319 bool OpacityIsAnimatingOnImplOnly() const; | 319 bool OpacityIsAnimatingOnImplOnly() const; |
| 320 | 320 |
| 321 void SetElementId(uint64_t element_id); |
| 322 uint64_t element_id() const { return element_id_; } |
| 323 |
| 324 void SetMutableProperties(uint32_t properties); |
| 325 uint32_t mutable_properties() const { return mutable_properties_; } |
| 326 |
| 321 void SetBlendMode(SkXfermode::Mode); | 327 void SetBlendMode(SkXfermode::Mode); |
| 322 SkXfermode::Mode blend_mode() const { return blend_mode_; } | 328 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 323 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { | 329 void set_draw_blend_mode(SkXfermode::Mode blend_mode) { |
| 324 if (draw_blend_mode_ == blend_mode) | 330 if (draw_blend_mode_ == blend_mode) |
| 325 return; | 331 return; |
| 326 draw_blend_mode_ = blend_mode; | 332 draw_blend_mode_ = blend_mode; |
| 327 SetNeedsPushProperties(); | 333 SetNeedsPushProperties(); |
| 328 } | 334 } |
| 329 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } | 335 SkXfermode::Mode draw_blend_mode() const { return draw_blend_mode_; } |
| 330 bool uses_default_blend_mode() const { | 336 bool uses_default_blend_mode() const { |
| (...skipping 498 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 829 int num_dependents_need_push_properties_; | 835 int num_dependents_need_push_properties_; |
| 830 | 836 |
| 831 // Layers that share a sorting context id will be sorted together in 3d | 837 // Layers that share a sorting context id will be sorted together in 3d |
| 832 // space. 0 is a special value that means this layer will not be sorted and | 838 // space. 0 is a special value that means this layer will not be sorted and |
| 833 // will be drawn in paint order. | 839 // will be drawn in paint order. |
| 834 int sorting_context_id_; | 840 int sorting_context_id_; |
| 835 | 841 |
| 836 DrawMode current_draw_mode_; | 842 DrawMode current_draw_mode_; |
| 837 | 843 |
| 838 private: | 844 private: |
| 845 uint64_t element_id_; |
| 846 uint32_t mutable_properties_; |
| 839 // Rect indicating what was repainted/updated during update. | 847 // Rect indicating what was repainted/updated during update. |
| 840 // Note that plugin layers bypass this and leave it empty. | 848 // Note that plugin layers bypass this and leave it empty. |
| 841 // This is in the layer's space. | 849 // This is in the layer's space. |
| 842 gfx::Rect update_rect_; | 850 gfx::Rect update_rect_; |
| 843 | 851 |
| 844 // Denotes an area that is damaged and needs redraw. This is in the layer's | 852 // Denotes an area that is damaged and needs redraw. This is in the layer's |
| 845 // space. | 853 // space. |
| 846 gfx::Rect damage_rect_; | 854 gfx::Rect damage_rect_; |
| 847 | 855 |
| 848 // Manages animations for this layer. | 856 // Manages animations for this layer. |
| (...skipping 16 matching lines...) Expand all Loading... |
| 865 // If true, the layer or one of its descendants has a wheel or touch handler. | 873 // If true, the layer or one of its descendants has a wheel or touch handler. |
| 866 bool layer_or_descendant_has_input_handler_; | 874 bool layer_or_descendant_has_input_handler_; |
| 867 bool sorted_for_recursion_; | 875 bool sorted_for_recursion_; |
| 868 | 876 |
| 869 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 877 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 870 }; | 878 }; |
| 871 | 879 |
| 872 } // namespace cc | 880 } // namespace cc |
| 873 | 881 |
| 874 #endif // CC_LAYERS_LAYER_IMPL_H_ | 882 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |