Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(433)

Side by Side Diff: Source/devtools/front_end/timeline/TimelineFrameModel.js

Issue 318093002: Convert timestamp to milliseconds when creating TracingModel.Event (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Created 6 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « Source/devtools/front_end/timeline/TimelineFlameChart.js ('k') | Source/devtools/front_end/timeline/TimelineModel.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698