| 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 |
| 11 #include <set> | 11 #include <set> |
| 12 #include <string> | 12 #include <string> |
| 13 #include <vector> | 13 #include <vector> |
| 14 | 14 |
| 15 #include "base/callback.h" | 15 #include "base/callback.h" |
| 16 #include "base/macros.h" | 16 #include "base/macros.h" |
| 17 #include "base/memory/ref_counted.h" | 17 #include "base/memory/ref_counted.h" |
| 18 #include "base/observer_list.h" | 18 #include "base/observer_list.h" |
| 19 #include "cc/animation/layer_animation_controller.h" | 19 #include "cc/animation/layer_animation_controller.h" |
| 20 #include "cc/animation/layer_animation_value_observer.h" | 20 #include "cc/animation/layer_animation_value_observer.h" |
| 21 #include "cc/animation/layer_animation_value_provider.h" | 21 #include "cc/animation/layer_animation_value_provider.h" |
| 22 #include "cc/base/cc_export.h" | 22 #include "cc/base/cc_export.h" |
| 23 #include "cc/base/region.h" | 23 #include "cc/base/region.h" |
| 24 #include "cc/debug/frame_timing_request.h" | 24 #include "cc/debug/frame_timing_request.h" |
| 25 #include "cc/debug/micro_benchmark.h" | 25 #include "cc/debug/micro_benchmark.h" |
| 26 #include "cc/layers/event_listener_properties.h" |
| 26 #include "cc/layers/layer_lists.h" | 27 #include "cc/layers/layer_lists.h" |
| 27 #include "cc/layers/layer_position_constraint.h" | 28 #include "cc/layers/layer_position_constraint.h" |
| 28 #include "cc/layers/paint_properties.h" | 29 #include "cc/layers/paint_properties.h" |
| 29 #include "cc/layers/scroll_blocks_on.h" | 30 #include "cc/layers/scroll_blocks_on.h" |
| 30 #include "cc/output/filter_operations.h" | 31 #include "cc/output/filter_operations.h" |
| 31 #include "cc/trees/property_tree.h" | 32 #include "cc/trees/property_tree.h" |
| 32 #include "skia/ext/refptr.h" | 33 #include "skia/ext/refptr.h" |
| 33 #include "third_party/skia/include/core/SkColor.h" | 34 #include "third_party/skia/include/core/SkColor.h" |
| 34 #include "third_party/skia/include/core/SkImageFilter.h" | 35 #include "third_party/skia/include/core/SkImageFilter.h" |
| 35 #include "third_party/skia/include/core/SkPicture.h" | 36 #include "third_party/skia/include/core/SkPicture.h" |
| (...skipping 238 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 274 bool user_scrollable_horizontal() const { | 275 bool user_scrollable_horizontal() const { |
| 275 return user_scrollable_horizontal_; | 276 return user_scrollable_horizontal_; |
| 276 } | 277 } |
| 277 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } | 278 bool user_scrollable_vertical() const { return user_scrollable_vertical_; } |
| 278 | 279 |
| 279 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); | 280 void SetShouldScrollOnMainThread(bool should_scroll_on_main_thread); |
| 280 bool should_scroll_on_main_thread() const { | 281 bool should_scroll_on_main_thread() const { |
| 281 return should_scroll_on_main_thread_; | 282 return should_scroll_on_main_thread_; |
| 282 } | 283 } |
| 283 | 284 |
| 284 void SetHaveWheelEventHandlers(bool have_wheel_event_handlers); | 285 void SetTouchEventProperties(EventListenerProperties touch_event_properties); |
| 285 bool have_wheel_event_handlers() const { return have_wheel_event_handlers_; } | 286 EventListenerProperties touch_event_properties() const { |
| 287 return touch_event_properties_; |
| 288 } |
| 289 |
| 290 void SetWheelEventProperties(EventListenerProperties wheel_event_properties); |
| 291 EventListenerProperties wheel_event_properties() const { |
| 292 return wheel_event_properties_; |
| 293 } |
| 286 | 294 |
| 287 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers); | 295 void SetHaveScrollEventHandlers(bool have_scroll_event_handlers); |
| 288 bool have_scroll_event_handlers() const { | 296 bool have_scroll_event_handlers() const { |
| 289 return have_scroll_event_handlers_; | 297 return have_scroll_event_handlers_; |
| 290 } | 298 } |
| 291 | 299 |
| 292 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); | 300 void SetNonFastScrollableRegion(const Region& non_fast_scrollable_region); |
| 293 const Region& non_fast_scrollable_region() const { | 301 const Region& non_fast_scrollable_region() const { |
| 294 return non_fast_scrollable_region_; | 302 return non_fast_scrollable_region_; |
| 295 } | 303 } |
| (...skipping 422 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 718 int num_descendants_that_draw_content_; | 726 int num_descendants_that_draw_content_; |
| 719 int transform_tree_index_; | 727 int transform_tree_index_; |
| 720 int effect_tree_index_; | 728 int effect_tree_index_; |
| 721 int clip_tree_index_; | 729 int clip_tree_index_; |
| 722 int property_tree_sequence_number_; | 730 int property_tree_sequence_number_; |
| 723 uint64_t element_id_; | 731 uint64_t element_id_; |
| 724 uint32_t mutable_properties_; | 732 uint32_t mutable_properties_; |
| 725 gfx::Vector2dF offset_to_transform_parent_; | 733 gfx::Vector2dF offset_to_transform_parent_; |
| 726 bool should_flatten_transform_from_property_tree_ : 1; | 734 bool should_flatten_transform_from_property_tree_ : 1; |
| 727 bool should_scroll_on_main_thread_ : 1; | 735 bool should_scroll_on_main_thread_ : 1; |
| 728 bool have_wheel_event_handlers_ : 1; | |
| 729 bool have_scroll_event_handlers_ : 1; | 736 bool have_scroll_event_handlers_ : 1; |
| 730 bool user_scrollable_horizontal_ : 1; | 737 bool user_scrollable_horizontal_ : 1; |
| 731 bool user_scrollable_vertical_ : 1; | 738 bool user_scrollable_vertical_ : 1; |
| 732 bool is_root_for_isolated_group_ : 1; | 739 bool is_root_for_isolated_group_ : 1; |
| 733 bool is_container_for_fixed_position_layers_ : 1; | 740 bool is_container_for_fixed_position_layers_ : 1; |
| 734 bool is_drawable_ : 1; | 741 bool is_drawable_ : 1; |
| 735 bool draws_content_ : 1; | 742 bool draws_content_ : 1; |
| 736 bool hide_layer_and_subtree_ : 1; | 743 bool hide_layer_and_subtree_ : 1; |
| 737 bool masks_to_bounds_ : 1; | 744 bool masks_to_bounds_ : 1; |
| 738 bool contents_opaque_ : 1; | 745 bool contents_opaque_ : 1; |
| 739 bool double_sided_ : 1; | 746 bool double_sided_ : 1; |
| 740 bool should_flatten_transform_ : 1; | 747 bool should_flatten_transform_ : 1; |
| 741 bool use_parent_backface_visibility_ : 1; | 748 bool use_parent_backface_visibility_ : 1; |
| 742 bool force_render_surface_ : 1; | 749 bool force_render_surface_ : 1; |
| 743 bool transform_is_invertible_ : 1; | 750 bool transform_is_invertible_ : 1; |
| 744 bool has_render_surface_ : 1; | 751 bool has_render_surface_ : 1; |
| 745 ScrollBlocksOn scroll_blocks_on_ : 3; | 752 ScrollBlocksOn scroll_blocks_on_ : 3; |
| 753 EventListenerProperties touch_event_properties_; |
| 754 EventListenerProperties wheel_event_properties_; |
| 746 Region non_fast_scrollable_region_; | 755 Region non_fast_scrollable_region_; |
| 747 Region touch_event_handler_region_; | 756 Region touch_event_handler_region_; |
| 748 gfx::PointF position_; | 757 gfx::PointF position_; |
| 749 SkColor background_color_; | 758 SkColor background_color_; |
| 750 float opacity_; | 759 float opacity_; |
| 751 SkXfermode::Mode blend_mode_; | 760 SkXfermode::Mode blend_mode_; |
| 752 // draw_blend_mode may be different than blend_mode_, | 761 // draw_blend_mode may be different than blend_mode_, |
| 753 // when a RenderSurface re-parents the layer's blend_mode. | 762 // when a RenderSurface re-parents the layer's blend_mode. |
| 754 SkXfermode::Mode draw_blend_mode_; | 763 SkXfermode::Mode draw_blend_mode_; |
| 755 FilterOperations filters_; | 764 FilterOperations filters_; |
| (...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 791 std::vector<FrameTimingRequest> frame_timing_requests_; | 800 std::vector<FrameTimingRequest> frame_timing_requests_; |
| 792 bool frame_timing_requests_dirty_; | 801 bool frame_timing_requests_dirty_; |
| 793 bool is_hidden_from_property_trees_; | 802 bool is_hidden_from_property_trees_; |
| 794 | 803 |
| 795 DISALLOW_COPY_AND_ASSIGN(Layer); | 804 DISALLOW_COPY_AND_ASSIGN(Layer); |
| 796 }; | 805 }; |
| 797 | 806 |
| 798 } // namespace cc | 807 } // namespace cc |
| 799 | 808 |
| 800 #endif // CC_LAYERS_LAYER_H_ | 809 #endif // CC_LAYERS_LAYER_H_ |
| OLD | NEW |