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

Unified Diff: ui/events/latency_info.h

Issue 569653002: Add input coordinate information to InputLatency (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Switch to float array. Created 6 years, 3 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/latency_info.h
diff --git a/ui/events/latency_info.h b/ui/events/latency_info.h
index 92d928d615837d1323f07112b9244c135af4e67d..40e9fa082ac6c3de6d84c153ab08a21b77798600 100644
--- a/ui/events/latency_info.h
+++ b/ui/events/latency_info.h
@@ -98,6 +98,11 @@ struct EVENTS_BASE_EXPORT LatencyInfo {
// Empirically determined constant based on a typical scroll sequence.
enum { kTypicalMaxComponentsPerLatencyInfo = 6 };
+ enum { kMaxInputCoordinates = 2 };
+ enum { kCoordinateDimensions = 2 };
+
jdduke (slow) 2014/09/17 17:43:34 If we can't use gfx::PointF, would this benefit fr
Sami 2014/09/18 14:52:37 Yes, that brings some well needed structure.
+ typedef float InputCoordinates[kMaxInputCoordinates][kCoordinateDimensions];
+
// Map a Latency Component (with a component-specific int64 id) to a
// component info.
typedef base::SmallMap<
@@ -153,6 +158,11 @@ struct EVENTS_BASE_EXPORT LatencyInfo {
void TraceEventType(const char* event_type);
LatencyMap latency_components;
jdduke (slow) 2014/09/17 17:43:34 Are all these members public to simplify serializa
Sami 2014/09/18 14:52:37 I guess that is the reason. Everything else mostly
+
+ // These coordinates represent window coordinates of the original input event.
+ size_t input_coordinates_size;
+ InputCoordinates input_coordinates;
+
// The unique id for matching the ASYNC_BEGIN/END trace event.
int64 trace_id;
// Whether a terminal component has been added.

Powered by Google App Engine
This is Rietveld 408576698