| 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 3189 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3200 gfx::PointF(viewport_point), active_tree_->device_scale_factor()); | 3200 gfx::PointF(viewport_point), active_tree_->device_scale_factor()); |
| 3201 LayerImpl* layer_impl = | 3201 LayerImpl* layer_impl = |
| 3202 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point); | 3202 active_tree_->FindLayerThatIsHitByPoint(device_viewport_point); |
| 3203 HandleMouseOverScrollbar(layer_impl); | 3203 HandleMouseOverScrollbar(layer_impl); |
| 3204 if (scroll_layer_id_when_mouse_over_scrollbar_ != Layer::INVALID_ID) | 3204 if (scroll_layer_id_when_mouse_over_scrollbar_ != Layer::INVALID_ID) |
| 3205 return; | 3205 return; |
| 3206 | 3206 |
| 3207 bool scroll_on_main_thread = false; | 3207 bool scroll_on_main_thread = false; |
| 3208 uint32_t main_thread_scrolling_reasons; | 3208 uint32_t main_thread_scrolling_reasons; |
| 3209 LayerImpl* scroll_layer_impl = FindScrollLayerForDeviceViewportPoint( | 3209 LayerImpl* scroll_layer_impl = FindScrollLayerForDeviceViewportPoint( |
| 3210 device_viewport_point, InputHandler::GESTURE, layer_impl, | 3210 device_viewport_point, InputHandler::TOUCHSCREEN, layer_impl, |
| 3211 &scroll_on_main_thread, &main_thread_scrolling_reasons); | 3211 &scroll_on_main_thread, &main_thread_scrolling_reasons); |
| 3212 if (scroll_layer_impl == InnerViewportScrollLayer()) | 3212 if (scroll_layer_impl == InnerViewportScrollLayer()) |
| 3213 scroll_layer_impl = OuterViewportScrollLayer(); | 3213 scroll_layer_impl = OuterViewportScrollLayer(); |
| 3214 if (scroll_on_main_thread || !scroll_layer_impl) | 3214 if (scroll_on_main_thread || !scroll_layer_impl) |
| 3215 return; | 3215 return; |
| 3216 | 3216 |
| 3217 ScrollbarAnimationController* animation_controller = | 3217 ScrollbarAnimationController* animation_controller = |
| 3218 ScrollbarAnimationControllerForId(scroll_layer_impl->id()); | 3218 ScrollbarAnimationControllerForId(scroll_layer_impl->id()); |
| 3219 if (!animation_controller) | 3219 if (!animation_controller) |
| 3220 return; | 3220 return; |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4011 return task_runner_provider_->HasImplThread(); | 4011 return task_runner_provider_->HasImplThread(); |
| 4012 } | 4012 } |
| 4013 | 4013 |
| 4014 bool LayerTreeHostImpl::CommitToActiveTree() const { | 4014 bool LayerTreeHostImpl::CommitToActiveTree() const { |
| 4015 // In single threaded mode we skip the pending tree and commit directly to the | 4015 // In single threaded mode we skip the pending tree and commit directly to the |
| 4016 // active tree. | 4016 // active tree. |
| 4017 return !task_runner_provider_->HasImplThread(); | 4017 return !task_runner_provider_->HasImplThread(); |
| 4018 } | 4018 } |
| 4019 | 4019 |
| 4020 } // namespace cc | 4020 } // namespace cc |
| OLD | NEW |