Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2010 The Chromium Authors. All rights reserved. | 1 // Copyright 2010 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_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
| 6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 119 const Layer* mask_layer() const { return mask_layer_.get(); } | 119 const Layer* mask_layer() const { return mask_layer_.get(); } |
| 120 | 120 |
| 121 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); | 121 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); |
| 122 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } | 122 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } |
| 123 | 123 |
| 124 void SetOpacity(float opacity); | 124 void SetOpacity(float opacity); |
| 125 float opacity() const { return opacity_; } | 125 float opacity() const { return opacity_; } |
| 126 bool OpacityIsAnimating() const; | 126 bool OpacityIsAnimating() const; |
| 127 virtual bool OpacityCanAnimateOnImplThread() const; | 127 virtual bool OpacityCanAnimateOnImplThread() const; |
| 128 | 128 |
| 129 void SetBlendMode(SkXfermode::Mode blend_mode); | |
|
enne (OOO)
2013/11/01 18:49:02
Can you help my understanding of the blend mode sp
rosca
2013/11/04 17:14:35
It sounds good, thanks. I added checks for this.
| |
| 130 SkXfermode::Mode blend_mode() const { return blend_mode_; } | |
| 131 | |
| 132 bool uses_default_blend_mode() const { | |
| 133 return blend_mode_ == SkXfermode::kSrcOver_Mode; | |
| 134 } | |
| 135 | |
| 136 void SetIsRootForIsolatedGroup(bool root); | |
| 137 bool is_root_for_isolated_group() const { | |
| 138 return is_root_for_isolated_group_; | |
| 139 } | |
| 140 | |
| 129 void SetFilters(const FilterOperations& filters); | 141 void SetFilters(const FilterOperations& filters); |
| 130 const FilterOperations& filters() const { return filters_; } | 142 const FilterOperations& filters() const { return filters_; } |
| 131 bool FilterIsAnimating() const; | 143 bool FilterIsAnimating() const; |
| 132 | 144 |
| 133 // Background filters are filters applied to what is behind this layer, when | 145 // Background filters are filters applied to what is behind this layer, when |
| 134 // they are viewed through non-opaque regions in this layer. They are used | 146 // they are viewed through non-opaque regions in this layer. They are used |
| 135 // through the WebLayer interface, and are not exposed to HTML. | 147 // through the WebLayer interface, and are not exposed to HTML. |
| 136 void SetBackgroundFilters(const FilterOperations& filters); | 148 void SetBackgroundFilters(const FilterOperations& filters); |
| 137 const FilterOperations& background_filters() const { | 149 const FilterOperations& background_filters() const { |
| 138 return background_filters_; | 150 return background_filters_; |
| (...skipping 407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 546 bool have_wheel_event_handlers_; | 558 bool have_wheel_event_handlers_; |
| 547 bool user_scrollable_horizontal_; | 559 bool user_scrollable_horizontal_; |
| 548 bool user_scrollable_vertical_; | 560 bool user_scrollable_vertical_; |
| 549 Region non_fast_scrollable_region_; | 561 Region non_fast_scrollable_region_; |
| 550 Region touch_event_handler_region_; | 562 Region touch_event_handler_region_; |
| 551 gfx::PointF position_; | 563 gfx::PointF position_; |
| 552 gfx::PointF anchor_point_; | 564 gfx::PointF anchor_point_; |
| 553 SkColor background_color_; | 565 SkColor background_color_; |
| 554 CompositingReasons compositing_reasons_; | 566 CompositingReasons compositing_reasons_; |
| 555 float opacity_; | 567 float opacity_; |
| 568 SkXfermode::Mode blend_mode_; | |
| 569 bool is_root_for_isolated_group_; | |
| 556 FilterOperations filters_; | 570 FilterOperations filters_; |
| 557 FilterOperations background_filters_; | 571 FilterOperations background_filters_; |
| 558 float anchor_point_z_; | 572 float anchor_point_z_; |
| 559 bool is_container_for_fixed_position_layers_; | 573 bool is_container_for_fixed_position_layers_; |
| 560 LayerPositionConstraint position_constraint_; | 574 LayerPositionConstraint position_constraint_; |
| 561 bool is_drawable_; | 575 bool is_drawable_; |
| 562 bool hide_layer_and_subtree_; | 576 bool hide_layer_and_subtree_; |
| 563 bool masks_to_bounds_; | 577 bool masks_to_bounds_; |
| 564 bool contents_opaque_; | 578 bool contents_opaque_; |
| 565 bool double_sided_; | 579 bool double_sided_; |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 591 DrawProperties<Layer> draw_properties_; | 605 DrawProperties<Layer> draw_properties_; |
| 592 | 606 |
| 593 PaintProperties paint_properties_; | 607 PaintProperties paint_properties_; |
| 594 | 608 |
| 595 DISALLOW_COPY_AND_ASSIGN(Layer); | 609 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 596 }; | 610 }; |
| 597 | 611 |
| 598 } // namespace cc | 612 } // namespace cc |
| 599 | 613 |
| 600 #endif // CC_LAYERS_LAYER_H_ | 614 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |