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 189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
200 bool masks_to_bounds() const { return masks_to_bounds_; } | 200 bool masks_to_bounds() const { return masks_to_bounds_; } |
201 | 201 |
202 void SetContentsOpaque(bool opaque); | 202 void SetContentsOpaque(bool opaque); |
203 bool contents_opaque() const { return contents_opaque_; } | 203 bool contents_opaque() const { return contents_opaque_; } |
204 | 204 |
205 void SetOpacity(float opacity); | 205 void SetOpacity(float opacity); |
206 float opacity() const { return opacity_; } | 206 float opacity() const { return opacity_; } |
207 bool OpacityIsAnimating() const; | 207 bool OpacityIsAnimating() const; |
208 bool OpacityIsAnimatingOnImplOnly() const; | 208 bool OpacityIsAnimatingOnImplOnly() const; |
209 | 209 |
| 210 void SetBlendMode(SkXfermode::Mode); |
| 211 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 212 bool has_blend_mode() const { |
| 213 return blend_mode_ != SkXfermode::kSrcOver_Mode; |
| 214 } |
| 215 |
| 216 void SetIsRootForIsolatedGroup(bool root); |
| 217 bool is_root_for_isolated_group() const { |
| 218 return is_root_for_isolated_group_; |
| 219 } |
| 220 |
210 void SetPosition(gfx::PointF position); | 221 void SetPosition(gfx::PointF position); |
211 gfx::PointF position() const { return position_; } | 222 gfx::PointF position() const { return position_; } |
212 | 223 |
213 void SetIsContainerForFixedPositionLayers(bool container) { | 224 void SetIsContainerForFixedPositionLayers(bool container) { |
214 is_container_for_fixed_position_layers_ = container; | 225 is_container_for_fixed_position_layers_ = container; |
215 } | 226 } |
216 // This is a non-trivial function in Layer. | 227 // This is a non-trivial function in Layer. |
217 bool IsContainerForFixedPositionLayers() const { | 228 bool IsContainerForFixedPositionLayers() const { |
218 return is_container_for_fixed_position_layers_; | 229 return is_container_for_fixed_position_layers_; |
219 } | 230 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 // Indicates that a property has changed on this layer that would not | 567 // Indicates that a property has changed on this layer that would not |
557 // affect the pixels on its target surface, but would require redrawing | 568 // affect the pixels on its target surface, but would require redrawing |
558 // the target_surface onto its ancestor target_surface. | 569 // the target_surface onto its ancestor target_surface. |
559 // For layers that do not own a surface this flag acts as | 570 // For layers that do not own a surface this flag acts as |
560 // layer_property_changed_. | 571 // layer_property_changed_. |
561 bool layer_surface_property_changed_; | 572 bool layer_surface_property_changed_; |
562 | 573 |
563 bool masks_to_bounds_; | 574 bool masks_to_bounds_; |
564 bool contents_opaque_; | 575 bool contents_opaque_; |
565 float opacity_; | 576 float opacity_; |
| 577 SkXfermode::Mode blend_mode_; |
| 578 bool is_root_for_isolated_group_; |
566 gfx::PointF position_; | 579 gfx::PointF position_; |
567 bool preserves_3d_; | 580 bool preserves_3d_; |
568 bool use_parent_backface_visibility_; | 581 bool use_parent_backface_visibility_; |
569 bool draw_checkerboard_for_missing_tiles_; | 582 bool draw_checkerboard_for_missing_tiles_; |
570 gfx::Transform sublayer_transform_; | 583 gfx::Transform sublayer_transform_; |
571 gfx::Transform transform_; | 584 gfx::Transform transform_; |
572 | 585 |
573 bool draws_content_; | 586 bool draws_content_; |
574 bool hide_layer_and_subtree_; | 587 bool hide_layer_and_subtree_; |
575 bool force_render_surface_; | 588 bool force_render_surface_; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
624 // Group of properties that need to be computed based on the layer tree | 637 // Group of properties that need to be computed based on the layer tree |
625 // hierarchy before layers can be drawn. | 638 // hierarchy before layers can be drawn. |
626 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 639 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
627 | 640 |
628 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 641 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
629 }; | 642 }; |
630 | 643 |
631 } // namespace cc | 644 } // namespace cc |
632 | 645 |
633 #endif // CC_LAYERS_LAYER_IMPL_H_ | 646 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |