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 392 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
403 }, | 403 }, |
404 | 404 |
405 /** | 405 /** |
406 * @param {!WebInspector.TracingModel.Event} event | 406 * @param {!WebInspector.TracingModel.Event} event |
407 */ | 407 */ |
408 _addBackgroundTraceEvent: function(event) | 408 _addBackgroundTraceEvent: function(event) |
409 { | 409 { |
410 var eventNames = WebInspector.TracingTimelineModel.RecordType; | 410 var eventNames = WebInspector.TracingTimelineModel.RecordType; |
411 | 411 |
412 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { | 412 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { |
413 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"])); | 413 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"], event.arg
s["snapshot"]["device_viewport_size"])); |
414 return; | 414 return; |
415 } | 415 } |
416 if (this._lastFrame && event.selfTime) | 416 if (this._lastFrame && event.selfTime) |
417 this._lastFrame._addTimeForCategory(WebInspector.TracingTimelineUIUt
ils.eventStyle(event).category.name, event.selfTime); | 417 this._lastFrame._addTimeForCategory(WebInspector.TracingTimelineUIUt
ils.eventStyle(event).category.name, event.selfTime); |
418 | 418 |
419 if (event.args["layerTreeId"] !== this._layerTreeId) | 419 if (event.args["layerTreeId"] !== this._layerTreeId) |
420 return; | 420 return; |
421 | 421 |
422 var timestamp = event.startTime; | 422 var timestamp = event.startTime; |
423 if (event.name === eventNames.BeginFrame) | 423 if (event.name === eventNames.BeginFrame) |
(...skipping 132 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
556 /** | 556 /** |
557 * @param {string} category | 557 * @param {string} category |
558 * @param {number} time | 558 * @param {number} time |
559 */ | 559 */ |
560 _addTimeForCategory: function(category, time) | 560 _addTimeForCategory: function(category, time) |
561 { | 561 { |
562 this.timeByCategory[category] = (this.timeByCategory[category] || 0) + t
ime; | 562 this.timeByCategory[category] = (this.timeByCategory[category] || 0) + t
ime; |
563 this.cpuTime += time; | 563 this.cpuTime += time; |
564 }, | 564 }, |
565 } | 565 } |
OLD | NEW |