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 |