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 uses_default_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 327 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 | 558 |
548 // Whether the "back" of this layer should draw. | 559 // Whether the "back" of this layer should draw. |
549 bool double_sided_; | 560 bool double_sided_; |
550 | 561 |
551 // Tracks if drawing-related properties have changed since last redraw. | 562 // Tracks if drawing-related properties have changed since last redraw. |
552 bool layer_property_changed_; | 563 bool layer_property_changed_; |
553 | 564 |
554 bool masks_to_bounds_; | 565 bool masks_to_bounds_; |
555 bool contents_opaque_; | 566 bool contents_opaque_; |
556 float opacity_; | 567 float opacity_; |
| 568 SkXfermode::Mode blend_mode_; |
| 569 bool is_root_for_isolated_group_; |
557 gfx::PointF position_; | 570 gfx::PointF position_; |
558 bool preserves_3d_; | 571 bool preserves_3d_; |
559 bool use_parent_backface_visibility_; | 572 bool use_parent_backface_visibility_; |
560 bool draw_checkerboard_for_missing_tiles_; | 573 bool draw_checkerboard_for_missing_tiles_; |
561 gfx::Transform sublayer_transform_; | 574 gfx::Transform sublayer_transform_; |
562 gfx::Transform transform_; | 575 gfx::Transform transform_; |
563 | 576 |
564 bool draws_content_; | 577 bool draws_content_; |
565 bool hide_layer_and_subtree_; | 578 bool hide_layer_and_subtree_; |
566 bool force_render_surface_; | 579 bool force_render_surface_; |
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 // Group of properties that need to be computed based on the layer tree | 627 // Group of properties that need to be computed based on the layer tree |
615 // hierarchy before layers can be drawn. | 628 // hierarchy before layers can be drawn. |
616 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 629 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
617 | 630 |
618 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 631 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
619 }; | 632 }; |
620 | 633 |
621 } // namespace cc | 634 } // namespace cc |
622 | 635 |
623 #endif // CC_LAYERS_LAYER_IMPL_H_ | 636 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |