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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2773893003: Record size of scroller that user scrolls (Closed)
Patch Set: nit 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « cc/input/scroller_size_metrics.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host_impl.cc
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 88873601ec85467f6e2235e8eb5fc89502be5707..fd91b10aaf1f8193cd446bf28ab251e048ae4ca2 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -36,6 +36,7 @@
#include "cc/input/scroll_elasticity_helper.h"
#include "cc/input/scroll_state.h"
#include "cc/input/scrollbar_animation_controller.h"
+#include "cc/input/scroller_size_metrics.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/effect_tree_layer_list_iterator.h"
#include "cc/layers/heads_up_display_layer_impl.h"
@@ -2768,6 +2769,22 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
scrolling_node = FindScrollNodeForDeviceViewportPoint(
device_viewport_point, type, layer_impl, &scroll_on_main_thread,
&scroll_status.main_thread_scrolling_reasons);
+ if (!scroll_on_main_thread && scrolling_node &&
+ (settings_.is_layer_tree_for_subframe ||
+ (!scrolling_node->scrolls_outer_viewport &&
+ !scrolling_node->scrolls_inner_viewport))) {
+ if (IsWheelBasedScroll(type)) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Wheel",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1,
+ kScrollerSizeLargestBucket, kScrollerSizeBucketCount);
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Touch",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1,
+ kScrollerSizeLargestBucket, kScrollerSizeBucketCount);
+ }
+ }
}
if (scroll_on_main_thread) {
« no previous file with comments | « cc/input/scroller_size_metrics.h ('k') | cc/trees/layer_tree_host_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698