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 <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
206 bool masks_to_bounds() const { return masks_to_bounds_; } | 206 bool masks_to_bounds() const { return masks_to_bounds_; } |
207 | 207 |
208 void SetContentsOpaque(bool opaque); | 208 void SetContentsOpaque(bool opaque); |
209 bool contents_opaque() const { return contents_opaque_; } | 209 bool contents_opaque() const { return contents_opaque_; } |
210 | 210 |
211 void SetOpacity(float opacity); | 211 void SetOpacity(float opacity); |
212 float opacity() const { return opacity_; } | 212 float opacity() const { return opacity_; } |
213 bool OpacityIsAnimating() const; | 213 bool OpacityIsAnimating() const; |
214 bool OpacityIsAnimatingOnImplOnly() const; | 214 bool OpacityIsAnimatingOnImplOnly() const; |
215 | 215 |
| 216 void SetBlendMode(SkXfermode::Mode); |
| 217 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 218 bool uses_default_blend_mode() const { |
| 219 return blend_mode_ == SkXfermode::kSrcOver_Mode; |
| 220 } |
| 221 |
| 222 void SetIsRootForIsolatedGroup(bool root); |
| 223 bool is_root_for_isolated_group() const { |
| 224 return is_root_for_isolated_group_; |
| 225 } |
| 226 |
216 void SetPosition(gfx::PointF position); | 227 void SetPosition(gfx::PointF position); |
217 gfx::PointF position() const { return position_; } | 228 gfx::PointF position() const { return position_; } |
218 | 229 |
219 void SetIsContainerForFixedPositionLayers(bool container) { | 230 void SetIsContainerForFixedPositionLayers(bool container) { |
220 is_container_for_fixed_position_layers_ = container; | 231 is_container_for_fixed_position_layers_ = container; |
221 } | 232 } |
222 // This is a non-trivial function in Layer. | 233 // This is a non-trivial function in Layer. |
223 bool IsContainerForFixedPositionLayers() const { | 234 bool IsContainerForFixedPositionLayers() const { |
224 return is_container_for_fixed_position_layers_; | 235 return is_container_for_fixed_position_layers_; |
225 } | 236 } |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
564 | 575 |
565 // Whether the "back" of this layer should draw. | 576 // Whether the "back" of this layer should draw. |
566 bool double_sided_; | 577 bool double_sided_; |
567 | 578 |
568 // Tracks if drawing-related properties have changed since last redraw. | 579 // Tracks if drawing-related properties have changed since last redraw. |
569 bool layer_property_changed_; | 580 bool layer_property_changed_; |
570 | 581 |
571 bool masks_to_bounds_; | 582 bool masks_to_bounds_; |
572 bool contents_opaque_; | 583 bool contents_opaque_; |
573 float opacity_; | 584 float opacity_; |
| 585 SkXfermode::Mode blend_mode_; |
| 586 bool is_root_for_isolated_group_; |
574 gfx::PointF position_; | 587 gfx::PointF position_; |
575 bool preserves_3d_; | 588 bool preserves_3d_; |
576 bool use_parent_backface_visibility_; | 589 bool use_parent_backface_visibility_; |
577 bool draw_checkerboard_for_missing_tiles_; | 590 bool draw_checkerboard_for_missing_tiles_; |
578 gfx::Transform sublayer_transform_; | 591 gfx::Transform sublayer_transform_; |
579 gfx::Transform transform_; | 592 gfx::Transform transform_; |
580 | 593 |
581 bool draws_content_; | 594 bool draws_content_; |
582 bool hide_layer_and_subtree_; | 595 bool hide_layer_and_subtree_; |
583 bool force_render_surface_; | 596 bool force_render_surface_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 // Group of properties that need to be computed based on the layer tree | 644 // Group of properties that need to be computed based on the layer tree |
632 // hierarchy before layers can be drawn. | 645 // hierarchy before layers can be drawn. |
633 DrawProperties<LayerImpl> draw_properties_; | 646 DrawProperties<LayerImpl> draw_properties_; |
634 | 647 |
635 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 648 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
636 }; | 649 }; |
637 | 650 |
638 } // namespace cc | 651 } // namespace cc |
639 | 652 |
640 #endif // CC_LAYERS_LAYER_IMPL_H_ | 653 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |