| 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 #include "cc/trees/layer_tree_host_impl.h" | 5 #include "cc/trees/layer_tree_host_impl.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <algorithm> | 10 #include <algorithm> |
| (...skipping 553 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 564 if ((scrolling_layer_impl == InnerViewportScrollLayer() && | 564 if ((scrolling_layer_impl == InnerViewportScrollLayer() && |
| 565 test_layer_impl == OuterViewportScrollLayer()) || | 565 test_layer_impl == OuterViewportScrollLayer()) || |
| 566 (scrolling_layer_impl == OuterViewportScrollLayer() && | 566 (scrolling_layer_impl == OuterViewportScrollLayer() && |
| 567 test_layer_impl == InnerViewportScrollLayer())) { | 567 test_layer_impl == InnerViewportScrollLayer())) { |
| 568 return true; | 568 return true; |
| 569 } | 569 } |
| 570 | 570 |
| 571 return false; | 571 return false; |
| 572 } | 572 } |
| 573 | 573 |
| 574 bool LayerTreeHostImpl::HaveWheelEventHandlersAt( | 574 bool LayerTreeHostImpl::HaveWheelEventHandlers() const { |
| 575 const gfx::Point& viewport_point) { | 575 return active_tree_->have_wheel_event_handlers(); |
| 576 gfx::PointF device_viewport_point = gfx::ScalePoint( | |
| 577 gfx::PointF(viewport_point), active_tree_->device_scale_factor()); | |
| 578 | |
| 579 LayerImpl* layer_impl = | |
| 580 active_tree_->FindLayerWithWheelHandlerThatIsHitByPoint( | |
| 581 device_viewport_point); | |
| 582 | |
| 583 return layer_impl != NULL; | |
| 584 } | 576 } |
| 585 | 577 |
| 586 static LayerImpl* NextLayerInScrollOrder(LayerImpl* layer) { | 578 static LayerImpl* NextLayerInScrollOrder(LayerImpl* layer) { |
| 587 if (layer->scroll_parent()) | 579 if (layer->scroll_parent()) |
| 588 return layer->scroll_parent(); | 580 return layer->scroll_parent(); |
| 589 | 581 |
| 590 return layer->parent(); | 582 return layer->parent(); |
| 591 } | 583 } |
| 592 | 584 |
| 593 static ScrollBlocksOn EffectiveScrollBlocksOn(LayerImpl* layer) { | 585 static ScrollBlocksOn EffectiveScrollBlocksOn(LayerImpl* layer) { |
| (...skipping 3323 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3917 return task_runner_provider_->HasImplThread(); | 3909 return task_runner_provider_->HasImplThread(); |
| 3918 } | 3910 } |
| 3919 | 3911 |
| 3920 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3912 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 3921 // In single threaded mode we skip the pending tree and commit directly to the | 3913 // In single threaded mode we skip the pending tree and commit directly to the |
| 3922 // active tree. | 3914 // active tree. |
| 3923 return !task_runner_provider_->HasImplThread(); | 3915 return !task_runner_provider_->HasImplThread(); |
| 3924 } | 3916 } |
| 3925 | 3917 |
| 3926 } // namespace cc | 3918 } // namespace cc |
| OLD | NEW |