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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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 SetFilters(const FilterOperations& filters); | 124 void SetFilters(const FilterOperations& filters); |
125 const FilterOperations& filters() const { return filters_; } | 125 const FilterOperations& filters() const { return filters_; } |
126 | 126 |
127 void SetFilter(const skia::RefPtr<SkImageFilter>& filter); | |
128 skia::RefPtr<SkImageFilter> filter() const { return filter_; } | |
129 | |
130 // Background filters are filters applied to what is behind this layer, when | 127 // 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 | 128 // they are viewed through non-opaque regions in this layer. They are used |
132 // through the WebLayer interface, and are not exposed to HTML. | 129 // through the WebLayer interface, and are not exposed to HTML. |
133 void SetBackgroundFilters(const FilterOperations& filters); | 130 void SetBackgroundFilters(const FilterOperations& filters); |
134 const FilterOperations& background_filters() const { | 131 const FilterOperations& background_filters() const { |
135 return background_filters_; | 132 return background_filters_; |
136 } | 133 } |
137 | 134 |
138 virtual void SetContentsOpaque(bool opaque); | 135 virtual void SetContentsOpaque(bool opaque); |
139 bool contents_opaque() const { return contents_opaque_; } | 136 bool contents_opaque() const { return contents_opaque_; } |
(...skipping 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 bool scrollable_; | 533 bool scrollable_; |
537 bool should_scroll_on_main_thread_; | 534 bool should_scroll_on_main_thread_; |
538 bool have_wheel_event_handlers_; | 535 bool have_wheel_event_handlers_; |
539 Region non_fast_scrollable_region_; | 536 Region non_fast_scrollable_region_; |
540 Region touch_event_handler_region_; | 537 Region touch_event_handler_region_; |
541 gfx::PointF position_; | 538 gfx::PointF position_; |
542 gfx::PointF anchor_point_; | 539 gfx::PointF anchor_point_; |
543 SkColor background_color_; | 540 SkColor background_color_; |
544 CompositingReasons compositing_reasons_; | 541 CompositingReasons compositing_reasons_; |
545 float opacity_; | 542 float opacity_; |
546 skia::RefPtr<SkImageFilter> filter_; | |
547 FilterOperations filters_; | 543 FilterOperations filters_; |
548 FilterOperations background_filters_; | 544 FilterOperations background_filters_; |
549 float anchor_point_z_; | 545 float anchor_point_z_; |
550 bool is_container_for_fixed_position_layers_; | 546 bool is_container_for_fixed_position_layers_; |
551 LayerPositionConstraint position_constraint_; | 547 LayerPositionConstraint position_constraint_; |
552 bool is_drawable_; | 548 bool is_drawable_; |
553 bool hide_layer_and_subtree_; | 549 bool hide_layer_and_subtree_; |
554 bool masks_to_bounds_; | 550 bool masks_to_bounds_; |
555 bool contents_opaque_; | 551 bool contents_opaque_; |
556 bool double_sided_; | 552 bool double_sided_; |
(...skipping 25 matching lines...) Expand all Loading... |
582 DrawProperties<Layer, RenderSurface> draw_properties_; | 578 DrawProperties<Layer, RenderSurface> draw_properties_; |
583 | 579 |
584 PaintProperties paint_properties_; | 580 PaintProperties paint_properties_; |
585 | 581 |
586 DISALLOW_COPY_AND_ASSIGN(Layer); | 582 DISALLOW_COPY_AND_ASSIGN(Layer); |
587 }; | 583 }; |
588 | 584 |
589 } // namespace cc | 585 } // namespace cc |
590 | 586 |
591 #endif // CC_LAYERS_LAYER_H_ | 587 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |