Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(53)

Side by Side Diff: cc/layers/layer_impl.h

Issue 1577263004: Communicate whether passive event listeners exist to cc. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master_wheel_passive_listeners
Patch Set: Fix Android/ChromeOS build problems with bit packed enum class Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
11 #include <map> 11 #include <map>
12 #include <set> 12 #include <set>
13 #include <string> 13 #include <string>
14 #include <vector> 14 #include <vector>
15 15
16 #include "base/logging.h" 16 #include "base/logging.h"
17 #include "base/macros.h" 17 #include "base/macros.h"
18 #include "base/memory/scoped_ptr.h" 18 #include "base/memory/scoped_ptr.h"
19 #include "base/values.h" 19 #include "base/values.h"
20 #include "cc/animation/animation_delegate.h" 20 #include "cc/animation/animation_delegate.h"
21 #include "cc/animation/layer_animation_controller.h" 21 #include "cc/animation/layer_animation_controller.h"
22 #include "cc/animation/layer_animation_value_observer.h" 22 #include "cc/animation/layer_animation_value_observer.h"
23 #include "cc/animation/layer_animation_value_provider.h" 23 #include "cc/animation/layer_animation_value_provider.h"
24 #include "cc/base/cc_export.h" 24 #include "cc/base/cc_export.h"
25 #include "cc/base/region.h" 25 #include "cc/base/region.h"
26 #include "cc/base/synced_property.h" 26 #include "cc/base/synced_property.h"
27 #include "cc/debug/frame_timing_request.h" 27 #include "cc/debug/frame_timing_request.h"
28 #include "cc/input/input_handler.h" 28 #include "cc/input/input_handler.h"
29 #include "cc/layers/draw_properties.h" 29 #include "cc/layers/draw_properties.h"
30 #include "cc/layers/event_listener_properties.h"
30 #include "cc/layers/layer_lists.h" 31 #include "cc/layers/layer_lists.h"
31 #include "cc/layers/layer_position_constraint.h" 32 #include "cc/layers/layer_position_constraint.h"
32 #include "cc/layers/performance_properties.h" 33 #include "cc/layers/performance_properties.h"
33 #include "cc/layers/render_surface_impl.h" 34 #include "cc/layers/render_surface_impl.h"
34 #include "cc/layers/scroll_blocks_on.h" 35 #include "cc/layers/scroll_blocks_on.h"
35 #include "cc/output/filter_operations.h" 36 #include "cc/output/filter_operations.h"
36 #include "cc/quads/shared_quad_state.h" 37 #include "cc/quads/shared_quad_state.h"
37 #include "cc/resources/resource_provider.h" 38 #include "cc/resources/resource_provider.h"
38 #include "cc/tiles/tile_priority.h" 39 #include "cc/tiles/tile_priority.h"
39 #include "skia/ext/refptr.h" 40 #include "skia/ext/refptr.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 490
490 void ApplySentScrollDeltasFromAbortedCommit(); 491 void ApplySentScrollDeltasFromAbortedCommit();
491 492
492 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) { 493 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread) {
493 should_scroll_on_main_thread_ = should_scroll_on_main_thread; 494 should_scroll_on_main_thread_ = should_scroll_on_main_thread;
494 } 495 }
495 bool should_scroll_on_main_thread() const { 496 bool should_scroll_on_main_thread() const {
496 return should_scroll_on_main_thread_; 497 return should_scroll_on_main_thread_;
497 } 498 }
498 499
499 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers) { 500 void SetWheelEventProperties(EventListenerProperties wheel_event_properties) {
500 have_wheel_event_handlers_ = have_wheel_event_handlers; 501 wheel_event_properties_ = wheel_event_properties;
501 } 502 }
502 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } 503 EventListenerProperties wheel_event_properties() const {
504 return wheel_event_properties_;
505 }
506
507 void SetTouchEventProperties(EventListenerProperties touch_event_properties) {
508 touch_event_properties_ = touch_event_properties;
509 }
510 EventListenerProperties touch_event_properties() const {
511 return touch_event_properties_;
512 }
503 513
504 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) { 514 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers) {
505 have_scroll_event_handlers_ = have_scroll_event_handlers; 515 have_scroll_event_handlers_ = have_scroll_event_handlers;
506 } 516 }
507 bool have_scroll_event_handlers() const { 517 bool have_scroll_event_handlers() const {
508 return have_scroll_event_handlers_; 518 return have_scroll_event_handlers_;
509 } 519 }
510 520
511 void SetNonFastScrollableRegion(const Region& region) { 521 void SetNonFastScrollableRegion(const Region& region) {
512 non_fast_scrollable_region_ = region; 522 non_fast_scrollable_region_ = region;
(...skipping 252 matching lines...) Expand 10 before | Expand all | Expand 10 after
765 gfx::Vector2dF bounds_delta_; 775 gfx::Vector2dF bounds_delta_;
766 776
767 // Properties synchronized from the associated Layer. 777 // Properties synchronized from the associated Layer.
768 gfx::Point3F transform_origin_; 778 gfx::Point3F transform_origin_;
769 gfx::Size bounds_; 779 gfx::Size bounds_;
770 int scroll_clip_layer_id_; 780 int scroll_clip_layer_id_;
771 781
772 gfx::Vector2dF offset_to_transform_parent_; 782 gfx::Vector2dF offset_to_transform_parent_;
773 783
774 bool should_scroll_on_main_thread_ : 1; 784 bool should_scroll_on_main_thread_ : 1;
775 bool have_wheel_event_handlers_ : 1;
776 bool have_scroll_event_handlers_ : 1; 785 bool have_scroll_event_handlers_ : 1;
777 786
778 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big"); 787 static_assert(SCROLL_BLOCKS_ON_MAX < (1 << 3), "ScrollBlocksOn too big");
779 ScrollBlocksOn scroll_blocks_on_ : 3; 788 ScrollBlocksOn scroll_blocks_on_ : 3;
780 789
781 bool user_scrollable_horizontal_ : 1; 790 bool user_scrollable_horizontal_ : 1;
782 bool user_scrollable_vertical_ : 1; 791 bool user_scrollable_vertical_ : 1;
783 bool stacking_order_changed_ : 1; 792 bool stacking_order_changed_ : 1;
784 // Whether the "back" of this layer should draw. 793 // Whether the "back" of this layer should draw.
785 bool double_sided_ : 1; 794 bool double_sided_ : 1;
(...skipping 15 matching lines...) Expand all
801 810
802 // Set for the layer that other layers are fixed to. 811 // Set for the layer that other layers are fixed to.
803 bool is_container_for_fixed_position_layers_ : 1; 812 bool is_container_for_fixed_position_layers_ : 1;
804 813
805 bool is_affected_by_page_scale_ : 1; 814 bool is_affected_by_page_scale_ : 1;
806 815
807 // This is true if and only if the layer was ever ready since it last animated 816 // This is true if and only if the layer was ever ready since it last animated
808 // (all content was complete). 817 // (all content was complete).
809 bool was_ever_ready_since_last_transform_animation_ : 1; 818 bool was_ever_ready_since_last_transform_animation_ : 1;
810 819
820 EventListenerProperties touch_event_properties_;
821 EventListenerProperties wheel_event_properties_;
822
811 Region non_fast_scrollable_region_; 823 Region non_fast_scrollable_region_;
812 Region touch_event_handler_region_; 824 Region touch_event_handler_region_;
813 SkColor background_color_; 825 SkColor background_color_;
814 826
815 float opacity_; 827 float opacity_;
816 SkXfermode::Mode blend_mode_; 828 SkXfermode::Mode blend_mode_;
817 // draw_blend_mode may be different than blend_mode_, 829 // draw_blend_mode may be different than blend_mode_,
818 // when a RenderSurface re-parents the layer's blend_mode. 830 // when a RenderSurface re-parents the layer's blend_mode.
819 SkXfermode::Mode draw_blend_mode_; 831 SkXfermode::Mode draw_blend_mode_;
820 gfx::PointF position_; 832 gfx::PointF position_;
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
893 bool layer_or_descendant_has_input_handler_; 905 bool layer_or_descendant_has_input_handler_;
894 bool sorted_for_recursion_; 906 bool sorted_for_recursion_;
895 bool is_hidden_from_property_trees_; 907 bool is_hidden_from_property_trees_;
896 908
897 DISALLOW_COPY_AND_ASSIGN(LayerImpl); 909 DISALLOW_COPY_AND_ASSIGN(LayerImpl);
898 }; 910 };
899 911
900 } // namespace cc 912 } // namespace cc
901 913
902 #endif // CC_LAYERS_LAYER_IMPL_H_ 914 #endif // CC_LAYERS_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « cc/layers/layer.cc ('k') | cc/layers/layer_impl.cc » ('j') | cc/layers/layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698