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

Unified Diff: cc/trees/layer_tree_host_impl.cc

Issue 2773893003: Record size of scroller that user scrolls (Closed)
Patch Set: Add scrollEnd event after scrollBegin in test Created 3 years, 9 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
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 5bbe7ff77f55811d7157b9976efa6db06ebf2cf5..8cd8c7cb46456c00b44da218d033d903e32f0cee 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.h"
#include "cc/layers/append_quads_data.h"
#include "cc/layers/heads_up_display_layer_impl.h"
#include "cc/layers/layer_impl.h"
@@ -2762,6 +2763,19 @@ InputHandler::ScrollStatus LayerTreeHostImpl::ScrollBegin(
scrolling_node =
scrolling_layer ? scroll_tree.Node(scrolling_layer->scroll_tree_index())
: nullptr;
+ if (!scroll_on_main_thread && scrolling_node) {
bokan 2017/04/04 17:32:57 if you're going to avoid recording the viewport (a
+ if (IsWheelBasedScroll(type)) {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Wheel",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1,
+ kMaxScrollerSize, kBucketNum);
+ } else {
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Scroll.ScrollerSize.OnScroll_Touch",
+ scrolling_node->scroll_clip_layer_bounds.GetArea(), 1,
+ kMaxScrollerSize, kBucketNum);
+ }
+ }
}
if (scroll_on_main_thread) {

Powered by Google App Engine
This is Rietveld 408576698