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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
302 return should_check_backface_visibility_; | 302 return should_check_backface_visibility_; |
303 } | 303 } |
304 | 304 |
305 virtual void SetLayerTreeHost(LayerTreeHost* host); | 305 virtual void SetLayerTreeHost(LayerTreeHost* host); |
306 | 306 |
307 void SetIsDrawable(bool is_drawable); | 307 void SetIsDrawable(bool is_drawable); |
308 | 308 |
309 void SetHideLayerAndSubtree(bool hide); | 309 void SetHideLayerAndSubtree(bool hide); |
310 bool hide_layer_and_subtree() const { return inputs_.hide_layer_and_subtree; } | 310 bool hide_layer_and_subtree() const { return inputs_.hide_layer_and_subtree; } |
311 | 311 |
| 312 void SetFiltersOrigin(const gfx::PointF& origin); |
| 313 gfx::PointF filters_origin() const { return inputs_.filters_origin; } |
| 314 |
312 void SetReplicaLayer(Layer* layer); | 315 void SetReplicaLayer(Layer* layer); |
313 Layer* replica_layer() { return inputs_.replica_layer.get(); } | 316 Layer* replica_layer() { return inputs_.replica_layer.get(); } |
314 const Layer* replica_layer() const { return inputs_.replica_layer.get(); } | 317 const Layer* replica_layer() const { return inputs_.replica_layer.get(); } |
315 | 318 |
316 bool has_mask() const { return !!inputs_.mask_layer.get(); } | 319 bool has_mask() const { return !!inputs_.mask_layer.get(); } |
317 bool has_replica() const { return !!inputs_.replica_layer.get(); } | 320 bool has_replica() const { return !!inputs_.replica_layer.get(); } |
318 bool replica_has_mask() const { | 321 bool replica_has_mask() const { |
319 return inputs_.replica_layer.get() && | 322 return inputs_.replica_layer.get() && |
320 (inputs_.mask_layer.get() || | 323 (inputs_.mask_layer.get() || |
321 inputs_.replica_layer->inputs_.mask_layer.get()); | 324 inputs_.replica_layer->inputs_.mask_layer.get()); |
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
646 // space. 0 is a special value that means this layer will not be sorted | 649 // space. 0 is a special value that means this layer will not be sorted |
647 // and will be drawn in paint order. | 650 // and will be drawn in paint order. |
648 int sorting_context_id; | 651 int sorting_context_id; |
649 | 652 |
650 bool use_parent_backface_visibility : 1; | 653 bool use_parent_backface_visibility : 1; |
651 | 654 |
652 SkColor background_color; | 655 SkColor background_color; |
653 | 656 |
654 FilterOperations filters; | 657 FilterOperations filters; |
655 FilterOperations background_filters; | 658 FilterOperations background_filters; |
| 659 gfx::PointF filters_origin; |
656 | 660 |
657 gfx::ScrollOffset scroll_offset; | 661 gfx::ScrollOffset scroll_offset; |
658 | 662 |
659 // This variable indicates which ancestor layer (if any) whose size, | 663 // This variable indicates which ancestor layer (if any) whose size, |
660 // transformed relative to this layer, defines the maximum scroll offset | 664 // transformed relative to this layer, defines the maximum scroll offset |
661 // for this layer. | 665 // for this layer. |
662 int scroll_clip_layer_id; | 666 int scroll_clip_layer_id; |
663 bool user_scrollable_horizontal : 1; | 667 bool user_scrollable_horizontal : 1; |
664 bool user_scrollable_vertical : 1; | 668 bool user_scrollable_vertical : 1; |
665 | 669 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
726 // These all act like draw properties, so don't need push properties. | 730 // These all act like draw properties, so don't need push properties. |
727 gfx::Rect visible_layer_rect_; | 731 gfx::Rect visible_layer_rect_; |
728 size_t num_unclipped_descendants_; | 732 size_t num_unclipped_descendants_; |
729 | 733 |
730 DISALLOW_COPY_AND_ASSIGN(Layer); | 734 DISALLOW_COPY_AND_ASSIGN(Layer); |
731 }; | 735 }; |
732 | 736 |
733 } // namespace cc | 737 } // namespace cc |
734 | 738 |
735 #endif // CC_LAYERS_LAYER_H_ | 739 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |