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 419 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 ElementListType GetElementTypeForAnimation() const; | 430 ElementListType GetElementTypeForAnimation() const; |
431 | 431 |
432 void SetScrollbarsHiddenFromImplSide(bool hidden); | 432 void SetScrollbarsHiddenFromImplSide(bool hidden); |
433 | 433 |
434 void set_is_scroll_clip_layer() { is_scroll_clip_layer_ = true; } | 434 void set_is_scroll_clip_layer() { is_scroll_clip_layer_ = true; } |
435 | 435 |
436 const gfx::Rect& update_rect() const { return inputs_.update_rect; } | 436 const gfx::Rect& update_rect() const { return inputs_.update_rect; } |
437 | 437 |
438 LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } | 438 LayerTreeHost* layer_tree_host() const { return layer_tree_host_; } |
439 | 439 |
| 440 // Called on the scroll layer to trigger showing the overlay scrollbars. |
| 441 void ShowScrollbars() { needs_show_scrollbars_ = true; } |
| 442 |
440 protected: | 443 protected: |
441 friend class LayerImpl; | 444 friend class LayerImpl; |
442 friend class TreeSynchronizer; | 445 friend class TreeSynchronizer; |
443 virtual ~Layer(); | 446 virtual ~Layer(); |
444 Layer(); | 447 Layer(); |
445 | 448 |
446 // These SetNeeds functions are in order of severity of update: | 449 // These SetNeeds functions are in order of severity of update: |
447 // | 450 // |
448 // Called when a property has been modified in a way that the layer knows | 451 // Called when a property has been modified in a way that the layer knows |
449 // immediately that a commit is required. This implies SetNeedsPushProperties | 452 // immediately that a commit is required. This implies SetNeedsPushProperties |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 int property_tree_sequence_number_; | 628 int property_tree_sequence_number_; |
626 gfx::Vector2dF offset_to_transform_parent_; | 629 gfx::Vector2dF offset_to_transform_parent_; |
627 bool should_flatten_transform_from_property_tree_ : 1; | 630 bool should_flatten_transform_from_property_tree_ : 1; |
628 bool draws_content_ : 1; | 631 bool draws_content_ : 1; |
629 bool use_local_transform_for_backface_visibility_ : 1; | 632 bool use_local_transform_for_backface_visibility_ : 1; |
630 bool should_check_backface_visibility_ : 1; | 633 bool should_check_backface_visibility_ : 1; |
631 bool force_render_surface_for_testing_ : 1; | 634 bool force_render_surface_for_testing_ : 1; |
632 bool subtree_property_changed_ : 1; | 635 bool subtree_property_changed_ : 1; |
633 bool may_contain_video_ : 1; | 636 bool may_contain_video_ : 1; |
634 bool is_scroll_clip_layer_ : 1; | 637 bool is_scroll_clip_layer_ : 1; |
| 638 bool needs_show_scrollbars_ : 1; |
635 SkColor safe_opaque_background_color_; | 639 SkColor safe_opaque_background_color_; |
636 // draw_blend_mode may be different than blend_mode_, | 640 // draw_blend_mode may be different than blend_mode_, |
637 // when a RenderSurface re-parents the layer's blend_mode. | 641 // when a RenderSurface re-parents the layer's blend_mode. |
638 SkBlendMode draw_blend_mode_; | 642 SkBlendMode draw_blend_mode_; |
639 std::unique_ptr<std::set<Layer*>> scroll_children_; | 643 std::unique_ptr<std::set<Layer*>> scroll_children_; |
640 | 644 |
641 std::unique_ptr<std::set<Layer*>> clip_children_; | 645 std::unique_ptr<std::set<Layer*>> clip_children_; |
642 | 646 |
643 PaintProperties paint_properties_; | 647 PaintProperties paint_properties_; |
644 | 648 |
645 // These all act like draw properties, so don't need push properties. | 649 // These all act like draw properties, so don't need push properties. |
646 gfx::Rect visible_layer_rect_; | 650 gfx::Rect visible_layer_rect_; |
647 size_t num_unclipped_descendants_; | 651 size_t num_unclipped_descendants_; |
648 | 652 |
649 DISALLOW_COPY_AND_ASSIGN(Layer); | 653 DISALLOW_COPY_AND_ASSIGN(Layer); |
650 }; | 654 }; |
651 | 655 |
652 } // namespace cc | 656 } // namespace cc |
653 | 657 |
654 #endif // CC_LAYERS_LAYER_H_ | 658 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |