Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(56)

Side by Side Diff: cc/trees/layer_tree_host_impl.cc

Issue 2773893003: Record size of scroller that user scrolls (Closed)
Patch Set: Redefine metrics using suffixes in histograms.xml Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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, 90000, 50);
flackr 2017/03/28 14:40:23 Use a pair of constants for the 90000 and 50 and s
yigu 2017/03/29 15:32:03 Done.
2759 } else {
2760 UMA_HISTOGRAM_CUSTOM_COUNTS(
2761 "Event.Scroll.ScrollerSize.OnScroll_Touch",
2762 scrolling_node->scroll_clip_layer_bounds.GetArea(), 1, 90000, 50);
2763 }
2764 }
2754 } 2765 }
2755 2766
2756 if (scroll_on_main_thread) { 2767 if (scroll_on_main_thread) {
2757 RecordCompositorSlowScrollMetric(type, MAIN_THREAD); 2768 RecordCompositorSlowScrollMetric(type, MAIN_THREAD);
2758 2769
2759 scroll_status.thread = SCROLL_ON_MAIN_THREAD; 2770 scroll_status.thread = SCROLL_ON_MAIN_THREAD;
2760 return scroll_status; 2771 return scroll_status;
2761 } else if (scrolling_node) { 2772 } else if (scrolling_node) {
2762 scroll_affects_scroll_handler_ = active_tree_->have_scroll_event_handlers(); 2773 scroll_affects_scroll_handler_ = active_tree_->have_scroll_event_handlers();
2763 } 2774 }
(...skipping 1511 matching lines...) Expand 10 before | Expand all | Expand 10 after
4275 worker_context_visibility_ = 4286 worker_context_visibility_ =
4276 worker_context->CacheController()->ClientBecameVisible(); 4287 worker_context->CacheController()->ClientBecameVisible();
4277 } else { 4288 } else {
4278 worker_context->CacheController()->ClientBecameNotVisible( 4289 worker_context->CacheController()->ClientBecameNotVisible(
4279 std::move(worker_context_visibility_)); 4290 std::move(worker_context_visibility_));
4280 } 4291 }
4281 } 4292 }
4282 } 4293 }
4283 4294
4284 } // namespace cc 4295 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698