summaryrefslogtreecommitdiffstats
path: root/ui/surface
diff options
context:
space:
mode:
authormiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-11 03:32:38 +0000
committermiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-11 03:32:38 +0000
commit70a03cc2c0b9debfc491412e9eeafe85e42ff758 (patch)
tree9f027b71392aae235550b72d30ac624e9f8104dd /ui/surface
parentefd37ff98539ec2e13e45cf72f7688629af66cc0 (diff)
downloadchromium_src-70a03cc2c0b9debfc491412e9eeafe85e42ff758.zip
chromium_src-70a03cc2c0b9debfc491412e9eeafe85e42ff758.tar.gz
chromium_src-70a03cc2c0b9debfc491412e9eeafe85e42ff758.tar.bz2
Report LatencyInfo through trace buffer
This CL is the first step in converting to use trace event to collect LatencyInfo. Changes are: 1. Each LatencyInfo will have at most one BEGIN/TERMINATED component. When the BEGIN component is added, an ASYNC_BEGIN trace event is issued. When the TERMINATED component is added, an ASYNC_END trace event is issued, and the LatencyInfo is dumped into the trace buffer. 2. BEGIN component is added to event's LatencyInfo when the event reaches RWH. 3. If events cause renderering to be schedueld in renderer, then the INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT is added when actual frame swap happens. Accordingly, swap_timestamp_ is removed. 4. If events do not cause rendering to be scheduled in renderer, then 4.1) INPUT_EVENT_LATENCY_TERMINATED_MOUSE/GESTURE_COMPONENT is added when the mouse/gesture events are acked from renderer. 4.2) If the acked touch event become gesture event, touch event's LatencInfo are copied into gesture event's LatencyInfo. 4.3) If the acked touch event does not become gesture event, INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT is then added to the touch event's LatencyInfo. This CL is only adding the ability to dump LatencyInfo to trace buffer but don't change the current way LatencyInfo is used so all the telemetry tests are not affected. The complete migration will be in followup CLs. BUG=BUG=246034 TEST=1. telemetry smoothness test still works. 2. Do trace recording with category "benchmark", check that latencyinfo are dumped to "InputLatency"; Review URL: https://codereview.chromium.org/25022003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@228095 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/surface')
-rw-r--r--ui/surface/accelerated_surface_win.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/ui/surface/accelerated_surface_win.cc b/ui/surface/accelerated_surface_win.cc
index 9f184e3..7f75e5f 100644
--- a/ui/surface/accelerated_surface_win.cc
+++ b/ui/surface/accelerated_surface_win.cc
@@ -847,7 +847,8 @@ void AcceleratedPresenter::DoPresentAndAcknowledge(
ReleaseDC(window_, dc);
}
- latency_info_.swap_timestamp = base::TimeTicks::HighResNow();
+ latency_info_.AddLatencyNumber(
+ ui::INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 0, 0);
hidden_ = false;