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 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
454 | 454 |
455 var categoryName = WebInspector.TracingTimelineUIUtils.eventStyle(ev
ent).category.name; | 455 var categoryName = WebInspector.TracingTimelineUIUtils.eventStyle(ev
ent).category.name; |
456 this._lastFrame._addTimeForCategory(categoryName, selfTime); | 456 this._lastFrame._addTimeForCategory(categoryName, selfTime); |
457 return; | 457 return; |
458 } | 458 } |
459 | 459 |
460 if (!this._framePendingCommit && WebInspector.TracingTimelineFrameModel.
_mainFrameMarkers.indexOf(event.name) >= 0) | 460 if (!this._framePendingCommit && WebInspector.TracingTimelineFrameModel.
_mainFrameMarkers.indexOf(event.name) >= 0) |
461 this._framePendingCommit = new WebInspector.PendingFrame(); | 461 this._framePendingCommit = new WebInspector.PendingFrame(); |
462 if (!this._framePendingCommit) | 462 if (!this._framePendingCommit) |
463 return; | 463 return; |
464 if (event.name === eventNames.Paint && event.args["data"]["layerId"] &&
event.picture) { | 464 if (event.name === eventNames.Paint && event.dataArg["layerId"] && event
.picture) { |
465 /** @type {!WebInspector.LayerPaintEvent} */ | 465 /** @type {!WebInspector.LayerPaintEvent} */ |
466 var paintEvent = {layerId: event.args["data"]["layerId"], picture: e
vent.picture, rect: event.layerRect, traceEvent: event}; | 466 var paintEvent = {layerId: event.dataArg["layerId"], picture: event.
picture, rect: event.layerRect, traceEvent: event}; |
467 this._framePendingCommit.paints.push(paintEvent); | 467 this._framePendingCommit.paints.push(paintEvent); |
468 } | 468 } |
469 | 469 |
470 if (selfTime) { | 470 if (selfTime) { |
471 var categoryName = WebInspector.TracingTimelineUIUtils.eventStyle(ev
ent).category.name; | 471 var categoryName = WebInspector.TracingTimelineUIUtils.eventStyle(ev
ent).category.name; |
472 this._framePendingCommit.timeByCategory[categoryName] = (this._frame
PendingCommit.timeByCategory[categoryName] || 0) + selfTime; | 472 this._framePendingCommit.timeByCategory[categoryName] = (this._frame
PendingCommit.timeByCategory[categoryName] || 0) + selfTime; |
473 } | 473 } |
474 if (event.name === eventNames.CompositeLayers && event.args["layerTreeId
"] === this._layerTreeId) | 474 if (event.name === eventNames.CompositeLayers && event.args["layerTreeId
"] === this._layerTreeId) |
475 this.handleCompositeLayers(); | 475 this.handleCompositeLayers(); |
476 }, | 476 }, |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
593 /** | 593 /** |
594 * @constructor | 594 * @constructor |
595 */ | 595 */ |
596 WebInspector.PendingFrame = function() | 596 WebInspector.PendingFrame = function() |
597 { | 597 { |
598 /** @type {!Object.<string, number>} */ | 598 /** @type {!Object.<string, number>} */ |
599 this.timeByCategory = {}; | 599 this.timeByCategory = {}; |
600 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ | 600 /** @type {!Array.<!WebInspector.LayerPaintEvent>} */ |
601 this.paints = []; | 601 this.paints = []; |
602 } | 602 } |
OLD | NEW |