| 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 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 }, | 305 }, |
| 306 | 306 |
| 307 /** | 307 /** |
| 308 * @param {?WebInspector.TimelineModel.Record} programRecord | 308 * @param {?WebInspector.TimelineModel.Record} programRecord |
| 309 * @param {!WebInspector.TimelineModel.Record} record | 309 * @param {!WebInspector.TimelineModel.Record} record |
| 310 */ | 310 */ |
| 311 _addMainThreadRecord: function(programRecord, record) | 311 _addMainThreadRecord: function(programRecord, record) |
| 312 { | 312 { |
| 313 var recordTypes = WebInspector.TimelineModel.RecordType; | 313 var recordTypes = WebInspector.TimelineModel.RecordType; |
| 314 if (record.type() === recordTypes.UpdateLayerTree && record.data()["laye
rTree"]) | 314 if (record.type() === recordTypes.UpdateLayerTree && record.data()["laye
rTree"]) |
| 315 this.handleLayerTreeSnapshot(new WebInspector.DeferredAgentLayerTree
(this.target(), record.data()["layerTree"])); | 315 this.handleLayerTreeSnapshot(new WebInspector.DeferredAgentLayerTree
(this.target().weakReference(), record.data()["layerTree"])); |
| 316 if (!this._hasThreadedCompositing) { | 316 if (!this._hasThreadedCompositing) { |
| 317 if (record.type() === recordTypes.BeginFrame) | 317 if (record.type() === recordTypes.BeginFrame) |
| 318 this._startMainThreadFrame(record.startTime()); | 318 this._startMainThreadFrame(record.startTime()); |
| 319 | 319 |
| 320 if (!this._lastFrame) | 320 if (!this._lastFrame) |
| 321 return; | 321 return; |
| 322 | 322 |
| 323 this._lastFrame._addTimeFromRecord(record); | 323 this._lastFrame._addTimeFromRecord(record); |
| 324 | 324 |
| 325 // Account for "other" time at the same time as the first child. | 325 // Account for "other" time at the same time as the first child. |
| (...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 410 }, | 410 }, |
| 411 | 411 |
| 412 /** | 412 /** |
| 413 * @param {!WebInspector.TracingModel.Event} event | 413 * @param {!WebInspector.TracingModel.Event} event |
| 414 */ | 414 */ |
| 415 _addBackgroundTraceEvent: function(event) | 415 _addBackgroundTraceEvent: function(event) |
| 416 { | 416 { |
| 417 var eventNames = WebInspector.TracingTimelineModel.RecordType; | 417 var eventNames = WebInspector.TracingTimelineModel.RecordType; |
| 418 | 418 |
| 419 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { | 419 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { |
| 420 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"], event.arg
s["snapshot"]["device_viewport_size"])); | 420 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target().weakReference(), event.args["snapshot"]["active_tree"]["root_la
yer"], event.args["snapshot"]["device_viewport_size"])); |
| 421 return; | 421 return; |
| 422 } | 422 } |
| 423 if (this._lastFrame && event.selfTime) | 423 if (this._lastFrame && event.selfTime) |
| 424 this._lastFrame._addTimeForCategory(WebInspector.TracingTimelineUIUt
ils.eventStyle(event).category.name, event.selfTime); | 424 this._lastFrame._addTimeForCategory(WebInspector.TracingTimelineUIUt
ils.eventStyle(event).category.name, event.selfTime); |
| 425 | 425 |
| 426 if (event.args["layerTreeId"] !== this._layerTreeId) | 426 if (event.args["layerTreeId"] !== this._layerTreeId) |
| 427 return; | 427 return; |
| 428 | 428 |
| 429 var timestamp = event.startTime; | 429 var timestamp = event.startTime; |
| 430 if (event.name === eventNames.BeginFrame) | 430 if (event.name === eventNames.BeginFrame) |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 595 /** | 595 /** |
| 596 * @constructor | 596 * @constructor |
| 597 */ | 597 */ |
| 598 WebInspector.PendingFrame = function() | 598 WebInspector.PendingFrame = function() |
| 599 { | 599 { |
| 600 /** @type {!Object.<string, number>} */ | 600 /** @type {!Object.<string, number>} */ |
| 601 this.timeByCategory = {}; | 601 this.timeByCategory = {}; |
| 602 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ | 602 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ |
| 603 this.paints = []; | 603 this.paints = []; |
| 604 } | 604 } |
| OLD | NEW |