summaryrefslogtreecommitdiffstats
path: root/content/port
diff options
context:
space:
mode:
authormiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 19:57:33 +0000
committermiletus@chromium.org <miletus@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-12-11 19:57:33 +0000
commitbcbb9b4e583a1e068871ef591ae7f8590707eca7 (patch)
treec8e296dabb7c064d70c45e622cb272905c4f8811 /content/port
parent0fd8941aeaf0de8233cf6b017956217fe7371a32 (diff)
downloadchromium_src-bcbb9b4e583a1e068871ef591ae7f8590707eca7.zip
chromium_src-bcbb9b4e583a1e068871ef591ae7f8590707eca7.tar.gz
chromium_src-bcbb9b4e583a1e068871ef591ae7f8590707eca7.tar.bz2
Keep the oldest LatencyInfo when coalescing input events
Input events can be coalesced at browser side, e.g. GestureScrollUpdate, before being sent to renderer. Currently when events are coalesced, LatencyInfo are merged. We want to move to per-event LatencyInfo tracking and get rid of LatencyInfo merge. It seems reasonable to keep the oldest LatencyInfo, which when used for input event latency analysis, will represent the longest latency. BUG=246034 TEST=None Review URL: https://codereview.chromium.org/86603003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@240160 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/port')
-rw-r--r--content/port/browser/event_with_latency_info.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/content/port/browser/event_with_latency_info.h b/content/port/browser/event_with_latency_info.h
index d746ce2..c0da186 100644
--- a/content/port/browser/event_with_latency_info.h
+++ b/content/port/browser/event_with_latency_info.h
@@ -36,7 +36,12 @@ class EventWithLatencyInfo {
void CoalesceWith(const EventWithLatencyInfo& other) {
WebInputEventTraits::Coalesce(other.event, &event);
- latency.MergeWith(other.latency);
+ // When coalescing two input events, we keep the oldest LatencyInfo
+ // for Telemetry latency test since it will represent the longest
+ // latency.
+ if (other.latency.trace_id >= 0 &&
+ (latency.trace_id < 0 || other.latency.trace_id < latency.trace_id))
+ latency = other.latency;
}
};