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

Unified Diff: chrome/browser/resources/gpu_internals/timeline_track.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, 5 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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/resources/gpu_internals/timeline_track.js
diff --git a/chrome/browser/resources/gpu_internals/timeline_track.js b/chrome/browser/resources/gpu_internals/timeline_track.js
index 493be171be1faba51d569aa5eff4639a2169d8cd..da3ac5465712cddaed68db2048889460f07a5667 100644
--- a/chrome/browser/resources/gpu_internals/timeline_track.js
+++ b/chrome/browser/resources/gpu_internals/timeline_track.js
@@ -132,8 +132,12 @@ cr.define('gpu', function() {
addTrack(this, this.thread_.subRows[srI]);
}
if (this.tracks_.length > 0) {
+ var tname = this.thread_.name || this.thread_.tid;
this.tracks_[0].heading = this.thread_.parent.pid + ': ' +
- this.thread_.tid + ': ';
+ tname + ':';
+ this.tracks_[0].tooltip = 'pid: ' + this.thread_.parent.pid +
+ ', tid: ' + this.thread_.tid +
+ (this.thread_.name ? ', name: ' + this.thread_.name : '');
}
}
},
@@ -194,9 +198,9 @@ cr.define('gpu', function() {
this.className = 'timeline-slice-track';
this.slices_ = null;
- this.titleDiv_ = document.createElement('div');
- this.titleDiv_.className = 'timeline-slice-track-title';
- this.appendChild(this.titleDiv_);
+ this.headingDiv_ = document.createElement('div');
+ this.headingDiv_.className = 'timeline-slice-track-title';
+ this.appendChild(this.headingDiv_);
this.canvasContainer_ = document.createElement('div');
this.canvasContainer_.className = 'timeline-slice-track-canvas-container';
@@ -209,7 +213,11 @@ cr.define('gpu', function() {
},
set heading(text) {
- this.titleDiv_.textContent = text;
+ this.headingDiv_.textContent = text;
+ },
+
+ set tooltip(text) {
+ this.headingDiv_.title = text;
},
set slices(slices) {
@@ -309,7 +317,7 @@ cr.define('gpu', function() {
if (slice.duration > quickDiscardThresshold) {
var title = slice.title;
if (slice.didNotFinish) {
- title += " (Did Not Finish)";
+ title += ' (Did Not Finish)';
}
var labelWidth = quickMeasureText(ctx, title) + 2;
var labelWidthWorld = pixWidth * labelWidth;

Powered by Google App Engine
This is Rietveld 408576698