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

Unified Diff: ui/events/blink/input_handler_proxy.cc

Issue 2773593005: Move logic of recording main thread scrolling reasons from cc to blink::ScrollManager (Closed)
Patch Set: nit 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: ui/events/blink/input_handler_proxy.cc
diff --git a/ui/events/blink/input_handler_proxy.cc b/ui/events/blink/input_handler_proxy.cc
index 20b84d1c4936211dbfaafe0c9ffb4c2fbecbbdee..7666da4f622996ade3652dccaaa86282838beb39 100644
--- a/ui/events/blink/input_handler_proxy.cc
+++ b/ui/events/blink/input_handler_proxy.cc
@@ -556,6 +556,8 @@ void InputHandlerProxy::RecordMainThreadScrollingReasons(
// greater than the sample value. kMainThreadScrollingReasonCount doesn't
// include the NotScrollingOnMain enum but the histograms do so adding
// the +1 is necessary.
+ // Here we only record NotScrollingOnMain. The actual main thread scrolling
+ // reasons are recorded in blink::ScrollManager.
uint32_t mainThreadScrollingReasonEnumMax =
cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount + 1;
if (reasons == cc::MainThreadScrollingReason::kNotScrollingOnMain) {
@@ -571,29 +573,6 @@ void InputHandlerProxy::RecordMainThreadScrollingReasons(
mainThreadScrollingReasonEnumMax);
}
}
-
- for (uint32_t i = 0;
bokan 2017/03/24 17:55:55 Sorry, on second thought, we shouldn't remove this
yigu 2017/03/27 21:02:08 Done.
- i < cc::MainThreadScrollingReason::kMainThreadScrollingReasonCount;
- ++i) {
- unsigned val = 1 << i;
- if (reasons & val) {
- if (val == cc::MainThreadScrollingReason::kHandlingScrollFromMainThread) {
- // We only want to record "Handling scroll from main thread" reason if
- // it's the only reason. If it's not the only reason, the "real" reason
- // for scrolling on main is something else, and we only want to pay
- // attention to that reason.
- if (reasons & ~val)
- continue;
- }
- if (device == blink::WebGestureDeviceTouchscreen) {
- UMA_HISTOGRAM_ENUMERATION(kGestureHistogramName, i + 1,
- mainThreadScrollingReasonEnumMax);
- } else {
- UMA_HISTOGRAM_ENUMERATION(kWheelHistogramName, i + 1,
- mainThreadScrollingReasonEnumMax);
- }
- }
- }
}
void InputHandlerProxy::RecordScrollingThreadStatus(

Powered by Google App Engine
This is Rietveld 408576698