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 2733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2744 } | 2744 } |
2745 } | 2745 } |
2746 | 2746 |
2747 auto* scrolling_layer = FindScrollLayerForDeviceViewportPoint( | 2747 auto* scrolling_layer = FindScrollLayerForDeviceViewportPoint( |
2748 device_viewport_point, type, layer_impl, &scroll_on_main_thread, | 2748 device_viewport_point, type, layer_impl, &scroll_on_main_thread, |
2749 &scroll_status.main_thread_scrolling_reasons); | 2749 &scroll_status.main_thread_scrolling_reasons); |
2750 ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree; | 2750 ScrollTree& scroll_tree = active_tree_->property_trees()->scroll_tree; |
2751 scrolling_node = | 2751 scrolling_node = |
2752 scrolling_layer ? scroll_tree.Node(scrolling_layer->scroll_tree_index()) | 2752 scrolling_layer ? scroll_tree.Node(scrolling_layer->scroll_tree_index()) |
2753 : nullptr; | 2753 : nullptr; |
| 2754 if (!scroll_on_main_thread && scrolling_node) { |
| 2755 if (IsWheelBasedScroll(type)) { |
| 2756 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 2757 "Event.Scroll.ScrollerSize.OnScroll_Wheel", |
| 2758 scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| 2759 maxScrollerSize, bucketNum); |
| 2760 } else { |
| 2761 UMA_HISTOGRAM_CUSTOM_COUNTS( |
| 2762 "Event.Scroll.ScrollerSize.OnScroll_Touch", |
| 2763 scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, |
| 2764 maxScrollerSize, bucketNum); |
| 2765 } |
| 2766 } |
2754 } | 2767 } |
2755 | 2768 |
2756 if (scroll_on_main_thread) { | 2769 if (scroll_on_main_thread) { |
2757 RecordCompositorSlowScrollMetric(type, MAIN_THREAD); | 2770 RecordCompositorSlowScrollMetric(type, MAIN_THREAD); |
2758 | 2771 |
2759 scroll_status.thread = SCROLL_ON_MAIN_THREAD; | 2772 scroll_status.thread = SCROLL_ON_MAIN_THREAD; |
2760 return scroll_status; | 2773 return scroll_status; |
2761 } else if (scrolling_node) { | 2774 } else if (scrolling_node) { |
2762 scroll_affects_scroll_handler_ = active_tree_->have_scroll_event_handlers(); | 2775 scroll_affects_scroll_handler_ = active_tree_->have_scroll_event_handlers(); |
2763 } | 2776 } |
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4275 worker_context_visibility_ = | 4288 worker_context_visibility_ = |
4276 worker_context->CacheController()->ClientBecameVisible(); | 4289 worker_context->CacheController()->ClientBecameVisible(); |
4277 } else { | 4290 } else { |
4278 worker_context->CacheController()->ClientBecameNotVisible( | 4291 worker_context->CacheController()->ClientBecameNotVisible( |
4279 std::move(worker_context_visibility_)); | 4292 std::move(worker_context_visibility_)); |
4280 } | 4293 } |
4281 } | 4294 } |
4282 } | 4295 } |
4283 | 4296 |
4284 } // namespace cc | 4297 } // namespace cc |
OLD | NEW |