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 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 SkColor SafeOpaqueBackgroundColor() const; | 186 SkColor SafeOpaqueBackgroundColor() const; |
187 | 187 |
188 void SetFilters(const FilterOperations& filters); | 188 void SetFilters(const FilterOperations& filters); |
189 const FilterOperations& filters() const { return filters_; } | 189 const FilterOperations& filters() const { return filters_; } |
190 | 190 |
191 void SetBackgroundFilters(const FilterOperations& filters); | 191 void SetBackgroundFilters(const FilterOperations& filters); |
192 const FilterOperations& background_filters() const { | 192 const FilterOperations& background_filters() const { |
193 return background_filters_; | 193 return background_filters_; |
194 } | 194 } |
195 | 195 |
196 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); | |
197 skia::RefPtr<SkImageFilter> filter() const { return filter_; } | |
198 | |
199 void SetMasksToBounds(bool masks_to_bounds); | 196 void SetMasksToBounds(bool masks_to_bounds); |
200 bool masks_to_bounds() const { return masks_to_bounds_; } | 197 bool masks_to_bounds() const { return masks_to_bounds_; } |
201 | 198 |
202 void SetContentsOpaque(bool opaque); | 199 void SetContentsOpaque(bool opaque); |
203 bool contents_opaque() const { return contents_opaque_; } | 200 bool contents_opaque() const { return contents_opaque_; } |
204 | 201 |
205 void SetOpacity(float opacity); | 202 void SetOpacity(float opacity); |
206 float opacity() const { return opacity_; } | 203 float opacity() const { return opacity_; } |
207 bool OpacityIsAnimating() const; | 204 bool OpacityIsAnimating() const; |
208 bool OpacityIsAnimatingOnImplOnly() const; | 205 bool OpacityIsAnimatingOnImplOnly() const; |
(...skipping 383 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
592 // The global depth value of the center of the layer. This value is used | 589 // The global depth value of the center of the layer. This value is used |
593 // to sort layers from back to front. | 590 // to sort layers from back to front. |
594 float draw_depth_; | 591 float draw_depth_; |
595 | 592 |
596 // Debug layer name. | 593 // Debug layer name. |
597 std::string debug_name_; | 594 std::string debug_name_; |
598 CompositingReasons compositing_reasons_; | 595 CompositingReasons compositing_reasons_; |
599 | 596 |
600 FilterOperations filters_; | 597 FilterOperations filters_; |
601 FilterOperations background_filters_; | 598 FilterOperations background_filters_; |
602 skia::RefPtr<SkImageFilter> filter_; | |
603 | 599 |
604 protected: | 600 protected: |
605 DrawMode current_draw_mode_; | 601 DrawMode current_draw_mode_; |
606 | 602 |
607 private: | 603 private: |
608 // Rect indicating what was repainted/updated during update. | 604 // Rect indicating what was repainted/updated during update. |
609 // Note that plugin layers bypass this and leave it empty. | 605 // Note that plugin layers bypass this and leave it empty. |
610 // Uses layer's content space. | 606 // Uses layer's content space. |
611 gfx::RectF update_rect_; | 607 gfx::RectF update_rect_; |
612 | 608 |
(...skipping 13 matching lines...) Expand all Loading... |
626 // Group of properties that need to be computed based on the layer tree | 622 // Group of properties that need to be computed based on the layer tree |
627 // hierarchy before layers can be drawn. | 623 // hierarchy before layers can be drawn. |
628 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 624 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
629 | 625 |
630 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 626 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
631 }; | 627 }; |
632 | 628 |
633 } // namespace cc | 629 } // namespace cc |
634 | 630 |
635 #endif // CC_LAYERS_LAYER_IMPL_H_ | 631 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |