OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 #include "cc/layers/layer_impl.h" | 5 #include "cc/layers/layer_impl.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <utility> | 10 #include <utility> |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
547 gfx::ToRoundedPoint(hit_test_point_in_layer_space))) { | 547 gfx::ToRoundedPoint(hit_test_point_in_layer_space))) { |
548 TRACE_EVENT0("cc", | 548 TRACE_EVENT0("cc", |
549 "LayerImpl::tryScroll: Failed NonFastScrollableRegion"); | 549 "LayerImpl::tryScroll: Failed NonFastScrollableRegion"); |
550 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; | 550 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; |
551 scroll_status.main_thread_scrolling_reasons = | 551 scroll_status.main_thread_scrolling_reasons = |
552 MainThreadScrollingReason::kNonFastScrollableRegion; | 552 MainThreadScrollingReason::kNonFastScrollableRegion; |
553 return scroll_status; | 553 return scroll_status; |
554 } | 554 } |
555 } | 555 } |
556 | 556 |
557 if ((type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) && | 557 if (type == InputHandler::WHEEL || type == InputHandler::ANIMATED_WHEEL) { |
558 layer_tree_impl_->have_wheel_event_handlers()) { | 558 EventListenerProperties event_properties = |
559 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); | 559 layer_tree_impl_->event_listener_properties( |
560 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; | 560 EventListenerClass::kMouseWheel); |
561 scroll_status.main_thread_scrolling_reasons = | 561 if (event_properties == EventListenerProperties::kBlocking || |
562 MainThreadScrollingReason::kEventHandlers; | 562 (!layer_tree_impl_->settings().use_mouse_wheel_gestures && |
563 return scroll_status; | 563 event_properties == EventListenerProperties::kPassive)) { |
| 564 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Failed WheelEventHandlers"); |
| 565 scroll_status.thread = InputHandler::SCROLL_ON_MAIN_THREAD; |
| 566 scroll_status.main_thread_scrolling_reasons = |
| 567 MainThreadScrollingReason::kEventHandlers; |
| 568 return scroll_status; |
| 569 } |
564 } | 570 } |
565 | 571 |
566 if (!scrollable()) { | 572 if (!scrollable()) { |
567 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); | 573 TRACE_EVENT0("cc", "LayerImpl::tryScroll: Ignored not scrollable"); |
568 scroll_status.thread = InputHandler::SCROLL_IGNORED; | 574 scroll_status.thread = InputHandler::SCROLL_IGNORED; |
569 scroll_status.main_thread_scrolling_reasons = | 575 scroll_status.main_thread_scrolling_reasons = |
570 MainThreadScrollingReason::kNotScrollable; | 576 MainThreadScrollingReason::kNotScrollable; |
571 return scroll_status; | 577 return scroll_status; |
572 } | 578 } |
573 | 579 |
(...skipping 1333 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1907 .layer_transforms_should_scale_layer_contents) { | 1913 .layer_transforms_should_scale_layer_contents) { |
1908 return default_scale; | 1914 return default_scale; |
1909 } | 1915 } |
1910 | 1916 |
1911 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( | 1917 gfx::Vector2dF transform_scales = MathUtil::ComputeTransform2dScaleComponents( |
1912 DrawTransform(), default_scale); | 1918 DrawTransform(), default_scale); |
1913 return std::max(transform_scales.x(), transform_scales.y()); | 1919 return std::max(transform_scales.x(), transform_scales.y()); |
1914 } | 1920 } |
1915 | 1921 |
1916 } // namespace cc | 1922 } // namespace cc |
OLD | NEW |