| 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 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 114 const Layer* mask_layer() const { return mask_layer_.get(); } | 114 const Layer* mask_layer() const { return mask_layer_.get(); } |
| 115 | 115 |
| 116 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); | 116 virtual void SetNeedsDisplayRect(const gfx::RectF& dirty_rect); |
| 117 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } | 117 void SetNeedsDisplay() { SetNeedsDisplayRect(gfx::RectF(bounds())); } |
| 118 | 118 |
| 119 void SetOpacity(float opacity); | 119 void SetOpacity(float opacity); |
| 120 float opacity() const { return opacity_; } | 120 float opacity() const { return opacity_; } |
| 121 bool OpacityIsAnimating() const; | 121 bool OpacityIsAnimating() const; |
| 122 virtual bool OpacityCanAnimateOnImplThread() const; | 122 virtual bool OpacityCanAnimateOnImplThread() const; |
| 123 | 123 |
| 124 void SetBlendMode(SkXfermode::Mode blendMode); |
| 125 SkXfermode::Mode blend_mode() const { return blend_mode_; } |
| 126 |
| 127 bool has_blend_mode() const { |
| 128 return blend_mode_ != SkXfermode::kSrcOver_Mode; |
| 129 } |
| 130 |
| 131 void SetIsRootForIsolatedGroup(bool root); |
| 132 bool is_root_for_isolated_group() const { |
| 133 return is_root_for_isolated_group_; |
| 134 } |
| 135 |
| 124 void SetFilters(const FilterOperations& filters); | 136 void SetFilters(const FilterOperations& filters); |
| 125 const FilterOperations& filters() const { return filters_; } | 137 const FilterOperations& filters() const { return filters_; } |
| 126 | 138 |
| 127 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); | 139 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); |
| 128 skia::RefPtr<SkImageFilter> filter() const { return filter_; } | 140 skia::RefPtr<SkImageFilter> filter() const { return filter_; } |
| 129 | 141 |
| 130 // Background filters are filters applied to what is behind this layer, when | 142 // Background filters are filters applied to what is behind this layer, when |
| 131 // they are viewed through non-opaque regions in this layer. They are used | 143 // they are viewed through non-opaque regions in this layer. They are used |
| 132 // through the WebLayer interface, and are not exposed to HTML. | 144 // through the WebLayer interface, and are not exposed to HTML. |
| 133 void SetBackgroundFilters(const FilterOperations& filters); | 145 void SetBackgroundFilters(const FilterOperations& filters); |
| (...skipping 402 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 536 bool scrollable_; | 548 bool scrollable_; |
| 537 bool should_scroll_on_main_thread_; | 549 bool should_scroll_on_main_thread_; |
| 538 bool have_wheel_event_handlers_; | 550 bool have_wheel_event_handlers_; |
| 539 Region non_fast_scrollable_region_; | 551 Region non_fast_scrollable_region_; |
| 540 Region touch_event_handler_region_; | 552 Region touch_event_handler_region_; |
| 541 gfx::PointF position_; | 553 gfx::PointF position_; |
| 542 gfx::PointF anchor_point_; | 554 gfx::PointF anchor_point_; |
| 543 SkColor background_color_; | 555 SkColor background_color_; |
| 544 CompositingReasons compositing_reasons_; | 556 CompositingReasons compositing_reasons_; |
| 545 float opacity_; | 557 float opacity_; |
| 558 SkXfermode::Mode blend_mode_; |
| 559 bool is_root_for_isolated_group_; |
| 546 skia::RefPtr<SkImageFilter> filter_; | 560 skia::RefPtr<SkImageFilter> filter_; |
| 547 FilterOperations filters_; | 561 FilterOperations filters_; |
| 548 FilterOperations background_filters_; | 562 FilterOperations background_filters_; |
| 549 float anchor_point_z_; | 563 float anchor_point_z_; |
| 550 bool is_container_for_fixed_position_layers_; | 564 bool is_container_for_fixed_position_layers_; |
| 551 LayerPositionConstraint position_constraint_; | 565 LayerPositionConstraint position_constraint_; |
| 552 bool is_drawable_; | 566 bool is_drawable_; |
| 553 bool hide_layer_and_subtree_; | 567 bool hide_layer_and_subtree_; |
| 554 bool masks_to_bounds_; | 568 bool masks_to_bounds_; |
| 555 bool contents_opaque_; | 569 bool contents_opaque_; |
| (...skipping 26 matching lines...) Expand all Loading... |
| 582 DrawProperties<Layer, RenderSurface> draw_properties_; | 596 DrawProperties<Layer, RenderSurface> draw_properties_; |
| 583 | 597 |
| 584 PaintProperties paint_properties_; | 598 PaintProperties paint_properties_; |
| 585 | 599 |
| 586 DISALLOW_COPY_AND_ASSIGN(Layer); | 600 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 587 }; | 601 }; |
| 588 | 602 |
| 589 } // namespace cc | 603 } // namespace cc |
| 590 | 604 |
| 591 #endif // CC_LAYERS_LAYER_H_ | 605 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |