Implement scroll handler latency tracking
commit6f2afe184267aa1b6d7b5ba9753d2692a6723802
authorskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Aug 2014 13:09:37 +0000 (4 13:09 +0000)
committerskyostil@chromium.org <skyostil@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>
Mon, 4 Aug 2014 13:09:37 +0000 (4 13:09 +0000)
treedadf245630e9350956efe4dea957eab8b4222ed0
parentabcaf614b658d58db51722d70b6b8daf1087023f
Implement scroll handler latency tracking

Since scroll handlers do not block composited scrolling, the existing
input latency metric will only report the response time for the
compositor when scrolling a page with a handler. This is not accurate
for pages that implement scroll-synchronized effects, because the
scroll handler needs to be invoked so that the page contents are
updated with the new scroll offset.

This patch fixes the problem by forwarding latency information from the
impl to the main thread when we are scrolling a layer that has an active
scroll event handler.

In the case the scroll handler is no-op, the latency information will be
terminated as a failed commit.

Sample trace:
https://drive.google.com/file/d/0ByyxMXB38gLDRE40bkU5TVd0U00/edit?usp=sharing

BUG=347366

Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282117

Review URL: https://codereview.chromium.org/365463003

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287325 0039d316-1c4b-4281-b951-d872f2087c98
19 files changed:
cc/base/latency_info_swap_promise.cc
cc/base/latency_info_swap_promise.h
cc/base/latency_info_swap_promise_monitor.cc
cc/base/latency_info_swap_promise_monitor.h
cc/base/swap_promise.h
cc/base/swap_promise_monitor.h
cc/trees/layer_tree_host.cc
cc/trees/layer_tree_host.h
cc/trees/layer_tree_host_common.h
cc/trees/layer_tree_host_impl.cc
cc/trees/layer_tree_host_impl.h
cc/trees/layer_tree_host_impl_unittest.cc
cc/trees/layer_tree_host_unittest.cc
cc/trees/thread_proxy.cc
content/renderer/gpu/queue_message_swap_promise.cc
content/renderer/gpu/queue_message_swap_promise.h
content/renderer/input/input_handler_proxy.cc
ui/events/latency_info.cc
ui/events/latency_info.h