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 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 // The global depth value of the center of the layer. This value is used | 587 // The global depth value of the center of the layer. This value is used |
591 // to sort layers from back to front. | 588 // to sort layers from back to front. |
592 float draw_depth_; | 589 float draw_depth_; |
593 | 590 |
594 // Debug layer name. | 591 // Debug layer name. |
595 std::string debug_name_; | 592 std::string debug_name_; |
596 CompositingReasons compositing_reasons_; | 593 CompositingReasons compositing_reasons_; |
597 | 594 |
598 FilterOperations filters_; | 595 FilterOperations filters_; |
599 FilterOperations background_filters_; | 596 FilterOperations background_filters_; |
600 skia::RefPtr<SkImageFilter> filter_; | |
601 | 597 |
602 protected: | 598 protected: |
603 DrawMode current_draw_mode_; | 599 DrawMode current_draw_mode_; |
604 | 600 |
605 private: | 601 private: |
606 // Rect indicating what was repainted/updated during update. | 602 // Rect indicating what was repainted/updated during update. |
607 // Note that plugin layers bypass this and leave it empty. | 603 // Note that plugin layers bypass this and leave it empty. |
608 // Uses layer's content space. | 604 // Uses layer's content space. |
609 gfx::RectF update_rect_; | 605 gfx::RectF update_rect_; |
610 | 606 |
(...skipping 13 matching lines...) Expand all Loading... |
624 // Group of properties that need to be computed based on the layer tree | 620 // Group of properties that need to be computed based on the layer tree |
625 // hierarchy before layers can be drawn. | 621 // hierarchy before layers can be drawn. |
626 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; | 622 DrawProperties<LayerImpl, RenderSurfaceImpl> draw_properties_; |
627 | 623 |
628 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 624 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
629 }; | 625 }; |
630 | 626 |
631 } // namespace cc | 627 } // namespace cc |
632 | 628 |
633 #endif // CC_LAYERS_LAYER_IMPL_H_ | 629 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |