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

Side by Side Diff: chrome/browser/resources/tracing/timeline_track.js

Issue 7497049: Quick-fixes to about:tracing following move (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More minor tweaks 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 Renders an array of slices into the provided div, 7 * @fileoverview Renders an array of slices into the provided div,
8 * using a child canvas element. Uses a FastRectRenderer to draw only 8 * using a child canvas element. Uses a FastRectRenderer to draw only
9 * the visible slices. 9 * the visible slices.
10 */ 10 */
(...skipping 397 matching lines...) Expand 10 before | Expand all | Expand 10 after
408 loWX, hiWX, 408 loWX, hiWX,
409 onPickHit); 409 onPickHit);
410 }, 410 },
411 411
412 /** 412 /**
413 * Find the index for the given slice. 413 * Find the index for the given slice.
414 * @return {index} Index of the given slice, or undefined. 414 * @return {index} Index of the given slice, or undefined.
415 * @private 415 * @private
416 */ 416 */
417 indexOfSlice_: function(slice) { 417 indexOfSlice_: function(slice) {
418 var index = gpu.findLowIndexInSortedArray(this.slices_, 418 var index = tracing.findLowIndexInSortedArray(this.slices_,
419 function(x) { return x.start; }, 419 function(x) { return x.start; },
420 slice.start); 420 slice.start);
421 while (index < this.slices_.length && 421 while (index < this.slices_.length &&
422 slice.start == this.slices_[index].start && 422 slice.start == this.slices_[index].start &&
423 slice.colorId != this.slices_[index].colorId) { 423 slice.colorId != this.slices_[index].colorId) {
424 index++; 424 index++;
425 } 425 }
426 return index < this.slices_.length ? index : undefined; 426 return index < this.slices_.length ? index : undefined;
427 }, 427 },
428 428
(...skipping 28 matching lines...) Expand all
457 return index != undefined ? this.slices_[index] : undefined; 457 return index != undefined ? this.slices_[index] : undefined;
458 }, 458 },
459 459
460 }; 460 };
461 461
462 return { 462 return {
463 TimelineSliceTrack: TimelineSliceTrack, 463 TimelineSliceTrack: TimelineSliceTrack,
464 TimelineThreadTrack: TimelineThreadTrack 464 TimelineThreadTrack: TimelineThreadTrack
465 }; 465 };
466 }); 466 });
OLDNEW
« no previous file with comments | « chrome/browser/resources/tracing/timeline.js ('k') | chrome/browser/resources/tracing/tracing_controller.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698