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

Side by Side Diff: ui/events/mojo/latency_info.mojom

Issue 2040733002: Implement LatencyInfo StructTraits (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Make Windows happier Created 4 years, 6 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 unified diff | Download patch
« no previous file with comments | « ui/events/mojo/DEPS ('k') | ui/events/mojo/latency_info.typemap » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2016 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 module ui.mojom;
6
7 import "mojo/common/common_custom_types.mojom";
8
9 enum LatencyComponentType {
10 // ---------------------------BEGIN COMPONENT-------------------------------
11 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing.
12 // Timestamp when the input event is sent from RenderWidgetHost to renderer.
13 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT,
14 // In threaded scrolling, main thread scroll listener update is async to
15 // scroll processing in impl thread. This is the timestamp when we consider
16 // the main thread scroll listener update is begun.
17 LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT,
18 // ---------------------------NORMAL COMPONENT-------------------------------
19 // The original timestamp of the touch event which converts to scroll update.
20 INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
21 // The original timestamp of the touch event which converts to the *first*
22 // scroll update in a scroll gesture sequence.
23 INPUT_EVENT_LATENCY_FIRST_SCROLL_UPDATE_ORIGINAL_COMPONENT,
24 // Original timestamp for input event (e.g. timestamp from kernel).
25 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
26 // Timestamp when the UI event is created.
27 INPUT_EVENT_LATENCY_UI_COMPONENT,
28 // Timestamp when the event is dispatched on the main thread of the renderer.
29 INPUT_EVENT_LATENCY_RENDERER_MAIN_COMPONENT,
30 // This is special component indicating there is rendering scheduled for
31 // the event associated with this LatencyInfo on main thread.
32 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_MAIN_COMPONENT,
33 // This is special component indicating there is rendering scheduled for
34 // the event associated with this LatencyInfo on impl thread.
35 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_IMPL_COMPONENT,
36 // Timestamp when a scroll update is forwarded to the main thread.
37 INPUT_EVENT_LATENCY_FORWARD_SCROLL_UPDATE_TO_MAIN_COMPONENT,
38 // Timestamp when the event's ack is received by the RWH.
39 INPUT_EVENT_LATENCY_ACK_RWH_COMPONENT,
40 // Frame number when a window snapshot was requested. The snapshot
41 // is taken when the rendering results actually reach the screen.
42 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
43 // Timestamp when a tab is requested to be shown.
44 TAB_SHOW_COMPONENT,
45 // Timestamp when the frame is swapped in renderer.
46 INPUT_EVENT_LATENCY_RENDERER_SWAP_COMPONENT,
47 // Timestamp of when the browser process receives a buffer swap notification
48 // from the renderer.
49 INPUT_EVENT_BROWSER_RECEIVED_RENDERER_SWAP_COMPONENT,
50 // Timestamp of when the gpu service began swap buffers, unlike
51 // INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT which measures after.
52 INPUT_EVENT_GPU_SWAP_BUFFER_COMPONENT,
53 // Timestamp of when the gesture scroll update is generated from a mouse wheel
54 // event.
55 INPUT_EVENT_LATENCY_GENERATE_SCROLL_UPDATE_FROM_MOUSE_WHEEL,
56 // ---------------------------TERMINAL COMPONENT-----------------------------
57 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing.
58 // Timestamp when the mouse event is acked from renderer and it does not
59 // cause any rendering scheduled.
60 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
61 // Timestamp when the mouse wheel event is acked from renderer and it does not
62 // cause any rendering scheduled.
63 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_WHEEL_COMPONENT,
64 // Timestamp when the keyboard event is acked from renderer and it does not
65 // cause any rendering scheduled.
66 INPUT_EVENT_LATENCY_TERMINATED_KEYBOARD_COMPONENT,
67 // Timestamp when the touch event is acked from renderer and it does not
68 // cause any rendering scheduled and does not generate any gesture event.
69 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT,
70 // Timestamp when the gesture event is acked from renderer, and it does not
71 // cause any rendering scheduled.
72 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT,
73 // Timestamp when the frame is swapped (i.e. when the rendering caused by
74 // input event actually takes effect).
75 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT,
76 // This component indicates that the input causes a commit to be scheduled
77 // but the commit failed.
78 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT,
79 // This component indicates that the input causes a commit to be scheduled
80 // but the commit was aborted since it carried no new information.
81 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_NO_UPDATE_COMPONENT,
82 // This component indicates that the input causes a swap to be scheduled
83 // but the swap failed.
84 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
85 LATENCY_COMPONENT_TYPE_LAST =
86 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
87 };
88
89 struct LatencyComponentId {
90 LatencyComponentType type;
91 int64 id;
92 };
93
94 struct LatencyComponent {
95 // Nondecreasing number that can be used to determine what events happened
96 // in the component at the time this struct was sent on to the next
97 // component.
98 int64 sequence_number;
99 // Average time of events that happened in this component.
100 mojo.common.mojom.TimeTicks event_time;
101 // Count of events that happened in this component
102 uint32 event_count;
103 };
104
105 struct LatencyComponentPair {
106 LatencyComponentId key;
107 LatencyComponent value;
108 };
109
110 // TODO(fsamuel): We should replace this with gfx.mojom.PointF here and in
111 // ui/events/latency_info.h.
112 struct InputCoordinate {
113 float x;
114 float y;
115 };
116
117 // See ui/events/latency_info.h
118 struct LatencyInfo {
119 string trace_name;
120 array<LatencyComponentPair> latency_components;
121 array<InputCoordinate> input_coordinates;
122 int64 trace_id;
123 bool coalesced;
124 bool terminated;
125 };
OLDNEW
« no previous file with comments | « ui/events/mojo/DEPS ('k') | ui/events/mojo/latency_info.typemap » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698