Upstream version 10.39.225.0
[platform/framework/web/crosswalk.git] / src / tools / perf / measurements / smooth_gesture_util.py
index a7d95d7..8fe3257 100644 (file)
@@ -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