| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 void ApplySentScrollDeltasFromAbortedCommit(); | 496 void ApplySentScrollDeltasFromAbortedCommit(); |
| 497 | 497 |
| 498 void set_main_thread_scrolling_reasons( | 498 void set_main_thread_scrolling_reasons( |
| 499 uint32_t main_thread_scrolling_reasons) { | 499 uint32_t main_thread_scrolling_reasons) { |
| 500 main_thread_scrolling_reasons_ = main_thread_scrolling_reasons; | 500 main_thread_scrolling_reasons_ = main_thread_scrolling_reasons; |
| 501 } | 501 } |
| 502 bool should_scroll_on_main_thread() const { | 502 bool should_scroll_on_main_thread() const { |
| 503 return !!main_thread_scrolling_reasons_; | 503 return !!main_thread_scrolling_reasons_; |
| 504 } | 504 } |
| 505 | 505 |
| 506 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers) { | |
| 507 have_wheel_event_handlers_ = have_wheel_event_handlers; | |
| 508 } | |
| 509 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } | |
| 510 | |
| 511 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { | 506 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { |
| 512 have_scroll_event_handlers_ = have_scroll_event_handlers; | 507 have_scroll_event_handlers_ = have_scroll_event_handlers; |
| 513 } | 508 } |
| 514 bool have_scroll_event_handlers() const { | 509 bool have_scroll_event_handlers() const { |
| 515 return have_scroll_event_handlers_; | 510 return have_scroll_event_handlers_; |
| 516 } | 511 } |
| 517 | 512 |
| 518 void SetNonFastScrollableRegion(const Region& region) { | 513 void SetNonFastScrollableRegion(const Region& region) { |
| 519 non_fast_scrollable_region_ = region; | 514 non_fast_scrollable_region_ = region; |
| 520 } | 515 } |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 656 void set_visited(bool visited) { visited_ = visited; } | 651 void set_visited(bool visited) { visited_ = visited; } |
| 657 | 652 |
| 658 bool visited() { return visited_; } | 653 bool visited() { return visited_; } |
| 659 | 654 |
| 660 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn) { | 655 void set_layer_or_descendant_is_drawn(bool layer_or_descendant_is_drawn) { |
| 661 layer_or_descendant_is_drawn_ = layer_or_descendant_is_drawn; | 656 layer_or_descendant_is_drawn_ = layer_or_descendant_is_drawn; |
| 662 } | 657 } |
| 663 | 658 |
| 664 bool layer_or_descendant_is_drawn() { return layer_or_descendant_is_drawn_; } | 659 bool layer_or_descendant_is_drawn() { return layer_or_descendant_is_drawn_; } |
| 665 | 660 |
| 666 void set_layer_or_descendant_has_input_handler( | 661 void set_layer_or_descendant_has_touch_handler( |
| 667 bool layer_or_descendant_has_input_handler) { | 662 bool layer_or_descendant_has_touch_handler) { |
| 668 layer_or_descendant_has_input_handler_ = | 663 layer_or_descendant_has_touch_handler_ = |
| 669 layer_or_descendant_has_input_handler; | 664 layer_or_descendant_has_touch_handler; |
| 670 } | 665 } |
| 671 | 666 |
| 672 bool layer_or_descendant_has_input_handler() { | 667 bool layer_or_descendant_has_touch_handler() { |
| 673 return layer_or_descendant_has_input_handler_; | 668 return layer_or_descendant_has_touch_handler_; |
| 674 } | 669 } |
| 675 | 670 |
| 676 void set_sorted_for_recursion(bool sorted_for_recursion) { | 671 void set_sorted_for_recursion(bool sorted_for_recursion) { |
| 677 sorted_for_recursion_ = sorted_for_recursion; | 672 sorted_for_recursion_ = sorted_for_recursion; |
| 678 } | 673 } |
| 679 bool sorted_for_recursion() { return sorted_for_recursion_; } | 674 bool sorted_for_recursion() { return sorted_for_recursion_; } |
| 680 | 675 |
| 681 int num_copy_requests_in_target_subtree(); | 676 int num_copy_requests_in_target_subtree(); |
| 682 | 677 |
| 683 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); | 678 void UpdatePropertyTreeForScrollingAndAnimationIfNeeded(); |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 759 scoped_refptr<SyncedScrollOffset> scroll_offset_; | 754 scoped_refptr<SyncedScrollOffset> scroll_offset_; |
| 760 gfx::Vector2dF bounds_delta_; | 755 gfx::Vector2dF bounds_delta_; |
| 761 | 756 |
| 762 // Properties synchronized from the associated Layer. | 757 // Properties synchronized from the associated Layer. |
| 763 gfx::Point3F transform_origin_; | 758 gfx::Point3F transform_origin_; |
| 764 gfx::Size bounds_; | 759 gfx::Size bounds_; |
| 765 int scroll_clip_layer_id_; | 760 int scroll_clip_layer_id_; |
| 766 | 761 |
| 767 gfx::Vector2dF offset_to_transform_parent_; | 762 gfx::Vector2dF offset_to_transform_parent_; |
| 768 uint32_t main_thread_scrolling_reasons_; | 763 uint32_t main_thread_scrolling_reasons_; |
| 769 bool have_wheel_event_handlers_ : 1; | |
| 770 bool have_scroll_event_handlers_ : 1; | 764 bool have_scroll_event_handlers_ : 1; |
| 771 | 765 |
| 772 bool user_scrollable_horizontal_ : 1; | 766 bool user_scrollable_horizontal_ : 1; |
| 773 bool user_scrollable_vertical_ : 1; | 767 bool user_scrollable_vertical_ : 1; |
| 774 bool stacking_order_changed_ : 1; | 768 bool stacking_order_changed_ : 1; |
| 775 // Whether the "back" of this layer should draw. | 769 // Whether the "back" of this layer should draw. |
| 776 bool double_sided_ : 1; | 770 bool double_sided_ : 1; |
| 777 bool should_flatten_transform_ : 1; | 771 bool should_flatten_transform_ : 1; |
| 778 bool should_flatten_transform_from_property_tree_ : 1; | 772 bool should_flatten_transform_from_property_tree_ : 1; |
| 779 | 773 |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 874 | 868 |
| 875 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info_; | 869 scoped_refptr<base::trace_event::ConvertableToTraceFormat> debug_info_; |
| 876 scoped_ptr<RenderSurfaceImpl> render_surface_; | 870 scoped_ptr<RenderSurfaceImpl> render_surface_; |
| 877 | 871 |
| 878 bool force_render_surface_; | 872 bool force_render_surface_; |
| 879 | 873 |
| 880 std::vector<FrameTimingRequest> frame_timing_requests_; | 874 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 881 bool frame_timing_requests_dirty_; | 875 bool frame_timing_requests_dirty_; |
| 882 bool visited_; | 876 bool visited_; |
| 883 bool layer_or_descendant_is_drawn_; | 877 bool layer_or_descendant_is_drawn_; |
| 884 // If true, the layer or one of its descendants has a wheel or touch handler. | 878 // If true, the layer or one of its descendants has a touch handler. |
| 885 bool layer_or_descendant_has_input_handler_; | 879 bool layer_or_descendant_has_touch_handler_; |
| 886 bool sorted_for_recursion_; | 880 bool sorted_for_recursion_; |
| 887 | 881 |
| 888 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 882 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
| 889 }; | 883 }; |
| 890 | 884 |
| 891 } // namespace cc | 885 } // namespace cc |
| 892 | 886 |
| 893 #endif // CC_LAYERS_LAYER_IMPL_H_ | 887 #endif // CC_LAYERS_LAYER_IMPL_H_ |
| OLD | NEW |