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

Side by Side Diff: content/browser/resources/gpu/info_view.js

Issue 1375663002: Show GpuMemoryBuffer feature in chrome://gpu (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: address nits and change GpuMemoryBufferInfoAsDictionaryValue main loop Created 5 years, 1 month 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 This view displays information on the current GPU 7 * @fileoverview This view displays information on the current GPU
8 * hardware. Its primary usefulness is to allow users to copy-paste 8 * hardware. Its primary usefulness is to allow users to copy-paste
9 * their data in an easy to read format for bug reports. 9 * their data in an easy to read format for bug reports.
10 */ 10 */
11 cr.define('gpu', function() { 11 cr.define('gpu', function() {
12 /** 12 /**
13 * Provides information on the GPU process and underlying graphics hardware. 13 * Provides information on the GPU process and underlying graphics hardware.
14 * @constructor 14 * @constructor
15 * @extends {cr.ui.TabPanel} 15 * @extends {cr.ui.TabPanel}
16 */ 16 */
17 var InfoView = cr.ui.define(cr.ui.TabPanel); 17 var InfoView = cr.ui.define(cr.ui.TabPanel);
18 18
19 InfoView.prototype = { 19 InfoView.prototype = {
20 __proto__: cr.ui.TabPanel.prototype, 20 __proto__: cr.ui.TabPanel.prototype,
21 21
22 decorate: function() { 22 decorate: function() {
23 cr.ui.TabPanel.prototype.decorate.apply(this); 23 cr.ui.TabPanel.prototype.decorate.apply(this);
24 24
25 browserBridge.addEventListener('gpuInfoUpdate', this.refresh.bind(this)); 25 browserBridge.addEventListener('gpuInfoUpdate', this.refresh.bind(this));
26 browserBridge.addEventListener('gmbInfoUpdate', this.refresh.bind(this));
reveman 2015/10/28 14:41:07 and here
vignatti (out of this project) 2015/10/28 16:55:25 Done.
26 browserBridge.addEventListener('logMessagesChange', 27 browserBridge.addEventListener('logMessagesChange',
27 this.refresh.bind(this)); 28 this.refresh.bind(this));
28 browserBridge.addEventListener('clientInfoChange', 29 browserBridge.addEventListener('clientInfoChange',
29 this.refresh.bind(this)); 30 this.refresh.bind(this));
30 this.refresh(); 31 this.refresh();
31 }, 32 },
32 33
33 /** 34 /**
34 * Updates the view based on its currently known data 35 * Updates the view based on its currently known data
35 */ 36 */
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 146
146 // GPU info, basic 147 // GPU info, basic
147 var diagnosticsDiv = this.querySelector('.diagnostics'); 148 var diagnosticsDiv = this.querySelector('.diagnostics');
148 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); 149 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading');
149 var featureStatusList = this.querySelector('.feature-status-list'); 150 var featureStatusList = this.querySelector('.feature-status-list');
150 var problemsDiv = this.querySelector('.problems-div'); 151 var problemsDiv = this.querySelector('.problems-div');
151 var problemsList = this.querySelector('.problems-list'); 152 var problemsList = this.querySelector('.problems-list');
152 var workaroundsDiv = this.querySelector('.workarounds-div'); 153 var workaroundsDiv = this.querySelector('.workarounds-div');
153 var workaroundsList = this.querySelector('.workarounds-list'); 154 var workaroundsList = this.querySelector('.workarounds-list');
154 var gpuInfo = browserBridge.gpuInfo; 155 var gpuInfo = browserBridge.gpuInfo;
156 var gmbInfo = browserBridge.gmbInfo;
reveman 2015/10/28 14:41:07 and here
vignatti (out of this project) 2015/10/28 16:55:25 Done.
155 var i; 157 var i;
156 if (gpuInfo) { 158 if (gpuInfo) {
157 // Not using jstemplate here for blacklist status because we construct 159 // Not using jstemplate here for blacklist status because we construct
158 // href from data, which jstemplate can't seem to do. 160 // href from data, which jstemplate can't seem to do.
159 if (gpuInfo.featureStatus) { 161 if (gpuInfo.featureStatus) {
160 // feature status list 162 // feature status list
161 featureStatusList.textContent = ''; 163 featureStatusList.textContent = '';
162 for (var featureName in gpuInfo.featureStatus.featureStatus) { 164 for (var featureName in gpuInfo.featureStatus.featureStatus) {
163 var featureStatus = 165 var featureStatus =
164 gpuInfo.featureStatus.featureStatus[featureName]; 166 gpuInfo.featureStatus.featureStatus[featureName];
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
209 } 211 }
210 } else { 212 } else {
211 workaroundsDiv.hidden = true; 213 workaroundsDiv.hidden = true;
212 } 214 }
213 215
214 } else { 216 } else {
215 featureStatusList.textContent = ''; 217 featureStatusList.textContent = '';
216 problemsList.hidden = true; 218 problemsList.hidden = true;
217 workaroundsList.hidden = true; 219 workaroundsList.hidden = true;
218 } 220 }
221 if (gmbInfo.gmb_info)
reveman 2015/10/28 14:41:07 here and below
vignatti (out of this project) 2015/10/28 16:55:25 Done.
222 this.setTable_('gmb-info', gmbInfo.gmb_info);
223 else
224 this.setTable_('gmb-info', []);
225
219 if (gpuInfo.basic_info) 226 if (gpuInfo.basic_info)
220 this.setTable_('basic-info', gpuInfo.basic_info); 227 this.setTable_('basic-info', gpuInfo.basic_info);
221 else 228 else
222 this.setTable_('basic-info', []); 229 this.setTable_('basic-info', []);
223 230
224 if (gpuInfo.diagnostics) { 231 if (gpuInfo.diagnostics) {
225 diagnosticsDiv.hidden = false; 232 diagnosticsDiv.hidden = false;
226 diagnosticsLoadingDiv.hidden = true; 233 diagnosticsLoadingDiv.hidden = true;
227 $('diagnostics-table').hidden = false; 234 $('diagnostics-table').hidden = false;
228 this.setTable_('diagnostics-table', gpuInfo.diagnostics); 235 this.setTable_('diagnostics-table', gpuInfo.diagnostics);
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
345 352
346 peg.innerHTML = ''; 353 peg.innerHTML = '';
347 peg.appendChild(template); 354 peg.appendChild(template);
348 } 355 }
349 }; 356 };
350 357
351 return { 358 return {
352 InfoView: InfoView 359 InfoView: InfoView
353 }; 360 };
354 }); 361 });
OLDNEW
« content/browser/resources/gpu/info_view.html ('K') | « content/browser/resources/gpu/info_view.html ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698