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