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

Unified Diff: tools/perf/measurements/smooth_gesture_util.py

Issue 488763004: Fix smooth_gesture_util to adjust the gesture record properly (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 4 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: tools/perf/measurements/smooth_gesture_util.py
diff --git a/tools/perf/measurements/smooth_gesture_util.py b/tools/perf/measurements/smooth_gesture_util.py
index a7d95d78b6347b660e012f554576130beccad29c..8fe32573844c4e2e853c95d99b489d948abe5655 100644
--- a/tools/perf/measurements/smooth_gesture_util.py
+++ b/tools/perf/measurements/smooth_gesture_util.py
@@ -22,15 +22,16 @@ def GetAdjustedInteractionIfContainGesture(timeline, interaction_record):
return copy.copy(interaction_record)
gesture_events = [
ev for ev
- in timeline.GetAllToplevelSlicesOfName(
- 'SyntheticGestureController::running')
- if ev.start <= interaction_record.end and
+ in timeline.IterAllAsyncSlicesOfName('SyntheticGestureController::running')
+ if ev.parent_slice is None and
+ ev.start <= interaction_record.end and
ev.end >= interaction_record.start]
if len(gesture_events) == 0:
return copy.copy(interaction_record)
if len(gesture_events) > 1:
raise Exception('More than one possible synthetic gesture marker found in '
'interaction_record %s.' % interaction_record.label)
- return tir_module.TimelineInteractionRecord(interaction_record.label,
- gesture_events[0].start,
- gesture_events[0].end)
+ return tir_module.TimelineInteractionRecord(
+ interaction_record.label, gesture_events[0].start,
+ gesture_events[0].end, gesture_events[0],
+ interaction_record._flags) # pylint: disable=W0212

Powered by Google App Engine
This is Rietveld 408576698