Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2014 Google Inc. All rights reserved. | 2 * Copyright (C) 2014 Google Inc. All rights reserved. |
| 3 * | 3 * |
| 4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
| 5 * modification, are permitted provided that the following conditions are | 5 * modification, are permitted provided that the following conditions are |
| 6 * met: | 6 * met: |
| 7 * | 7 * |
| 8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
| 9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
| 10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
| (...skipping 426 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 437 } | 437 } |
| 438 var threads = this._model.virtualThreads(); | 438 var threads = this._model.virtualThreads(); |
| 439 this._appendThreadTimelineData(WebInspector.UIString("Main"), this._mode l.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true); | 439 this._appendThreadTimelineData(WebInspector.UIString("Main"), this._mode l.mainThreadEvents(), this._model.mainThreadAsyncEvents(), true); |
| 440 var compositorThreads = threads.filter(thread => thread.name.startsWith( "CompositorTileWorker")); | 440 var compositorThreads = threads.filter(thread => thread.name.startsWith( "CompositorTileWorker")); |
| 441 var otherThreads = threads.filter(thread => !thread.name.startsWith("Com positorTileWorker")); | 441 var otherThreads = threads.filter(thread => !thread.name.startsWith("Com positorTileWorker")); |
| 442 if (compositorThreads.length) { | 442 if (compositorThreads.length) { |
| 443 this._appendHeader(WebInspector.UIString("Raster"), this._headerLeve l1); | 443 this._appendHeader(WebInspector.UIString("Raster"), this._headerLeve l1); |
| 444 for (var i = 0; i < compositorThreads.length; ++i) | 444 for (var i = 0; i < compositorThreads.length; ++i) |
| 445 this._appendSyncEvents(compositorThreads[i].events, WebInspector .UIString("Rasterizer Thread %d", i), this._headerLevel2); | 445 this._appendSyncEvents(compositorThreads[i].events, WebInspector .UIString("Rasterizer Thread %d", i), this._headerLevel2); |
| 446 } | 446 } |
| 447 var extensionEvents = this._model.extensionEvents(); | |
| 448 this._appendSyncEvents(extensionEvents, "Extension", this._headerLevel2) ; | |
| 449 | |
| 447 this._appendGPUEvents(); | 450 this._appendGPUEvents(); |
| 448 | 451 |
| 449 otherThreads.forEach(thread => this._appendThreadTimelineData(thread.nam e, thread.events, thread.asyncEventsByGroup)); | 452 otherThreads.forEach(thread => this._appendThreadTimelineData(thread.nam e, thread.events, thread.asyncEventsByGroup)); |
| 450 | 453 |
| 451 /** | 454 /** |
| 452 * @param {!WebInspector.TimelineFlameChartMarker} a | 455 * @param {!WebInspector.TimelineFlameChartMarker} a |
| 453 * @param {!WebInspector.TimelineFlameChartMarker} b | 456 * @param {!WebInspector.TimelineFlameChartMarker} b |
| 454 */ | 457 */ |
| 455 function compareStartTime(a, b) | 458 function compareStartTime(a, b) |
| 456 { | 459 { |
| (...skipping 359 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 816 { | 819 { |
| 817 this._timelineData.groups.push({startLevel: this._currentLevel, name: ti tle, expanded: expanded, style: style}); | 820 this._timelineData.groups.push({startLevel: this._currentLevel, name: ti tle, expanded: expanded, style: style}); |
| 818 }, | 821 }, |
| 819 | 822 |
| 820 /** | 823 /** |
| 821 * @param {!WebInspector.TracingModel.Event} event | 824 * @param {!WebInspector.TracingModel.Event} event |
| 822 * @param {number} level | 825 * @param {number} level |
| 823 */ | 826 */ |
| 824 _appendEvent: function(event, level) | 827 _appendEvent: function(event, level) |
| 825 { | 828 { |
| 829 //console.log(event); | |
|
caseq
2016/07/11 18:58:38
drop this.
| |
| 826 var index = this._entryData.length; | 830 var index = this._entryData.length; |
| 827 this._entryData.push(event); | 831 this._entryData.push(event); |
| 828 this._timelineData.entryLevels[index] = level; | 832 this._timelineData.entryLevels[index] = level; |
| 829 this._timelineData.entryTotalTimes[index] = event.duration || WebInspect or.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs; | 833 this._timelineData.entryTotalTimes[index] = event.duration || WebInspect or.TimelineFlameChartDataProvider.InstantEventVisibleDurationMs; |
| 830 this._timelineData.entryStartTimes[index] = event.startTime; | 834 this._timelineData.entryStartTimes[index] = event.startTime; |
| 831 }, | 835 }, |
| 832 | 836 |
| 833 /** | 837 /** |
| 834 * @param {!WebInspector.TracingModel.Event} event | 838 * @param {!WebInspector.TracingModel.Event} event |
| 835 * @param {number} level | 839 * @param {number} level |
| (...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1509 /** | 1513 /** |
| 1510 * @constructor | 1514 * @constructor |
| 1511 * @param {!WebInspector.TimelineSelection} selection | 1515 * @param {!WebInspector.TimelineSelection} selection |
| 1512 * @param {number} entryIndex | 1516 * @param {number} entryIndex |
| 1513 */ | 1517 */ |
| 1514 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) | 1518 WebInspector.TimelineFlameChartView.Selection = function(selection, entryIndex) |
| 1515 { | 1519 { |
| 1516 this.timelineSelection = selection; | 1520 this.timelineSelection = selection; |
| 1517 this.entryIndex = entryIndex; | 1521 this.entryIndex = entryIndex; |
| 1518 } | 1522 } |
| OLD | NEW |