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