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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 void ApplySentScrollDeltasFromAbortedCommit(); | 493 void ApplySentScrollDeltasFromAbortedCommit(); |
494 | 494 |
495 void set_main_thread_scrolling_reasons( | 495 void set_main_thread_scrolling_reasons( |
496 uint32_t main_thread_scrolling_reasons) { | 496 uint32_t main_thread_scrolling_reasons) { |
497 main_thread_scrolling_reasons_ = main_thread_scrolling_reasons; | 497 main_thread_scrolling_reasons_ = main_thread_scrolling_reasons; |
498 } | 498 } |
499 bool should_scroll_on_main_thread() const { | 499 bool should_scroll_on_main_thread() const { |
500 return !!main_thread_scrolling_reasons_; | 500 return !!main_thread_scrolling_reasons_; |
501 } | 501 } |
502 | 502 |
503 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers) { | 503 void SetWheelEventProperties(uint32_t wheel_event_properties) { |
504 have_wheel_event_handlers_ = have_wheel_event_handlers; | 504 wheel_event_properties_ = wheel_event_properties; |
505 } | 505 } |
506 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } | 506 uint32_t wheel_event_properties() const { return wheel_event_properties_; } |
| 507 |
| 508 void SetTouchEventProperties(uint32_t touch_event_properties) { |
| 509 touch_event_properties_ = touch_event_properties; |
| 510 } |
| 511 uint32_t touch_event_properties() const { return touch_event_properties_; } |
507 | 512 |
508 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { | 513 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { |
509 have_scroll_event_handlers_ = have_scroll_event_handlers; | 514 have_scroll_event_handlers_ = have_scroll_event_handlers; |
510 } | 515 } |
511 bool have_scroll_event_handlers() const { | 516 bool have_scroll_event_handlers() const { |
512 return have_scroll_event_handlers_; | 517 return have_scroll_event_handlers_; |
513 } | 518 } |
514 | 519 |
515 void SetNonFastScrollableRegion(const Region& region) { | 520 void SetNonFastScrollableRegion(const Region& region) { |
516 non_fast_scrollable_region_ = region; | 521 non_fast_scrollable_region_ = region; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 scoped_refptr<SyncedScrollOffset> scroll_offset_; | 773 scoped_refptr<SyncedScrollOffset> scroll_offset_; |
769 gfx::Vector2dF bounds_delta_; | 774 gfx::Vector2dF bounds_delta_; |
770 | 775 |
771 // Properties synchronized from the associated Layer. | 776 // Properties synchronized from the associated Layer. |
772 gfx::Point3F transform_origin_; | 777 gfx::Point3F transform_origin_; |
773 gfx::Size bounds_; | 778 gfx::Size bounds_; |
774 int scroll_clip_layer_id_; | 779 int scroll_clip_layer_id_; |
775 | 780 |
776 gfx::Vector2dF offset_to_transform_parent_; | 781 gfx::Vector2dF offset_to_transform_parent_; |
777 uint32_t main_thread_scrolling_reasons_; | 782 uint32_t main_thread_scrolling_reasons_; |
778 bool have_wheel_event_handlers_ : 1; | |
779 bool have_scroll_event_handlers_ : 1; | 783 bool have_scroll_event_handlers_ : 1; |
780 | 784 |
781 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); | 785 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); |
782 ScrollBlocksOn scroll_blocks_on_ : 3; | 786 ScrollBlocksOn scroll_blocks_on_ : 3; |
783 | 787 |
784 bool user_scrollable_horizontal_ : 1; | 788 bool user_scrollable_horizontal_ : 1; |
785 bool user_scrollable_vertical_ : 1; | 789 bool user_scrollable_vertical_ : 1; |
786 bool stacking_order_changed_ : 1; | 790 bool stacking_order_changed_ : 1; |
787 // Whether the "back" of this layer should draw. | 791 // Whether the "back" of this layer should draw. |
788 bool double_sided_ : 1; | 792 bool double_sided_ : 1; |
(...skipping 15 matching lines...) Expand all Loading... |
804 | 808 |
805 // Set for the layer that other layers are fixed to. | 809 // Set for the layer that other layers are fixed to. |
806 bool is_container_for_fixed_position_layers_ : 1; | 810 bool is_container_for_fixed_position_layers_ : 1; |
807 | 811 |
808 bool is_affected_by_page_scale_ : 1; | 812 bool is_affected_by_page_scale_ : 1; |
809 | 813 |
810 // This is true if and only if the layer was ever ready since it last animated | 814 // This is true if and only if the layer was ever ready since it last animated |
811 // (all content was complete). | 815 // (all content was complete). |
812 bool was_ever_ready_since_last_transform_animation_ : 1; | 816 bool was_ever_ready_since_last_transform_animation_ : 1; |
813 | 817 |
| 818 uint32_t touch_event_properties_; |
| 819 uint32_t wheel_event_properties_; |
| 820 |
814 Region non_fast_scrollable_region_; | 821 Region non_fast_scrollable_region_; |
815 Region touch_event_handler_region_; | 822 Region touch_event_handler_region_; |
816 SkColor background_color_; | 823 SkColor background_color_; |
817 | 824 |
818 float opacity_; | 825 float opacity_; |
819 SkXfermode::Mode blend_mode_; | 826 SkXfermode::Mode blend_mode_; |
820 // draw_blend_mode may be different than blend_mode_, | 827 // draw_blend_mode may be different than blend_mode_, |
821 // when a RenderSurface re-parents the layer's blend_mode. | 828 // when a RenderSurface re-parents the layer's blend_mode. |
822 SkXfermode::Mode draw_blend_mode_; | 829 SkXfermode::Mode draw_blend_mode_; |
823 gfx::PointF position_; | 830 gfx::PointF position_; |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
896 bool layer_or_descendant_has_input_handler_; | 903 bool layer_or_descendant_has_input_handler_; |
897 bool sorted_for_recursion_; | 904 bool sorted_for_recursion_; |
898 bool is_hidden_from_property_trees_; | 905 bool is_hidden_from_property_trees_; |
899 | 906 |
900 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 907 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
901 }; | 908 }; |
902 | 909 |
903 } // namespace cc | 910 } // namespace cc |
904 | 911 |
905 #endif // CC_LAYERS_LAYER_IMPL_H_ | 912 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |