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

Unified Diff: ui/events/mojo/latency_info_struct_traits.cc

Issue 2771053003: WIP: Plumbing input event latency reporting through Mus GPU.
Patch Set: Created 3 years, 9 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 side-by-side diff with in-line comments
Download patch
Index: ui/events/mojo/latency_info_struct_traits.cc
diff --git a/ui/events/mojo/latency_info_struct_traits.cc b/ui/events/mojo/latency_info_struct_traits.cc
index d70e95768ed81b3cb850a6fb9691f22abcd0547a..0866f5cdbb0fb90ff7fe4a539c5bb20f11abcd8d 100644
--- a/ui/events/mojo/latency_info_struct_traits.cc
+++ b/ui/events/mojo/latency_info_struct_traits.cc
@@ -175,6 +175,20 @@ uint32_t StructTraits<ui::mojom::LatencyComponentDataView,
return component.event_count;
}
+//static
+base::TimeTicks StructTraits<ui::mojom::LatencyComponentDataView,
+ ui::LatencyInfo::LatencyComponent>::
+ first_event_time(const ui::LatencyInfo::LatencyComponent& component) {
+ return component.first_event_time;
+}
+
+//static
+base::TimeTicks StructTraits<ui::mojom::LatencyComponentDataView,
+ ui::LatencyInfo::LatencyComponent>::
+ last_event_time(const ui::LatencyInfo::LatencyComponent& component) {
+ return component.last_event_time;
+}
+
// static
bool StructTraits<ui::mojom::LatencyComponentDataView,
ui::LatencyInfo::LatencyComponent>::
@@ -182,6 +196,10 @@ bool StructTraits<ui::mojom::LatencyComponentDataView,
ui::LatencyInfo::LatencyComponent* out) {
if (!data.ReadEventTime(&out->event_time))
return false;
+ if (!data.ReadFirstEventTime(&out->first_event_time))
+ return false;
+ if (!data.ReadLastEventTime(&out->last_event_time))
+ return false;
out->sequence_number = data.sequence_number();
out->event_count = data.event_count();
return true;

Powered by Google App Engine
This is Rietveld 408576698