OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 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 module ui.mojom; | 5 module ui.mojom; |
6 | 6 |
7 import "mojo/common/common_custom_types.mojom"; | 7 import "mojo/common/common_custom_types.mojom"; |
| 8 import "ui/gfx/geometry/mojo/geometry.mojom"; |
8 | 9 |
9 enum LatencyComponentType { | 10 enum LatencyComponentType { |
10 // ---------------------------BEGIN COMPONENT------------------------------- | 11 // ---------------------------BEGIN COMPONENT------------------------------- |
11 // BEGIN COMPONENT is when we show the latency begin in chrome://tracing. | 12 // 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 // Timestamp when the input event is sent from RenderWidgetHost to renderer. |
13 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, | 14 INPUT_EVENT_LATENCY_BEGIN_RWH_COMPONENT, |
14 // In threaded scrolling, main thread scroll listener update is async to | 15 // 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 // scroll processing in impl thread. This is the timestamp when we consider |
16 // the main thread scroll listener update is begun. | 17 // the main thread scroll listener update is begun. |
17 LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, | 18 LATENCY_BEGIN_SCROLL_LISTENER_UPDATE_MAIN_COMPONENT, |
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 mojo.common.mojom.TimeTicks event_time; | 101 mojo.common.mojom.TimeTicks event_time; |
101 // Count of events that happened in this component | 102 // Count of events that happened in this component |
102 uint32 event_count; | 103 uint32 event_count; |
103 }; | 104 }; |
104 | 105 |
105 struct LatencyComponentPair { | 106 struct LatencyComponentPair { |
106 LatencyComponentId key; | 107 LatencyComponentId key; |
107 LatencyComponent value; | 108 LatencyComponent value; |
108 }; | 109 }; |
109 | 110 |
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 | 111 // See ui/events/latency_info.h |
118 struct LatencyInfo { | 112 struct LatencyInfo { |
119 string trace_name; | 113 string trace_name; |
120 array<LatencyComponentPair> latency_components; | 114 array<LatencyComponentPair> latency_components; |
121 array<InputCoordinate> input_coordinates; | 115 array<gfx.mojom.PointF> input_coordinates; |
122 int64 trace_id; | 116 int64 trace_id; |
123 bool coalesced; | 117 bool coalesced; |
124 bool terminated; | 118 bool terminated; |
125 }; | 119 }; |
OLD | NEW |