| 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 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 177 return; | 177 return; |
| 178 } | 178 } |
| 179 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { | 179 if (event.phase === WebInspector.TracingModel.Phase.SnapshotObject && ev
ent.name === eventNames.LayerTreeHostImplSnapshot && parseInt(event.id, 0) === t
his._layerTreeId) { |
| 180 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"])); | 180 this.handleLayerTreeSnapshot(new WebInspector.DeferredTracingLayerTr
ee(this.target(), event.args["snapshot"]["active_tree"]["root_layer"])); |
| 181 return; | 181 return; |
| 182 } | 182 } |
| 183 | 183 |
| 184 if (event.args["layerTreeId"] !== this._layerTreeId) | 184 if (event.args["layerTreeId"] !== this._layerTreeId) |
| 185 return; | 185 return; |
| 186 | 186 |
| 187 var timestamp = event.startTime / 1000; | 187 var timestamp = event.startTime; |
| 188 if (event.name === eventNames.BeginFrame) | 188 if (event.name === eventNames.BeginFrame) |
| 189 this.handleBeginFrame(timestamp); | 189 this.handleBeginFrame(timestamp); |
| 190 else if (event.name === eventNames.DrawFrame) | 190 else if (event.name === eventNames.DrawFrame) |
| 191 this.handleDrawFrame(timestamp); | 191 this.handleDrawFrame(timestamp); |
| 192 else if (event.name === eventNames.ActivateLayerTree) | 192 else if (event.name === eventNames.ActivateLayerTree) |
| 193 this.handleActivateLayerTree(); | 193 this.handleActivateLayerTree(); |
| 194 else if (event.name === eventNames.RequestMainThreadFrame) | 194 else if (event.name === eventNames.RequestMainThreadFrame) |
| 195 this.handleRequestMainThreadFrame(); | 195 this.handleRequestMainThreadFrame(); |
| 196 else if (event.name === eventNames.CompositeLayers) | 196 else if (event.name === eventNames.CompositeLayers) |
| 197 this.handleCompositeLayers(); | 197 this.handleCompositeLayers(); |
| (...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 471 this._updateCpuTime(); | 471 this._updateCpuTime(); |
| 472 }, | 472 }, |
| 473 | 473 |
| 474 _updateCpuTime: function() | 474 _updateCpuTime: function() |
| 475 { | 475 { |
| 476 this.cpuTime = 0; | 476 this.cpuTime = 0; |
| 477 for (var key in this.timeByCategory) | 477 for (var key in this.timeByCategory) |
| 478 this.cpuTime += this.timeByCategory[key]; | 478 this.cpuTime += this.timeByCategory[key]; |
| 479 } | 479 } |
| 480 } | 480 } |
| OLD | NEW |