Chromium Code Reviews| Index: chrome/browser/resources/gpu_internals/timeline_model.js |
| diff --git a/chrome/browser/resources/gpu_internals/timeline_model.js b/chrome/browser/resources/gpu_internals/timeline_model.js |
| index 1739e3c195685dc44f5c6434c218a9145a2c5774..2ded8723901b84d9dd64755ee7f2a519590369dc 100644 |
| --- a/chrome/browser/resources/gpu_internals/timeline_model.js |
| +++ b/chrome/browser/resources/gpu_internals/timeline_model.js |
| @@ -65,6 +65,8 @@ cr.define('gpu', function() { |
| } |
| TimelineThread.prototype = { |
| + name: undefined, |
| + |
| getSubrow: function(i) { |
| while (i >= this.subRows.length) |
| this.subRows.push([]); |
| @@ -229,8 +231,15 @@ cr.define('gpu', function() { |
| } else if (event.ph == 'I') { |
| // TODO(nduca): Implement parsing of immediate events. |
| console.log('Parsing of I-type events not implemented.'); |
| + } else if (event.ph == 'M') { |
| + if (event.name == 'thread_name') { |
| + var thread = this.getProcess(event.pid).getThread(event.tid); |
| + thread.name = event.args.name; |
| + } else { |
| + console.log('Unrecognized metadata name: ' + event.name); |
| + } |
| } else { |
| - throw new Error('Unrecognized event phase: ' + event.ph + |
| + console.log('Unrecognized event phase: ' + event.ph + |
|
nduca
2011/07/26 09:46:33
stop throwing errors and switch to logging. Unreco
|
| '(' + event.name + ')'); |
| } |
| } |
| @@ -275,7 +284,8 @@ cr.define('gpu', function() { |
| for (var tI = 0; tI < threads.length; tI++) { |
| var thread = threads[tI]; |
| thread.updateBounds(); |
| - if (thread.minTimestamp && thread.maxTimestamp) { |
| + if (thread.minTimestamp != undefined && |
|
nduca
2011/07/26 09:46:33
Fix a small issue spotted by tonyg for small trace
|
| + thread.maxTimestamp != undefined) { |
| wmin = Math.min(wmin, thread.minTimestamp); |
| wmax = Math.max(wmax, thread.maxTimestamp); |
| } |