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

Side by Side Diff: ui/events/latency_info.h

Issue 81533002: Use LatencyInfoSwapPromise to track LatencyInfo through compositor (Closed) Base URL: http://git.chromium.org/chromium/src.git@swap_promise_2
Patch Set: fix typo Created 7 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 unified diff | Download patch
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_LATENCY_INFO_H_ 5 #ifndef UI_EVENTS_LATENCY_INFO_H_
6 #define UI_EVENTS_LATENCY_INFO_H_ 6 #define UI_EVENTS_LATENCY_INFO_H_
7 7
8 #include <map> 8 #include <map>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 20 matching lines...) Expand all
31 INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT, 31 INPUT_EVENT_LATENCY_SCROLL_UPDATE_ORIGINAL_COMPONENT,
32 // Original timestamp for input event (e.g. timestamp from kernel). 32 // Original timestamp for input event (e.g. timestamp from kernel).
33 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT, 33 INPUT_EVENT_LATENCY_ORIGINAL_COMPONENT,
34 // Timestamp when the UI event is created. 34 // Timestamp when the UI event is created.
35 INPUT_EVENT_LATENCY_UI_COMPONENT, 35 INPUT_EVENT_LATENCY_UI_COMPONENT,
36 // This is special component indicating there is rendering scheduled for 36 // This is special component indicating there is rendering scheduled for
37 // the event associated with this LatencyInfo. 37 // the event associated with this LatencyInfo.
38 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT, 38 INPUT_EVENT_LATENCY_RENDERING_SCHEDULED_COMPONENT,
39 // Timestamp when the touch event is acked. 39 // Timestamp when the touch event is acked.
40 INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT, 40 INPUT_EVENT_LATENCY_ACKED_TOUCH_COMPONENT,
41 // Frame number when a window snapshot was requested. The snapshot
42 // is taken when the rendering results actually reach the screen.
43 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
41 // ---------------------------TERMINAL COMPONENT----------------------------- 44 // ---------------------------TERMINAL COMPONENT-----------------------------
42 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing. 45 // TERMINAL COMPONENT is when we show the latency end in chrome://tracing.
43 // Timestamp when the mouse event is acked from renderer and it does not 46 // Timestamp when the mouse event is acked from renderer and it does not
44 // cause any rendering scheduled. 47 // cause any rendering scheduled.
45 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT, 48 INPUT_EVENT_LATENCY_TERMINATED_MOUSE_COMPONENT,
46 // Timestamp when the touch event is acked from renderer and it does not 49 // Timestamp when the touch event is acked from renderer and it does not
47 // cause any rendering schedueld and does not generate any gesture event. 50 // cause any rendering schedueld and does not generate any gesture event.
48 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT, 51 INPUT_EVENT_LATENCY_TERMINATED_TOUCH_COMPONENT,
49 // Timestamp when the gesture event is acked from renderer, and it does not 52 // Timestamp when the gesture event is acked from renderer, and it does not
50 // cause any rendering schedueld. 53 // cause any rendering schedueld.
51 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT, 54 INPUT_EVENT_LATENCY_TERMINATED_GESTURE_COMPONENT,
52 // Timestamp when the frame is swapped (i.e. when the rendering caused by 55 // Timestamp when the frame is swapped (i.e. when the rendering caused by
53 // input event actually takes effect). 56 // input event actually takes effect).
54 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT, 57 INPUT_EVENT_LATENCY_TERMINATED_FRAME_SWAP_COMPONENT,
55 // Frame number when a window snapshot was requested. The snapshot 58 // This component indicates that the input causes a commit to be scheduled
56 // is taken when the rendering results actually reach the screen. 59 // but the commit failed.
57 WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT 60 INPUT_EVENT_LATENCY_TERMINATED_COMMIT_FAILED_COMPONENT,
61 // This component indicates that the input causes a swap to be scheduled
62 // but the swap failed.
63 INPUT_EVENT_LATENCY_TERMINATED_SWAP_FAILED_COMPONENT,
64 // This component indicates that the cached LatencyInfo number exceeds the
65 // maximal allowed size.
66 LATENCY_INFO_LIST_TERMINATED_OVERFLOW_COMPONENT,
58 }; 67 };
59 68
60 struct EVENTS_BASE_EXPORT LatencyInfo { 69 struct EVENTS_BASE_EXPORT LatencyInfo {
61 struct LatencyComponent { 70 struct LatencyComponent {
62 // Nondecreasing number that can be used to determine what events happened 71 // Nondecreasing number that can be used to determine what events happened
63 // in the component at the time this struct was sent on to the next 72 // in the component at the time this struct was sent on to the next
64 // component. 73 // component.
65 int64 sequence_number; 74 int64 sequence_number;
66 // Average time of events that happened in this component. 75 // Average time of events that happened in this component.
67 base::TimeTicks event_time; 76 base::TimeTicks event_time;
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
114 LatencyMap latency_components; 123 LatencyMap latency_components;
115 // The unique id for matching the ASYNC_BEGIN/END trace event. 124 // The unique id for matching the ASYNC_BEGIN/END trace event.
116 int64 trace_id; 125 int64 trace_id;
117 // Whether a terminal component has been added. 126 // Whether a terminal component has been added.
118 bool terminated; 127 bool terminated;
119 }; 128 };
120 129
121 } // namespace ui 130 } // namespace ui
122 131
123 #endif // UI_EVENTS_LATENCY_INFO_H_ 132 #endif // UI_EVENTS_LATENCY_INFO_H_
OLDNEW
« no previous file with comments | « ui/compositor/compositor.cc ('k') | ui/events/latency_info.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698