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

Side by Side Diff: chrome/browser/resources/gpu_internals/timeline.js

Issue 7495036: about:gpu support for thread name metadata. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More cleanup Created 9 years, 4 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 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 5
6 /** 6 /**
7 * @fileoverview Interactive visualizaiton of TimelineModel objects 7 * @fileoverview Interactive visualizaiton of TimelineModel objects
8 * based loosely on gantt charts. Each thread in the TimelineModel is given a 8 * based loosely on gantt charts. Each thread in the TimelineModel is given a
9 * set of TimelineTracks, one per subrow in the thread. The Timeline class 9 * set of TimelineTracks, one per subrow in the thread. The Timeline class
10 * acts as a controller, creating the individual tracks, while TimelineTracks 10 * acts as a controller, creating the individual tracks, while TimelineTracks
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (!model) 200 if (!model)
201 throw Error('Model cannot be null'); 201 throw Error('Model cannot be null');
202 if (this.model) { 202 if (this.model) {
203 throw Error('Cannot set model twice.'); 203 throw Error('Cannot set model twice.');
204 } 204 }
205 this.model_ = model; 205 this.model_ = model;
206 206
207 // Create tracks. 207 // Create tracks.
208 this.tracks_.textContent = ''; 208 this.tracks_.textContent = '';
209 var threads = model.getAllThreads(); 209 var threads = model.getAllThreads();
210 threads.sort(gpu.TimelineThread.compare);
210 for (var tI = 0; tI < threads.length; tI++) { 211 for (var tI = 0; tI < threads.length; tI++) {
211 var thread = threads[tI]; 212 var thread = threads[tI];
212 var track = new TimelineThreadTrack(); 213 var track = new TimelineThreadTrack();
213 track.thread = thread; 214 track.thread = thread;
214 track.viewport = this.viewport_; 215 track.viewport = this.viewport_;
215 this.tracks_.appendChild(track); 216 this.tracks_.appendChild(track);
216 217
217 } 218 }
218 219
219 this.needsViewportReset_ = true; 220 this.needsViewportReset_ = true;
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
486 /** 487 /**
487 * The TimelineModel being viewed by the timeline 488 * The TimelineModel being viewed by the timeline
488 * @type {TimelineModel} 489 * @type {TimelineModel}
489 */ 490 */
490 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS); 491 cr.defineProperty(Timeline, 'model', cr.PropertyKind.JS);
491 492
492 return { 493 return {
493 Timeline: Timeline 494 Timeline: Timeline
494 }; 495 };
495 }); 496 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/gpu_internals/timeline.css ('k') | chrome/browser/resources/gpu_internals/timeline_model.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698