OLD | NEW |
1 <!DOCTYPE html> | 1 <!DOCTYPE html> |
2 <!-- | 2 <!-- |
3 Copyright (c) 2015 The Chromium Authors. All rights reserved. | 3 Copyright (c) 2015 The Chromium Authors. All rights reserved. |
4 Use of this source code is governed by a BSD-style license that can be | 4 Use of this source code is governed by a BSD-style license that can be |
5 found in the LICENSE file. | 5 found in the LICENSE file. |
6 --> | 6 --> |
7 | 7 |
8 <link rel="import" href="/tracing/base/math/range_utils.html"> | 8 <link rel="import" href="/tracing/base/math/range_utils.html"> |
9 <link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.htm
l"> | 9 <link rel="import" href="/tracing/extras/chrome/cc/input_latency_async_slice.htm
l"> |
10 <link rel="import" href="/tracing/importer/proto_expectation.html"> | 10 <link rel="import" href="/tracing/importer/proto_expectation.html"> |
(...skipping 530 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
541 protoExpectations.push(currentPE); | 541 protoExpectations.push(currentPE); |
542 } | 542 } |
543 return; | 543 return; |
544 } | 544 } |
545 | 545 |
546 switch (event.typeName) { | 546 switch (event.typeName) { |
547 case INPUT_TYPE.FLING_START: | 547 case INPUT_TYPE.FLING_START: |
548 if (currentPE) { | 548 if (currentPE) { |
549 warn({ | 549 warn({ |
550 type: 'UserModelBuilder', | 550 type: 'UserModelBuilder', |
551 message: 'Please file a bug with this trace: FlingStart', | 551 message: 'Unexpected FlingStart', |
552 showToUser: true | 552 showToUser: false, |
553 }); | 553 }); |
554 currentPE.pushEvent(event); | 554 currentPE.pushEvent(event); |
555 } else { | 555 } else { |
556 currentPE = new ProtoExpectation( | 556 currentPE = new ProtoExpectation( |
557 ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.FLING); | 557 ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.FLING); |
558 currentPE.pushEvent(event); | 558 currentPE.pushEvent(event); |
559 // Set end to an invalid value so that it can be noticed and fixed | 559 // Set end to an invalid value so that it can be noticed and fixed |
560 // later. | 560 // later. |
561 currentPE.end = 0; | 561 currentPE.end = 0; |
562 protoExpectations.push(currentPE); | 562 protoExpectations.push(currentPE); |
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
723 ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.SCROLL); | 723 ProtoExpectation.ANIMATION_TYPE, INITIATOR_TYPE.SCROLL); |
724 currentPE.pushEvent(event); | 724 currentPE.pushEvent(event); |
725 protoExpectations.push(currentPE); | 725 protoExpectations.push(currentPE); |
726 } | 726 } |
727 break; | 727 break; |
728 | 728 |
729 case INPUT_TYPE.SCROLL_END: | 729 case INPUT_TYPE.SCROLL_END: |
730 if (!currentPE) { | 730 if (!currentPE) { |
731 warn({ | 731 warn({ |
732 type: 'UserModelBuilder', | 732 type: 'UserModelBuilder', |
733 message: 'Please file a bug with this trace: ScrollEnd', | 733 message: 'Unexpected ScrollEnd', |
734 showToUser: true | 734 showToUser: false, |
735 }); | 735 }); |
736 const pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE); | 736 const pe = new ProtoExpectation(ProtoExpectation.IGNORED_TYPE); |
737 pe.pushEvent(event); | 737 pe.pushEvent(event); |
738 protoExpectations.push(pe); | 738 protoExpectations.push(pe); |
739 break; | 739 break; |
740 } | 740 } |
741 currentPE.pushEvent(event); | 741 currentPE.pushEvent(event); |
742 break; | 742 break; |
743 } | 743 } |
744 }); | 744 }); |
(...skipping 474 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1219 // Ignore CSS Animations that might have multiple active ranges. | 1219 // Ignore CSS Animations that might have multiple active ranges. |
1220 if ((event.title === CSS_ANIMATION_TITLE) && | 1220 if ((event.title === CSS_ANIMATION_TITLE) && |
1221 (event.subSlices.length > 0)) { | 1221 (event.subSlices.length > 0)) { |
1222 return; | 1222 return; |
1223 } | 1223 } |
1224 | 1224 |
1225 if ((handledEvents.indexOf(event) >= 0) && | 1225 if ((handledEvents.indexOf(event) >= 0) && |
1226 (event.title !== tr.model.helpers.IMPL_RENDERING_STATS)) { | 1226 (event.title !== tr.model.helpers.IMPL_RENDERING_STATS)) { |
1227 warn({ | 1227 warn({ |
1228 type: 'UserModelBuilder', | 1228 type: 'UserModelBuilder', |
1229 message: 'Please file a bug with this trace: ' + | 1229 message: `double-handled event: ${event.typeName} @ ${event.start}`, |
1230 `double-handled event: ${event.typeName} @ ${event.start}`, | 1230 showToUser: false, |
1231 showToUser: true | |
1232 }); | 1231 }); |
1233 return; | 1232 return; |
1234 } | 1233 } |
1235 handledEvents.push(event); | 1234 handledEvents.push(event); |
1236 }); | 1235 }); |
1237 }); | 1236 }); |
1238 | 1237 |
1239 sortedInputEvents.forEach(function(event) { | 1238 sortedInputEvents.forEach(function(event) { |
1240 if (handledEvents.indexOf(event) < 0) { | 1239 if (handledEvents.indexOf(event) < 0) { |
1241 warn({ | 1240 warn({ |
1242 type: 'UserModelBuilder', | 1241 type: 'UserModelBuilder', |
1243 message: 'Please file a bug with this trace: ' + | 1242 message: `double-handled event: ${event.typeName} @ ${event.start}`, |
1244 `double-handled event: ${event.typeName} @ ${event.start}`, | 1243 showToUser: false, |
1245 showToUser: true | |
1246 }); | 1244 }); |
1247 } | 1245 } |
1248 }); | 1246 }); |
1249 } | 1247 } |
1250 | 1248 |
1251 /** | 1249 /** |
1252 * Find ProtoExpectations, post-process them, convert them to real UEs. | 1250 * Find ProtoExpectations, post-process them, convert them to real UEs. |
1253 */ | 1251 */ |
1254 function findInputExpectations(modelHelper) { | 1252 function findInputExpectations(modelHelper) { |
1255 // Prevent helper functions from producing too many import warnings. | 1253 // Prevent helper functions from producing too many import warnings. |
(...skipping 24 matching lines...) Expand all Loading... |
1280 return expectations; | 1278 return expectations; |
1281 } | 1279 } |
1282 | 1280 |
1283 return { | 1281 return { |
1284 findInputExpectations, | 1282 findInputExpectations, |
1285 compareEvents, | 1283 compareEvents, |
1286 CSS_ANIMATION_TITLE, | 1284 CSS_ANIMATION_TITLE, |
1287 }; | 1285 }; |
1288 }); | 1286 }); |
1289 </script> | 1287 </script> |
OLD | NEW |