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 2653 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2664 gfx::Point viewport_point(scroll_state->start_position_x(), | 2664 gfx::Point viewport_point(scroll_state->start_position_x(), |
2665 scroll_state->start_position_y()); | 2665 scroll_state->start_position_y()); |
2666 | 2666 |
2667 gfx::PointF device_viewport_point = gfx::ScalePoint( | 2667 gfx::PointF device_viewport_point = gfx::ScalePoint( |
2668 gfx::PointF(viewport_point), active_tree_->device_scale_factor()); | 2668 gfx::PointF(viewport_point), active_tree_->device_scale_factor()); |
2669 LayerImpl* layer_impl = | 2669 LayerImpl* layer_impl = |
2670 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point); | 2670 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point); |
2671 | 2671 |
2672 if (layer_impl) { | 2672 if (layer_impl) { |
2673 LayerImpl* scroll_layer_impl = | 2673 LayerImpl* scroll_layer_impl = |
2674 active_tree_->FindFirstScrollingLayerThatIsHitByPoint( | 2674 active_tree_->FindFirstScrollingLayerOrScrollbarLayerThatIsHitByPoint( |
2675 device_viewport_point); | 2675 device_viewport_point); |
2676 if (scroll_layer_impl && | 2676 if (scroll_layer_impl && |
2677 !HasScrollAncestor(layer_impl, scroll_layer_impl)) { | 2677 !HasScrollAncestor(layer_impl, scroll_layer_impl)) { |
2678 scroll_status.thread = SCROLL_UNKNOWN; | 2678 scroll_status.thread = SCROLL_UNKNOWN; |
2679 scroll_status.main_thread_scrolling_reasons = | 2679 scroll_status.main_thread_scrolling_reasons = |
2680 MainThreadScrollingReason::kFailedHitTest; | 2680 MainThreadScrollingReason::kFailedHitTest; |
2681 return scroll_status; | 2681 return scroll_status; |
2682 } | 2682 } |
2683 } | 2683 } |
2684 | 2684 |
(...skipping 1291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3976 return task_runner_provider_->HasImplThread(); | 3976 return task_runner_provider_->HasImplThread(); |
3977 } | 3977 } |
3978 | 3978 |
3979 bool LayerTreeHostImpl::CommitToActiveTree() const { | 3979 bool LayerTreeHostImpl::CommitToActiveTree() const { |
3980 // In single threaded mode we skip the pending tree and commit directly to the | 3980 // In single threaded mode we skip the pending tree and commit directly to the |
3981 // active tree. | 3981 // active tree. |
3982 return !task_runner_provider_->HasImplThread(); | 3982 return !task_runner_provider_->HasImplThread(); |
3983 } | 3983 } |
3984 | 3984 |
3985 } // namespace cc | 3985 } // namespace cc |
OLD | NEW |