| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 this.handleRequestMainThreadFrame(); | 316 this.handleRequestMainThreadFrame(); |
| 317 else if (event.name === eventNames.NeedsBeginFrameChanged) | 317 else if (event.name === eventNames.NeedsBeginFrameChanged) |
| 318 this.handleNeedFrameChanged(timestamp, event.args['data'] && event.args['d
ata']['needsBeginFrame']); | 318 this.handleNeedFrameChanged(timestamp, event.args['data'] && event.args['d
ata']['needsBeginFrame']); |
| 319 } | 319 } |
| 320 | 320 |
| 321 /** | 321 /** |
| 322 * @param {!SDK.TracingModel.Event} event | 322 * @param {!SDK.TracingModel.Event} event |
| 323 */ | 323 */ |
| 324 _addMainThreadTraceEvent(event) { | 324 _addMainThreadTraceEvent(event) { |
| 325 var eventNames = TimelineModel.TimelineModel.RecordType; | 325 var eventNames = TimelineModel.TimelineModel.RecordType; |
| 326 var timestamp = event.startTime; | |
| 327 var selfTime = event.selfTime || 0; | |
| 328 | 326 |
| 329 if (SDK.TracingModel.isTopLevelEvent(event)) { | 327 if (SDK.TracingModel.isTopLevelEvent(event)) { |
| 330 this._currentTaskTimeByCategory = {}; | 328 this._currentTaskTimeByCategory = {}; |
| 331 this._lastTaskBeginTime = event.startTime; | 329 this._lastTaskBeginTime = event.startTime; |
| 332 } | 330 } |
| 333 if (!this._framePendingCommit && TimelineModel.TimelineFrameModel._mainFrame
Markers.indexOf(event.name) >= 0) { | 331 if (!this._framePendingCommit && TimelineModel.TimelineFrameModel._mainFrame
Markers.indexOf(event.name) >= 0) { |
| 334 this._framePendingCommit = | 332 this._framePendingCommit = |
| 335 new TimelineModel.PendingFrame(this._lastTaskBeginTime || event.startT
ime, this._currentTaskTimeByCategory); | 333 new TimelineModel.PendingFrame(this._lastTaskBeginTime || event.startT
ime, this._currentTaskTimeByCategory); |
| 336 } | 334 } |
| 337 if (!this._framePendingCommit) { | 335 if (!this._framePendingCommit) { |
| (...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 545 constructor(triggerTime, timeByCategory) { | 543 constructor(triggerTime, timeByCategory) { |
| 546 /** @type {!Object.<string, number>} */ | 544 /** @type {!Object.<string, number>} */ |
| 547 this.timeByCategory = timeByCategory; | 545 this.timeByCategory = timeByCategory; |
| 548 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */ | 546 /** @type {!Array.<!TimelineModel.LayerPaintEvent>} */ |
| 549 this.paints = []; | 547 this.paints = []; |
| 550 /** @type {number|undefined} */ | 548 /** @type {number|undefined} */ |
| 551 this.mainFrameId = undefined; | 549 this.mainFrameId = undefined; |
| 552 this.triggerTime = triggerTime; | 550 this.triggerTime = triggerTime; |
| 553 } | 551 } |
| 554 }; | 552 }; |
| OLD | NEW |