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

Unified Diff: cc/trees/layer_tree_host.cc

Issue 2737653004: UMA metrics for use count of wheel and touch scrolls. (Closed)
Patch Set: TODO for GRC usage added. 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
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/layer_tree_host.cc
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 3cb2718837c23b44c9f87eee2194f13418c749f8..fd455dd95b29449e5d238a167e9af1c25421e1c5 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -756,6 +756,16 @@ void LayerTreeHost::ApplyViewportDeltas(ScrollAndScaleSet* info) {
SetNeedsUpdateLayers();
}
+void LayerTreeHost::RecordWheelAndTouchScrollingCount(ScrollAndScaleSet* info) {
+ bool has_scrolled_by_wheel = info->has_scrolled_by_wheel;
+ bool has_scrolled_by_touch = info->has_scrolled_by_touch;
+
+ if (has_scrolled_by_wheel || has_scrolled_by_touch) {
+ client_->RecordWheelAndTouchScrollingCount(has_scrolled_by_wheel,
+ has_scrolled_by_touch);
+ }
+}
+
void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
for (auto& swap_promise : info->swap_promises) {
TRACE_EVENT_WITH_FLOW1("input,benchmark", "LatencyInfo.Flow",
@@ -786,6 +796,8 @@ void LayerTreeHost::ApplyScrollAndScale(ScrollAndScaleSet* info) {
// controls from clamping the layout viewport both on the compositor and
// on the main thread.
ApplyViewportDeltas(info);
+
+ RecordWheelAndTouchScrollingCount(info);
}
const base::WeakPtr<InputHandler>& LayerTreeHost::GetInputHandler()
« no previous file with comments | « cc/trees/layer_tree_host.h ('k') | cc/trees/layer_tree_host_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698