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

Unified Diff: content/renderer/input/input_handler_proxy.cc

Issue 764403002: Expand UMA coverage for compositor-handled events and fling FPS (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years 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: content/renderer/input/input_handler_proxy.cc
diff --git a/content/renderer/input/input_handler_proxy.cc b/content/renderer/input/input_handler_proxy.cc
index 0d4b17320a1986903d7c6942d404731474f9c534..817643397f4a68141383fe65fb93cba8b07e3596 100644
--- a/content/renderer/input/input_handler_proxy.cc
+++ b/content/renderer/input/input_handler_proxy.cc
@@ -118,8 +118,12 @@ WebGestureEvent ObtainGestureScrollBegin(const WebGestureEvent& event) {
void SendScrollLatencyUma(const WebInputEvent& event,
const ui::LatencyInfo& latency_info) {
if (!(event.type == WebInputEvent::GestureScrollBegin ||
- event.type == WebInputEvent::GestureScrollUpdate))
+ event.type == WebInputEvent::GestureScrollUpdate ||
+ event.type == WebInputEvent::GesturePinchBegin ||
+ event.type == WebInputEvent::GesturePinchUpdate ||
+ event.type == WebInputEvent::GestureFlingStart)) {
return;
+ }
ui::LatencyInfo::LatencyMap::const_iterator it =
latency_info.latency_components.find(std::make_pair(
@@ -130,17 +134,42 @@ void SendScrollLatencyUma(const WebInputEvent& event,
base::TimeDelta delta = base::TimeTicks::HighResNow() - it->second.event_time;
for (size_t i = 0; i < it->second.event_count; ++i) {
- UMA_HISTOGRAM_CUSTOM_COUNTS(
- "Event.Latency.RendererImpl.GestureScroll2",
- delta.InMicroseconds(),
- 1,
- 1000000,
- 100);
+ switch (event.type) {
+ case blink::WebInputEvent::GestureScrollBegin:
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Latency.RendererImpl.GestureScrollBegin",
+ delta.InMicroseconds(), 1, 1000000, 100);
+ break;
+ case blink::WebInputEvent::GestureScrollUpdate:
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ // So named for historical reasons.
+ "Event.Latency.RendererImpl.GestureScroll2",
+ delta.InMicroseconds(), 1, 1000000, 100);
+ break;
+ case blink::WebInputEvent::GesturePinchBegin:
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Latency.RendererImpl.GesturePinchBegin",
+ delta.InMicroseconds(), 1, 1000000, 100);
+ break;
+ case blink::WebInputEvent::GesturePinchUpdate:
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Latency.RendererImpl.GesturePinchUpdate",
+ delta.InMicroseconds(), 1, 1000000, 100);
+ break;
+ case blink::WebInputEvent::GestureFlingStart:
+ UMA_HISTOGRAM_CUSTOM_COUNTS(
+ "Event.Latency.RendererImpl.GestureFlingStart",
+ delta.InMicroseconds(), 1, 1000000, 100);
+ break;
+ default:
+ NOTREACHED();
+ break;
+ }
}
-} // namespace
-
}
+} // namespace
+
namespace content {
InputHandlerProxy::InputHandlerProxy(cc::InputHandler* input_handler,
« content/child/web_gesture_curve_impl.cc ('K') | « content/child/web_gesture_curve_impl_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698