| OLD | NEW |
| 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 */ |
| (...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 value: clientInfo.blacklist_version | 59 value: clientInfo.blacklist_version |
| 60 }, | 60 }, |
| 61 { | 61 { |
| 62 description: 'ANGLE revision', | 62 description: 'ANGLE revision', |
| 63 value: clientInfo.angle_revision | 63 value: clientInfo.angle_revision |
| 64 }, | 64 }, |
| 65 { | 65 { |
| 66 description: '2D graphics backend', | 66 description: '2D graphics backend', |
| 67 value: clientInfo.graphics_backend | 67 value: clientInfo.graphics_backend |
| 68 }]); | 68 }]); |
| 69 | |
| 70 this.setTable_('performance-info', clientInfo.performance); | |
| 71 } else { | 69 } else { |
| 72 this.setText_('client-info', '... loading...'); | 70 this.setText_('client-info', '... loading...'); |
| 73 } | 71 } |
| 74 | 72 |
| 75 // Feature map | 73 // Feature map |
| 76 var featureLabelMap = { | 74 var featureLabelMap = { |
| 77 '2d_canvas': 'Canvas', | 75 '2d_canvas': 'Canvas', |
| 78 '3d_css': '3D CSS', | 76 '3d_css': '3D CSS', |
| 79 'compositing': 'HTML Rendering', | 77 'compositing': 'HTML Rendering', |
| 80 'webgl': 'WebGL', | 78 'webgl': 'WebGL', |
| (...skipping 17 matching lines...) Expand all Loading... |
| 98 'unavailable_software': 'feature-yellow', | 96 'unavailable_software': 'feature-yellow', |
| 99 'enabled': 'feature-green' | 97 'enabled': 'feature-green' |
| 100 }; | 98 }; |
| 101 | 99 |
| 102 // GPU info, basic | 100 // GPU info, basic |
| 103 var diagnosticsDiv = this.querySelector('.diagnostics'); | 101 var diagnosticsDiv = this.querySelector('.diagnostics'); |
| 104 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); | 102 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); |
| 105 var featureStatusList = this.querySelector('.feature-status-list'); | 103 var featureStatusList = this.querySelector('.feature-status-list'); |
| 106 var problemsDiv = this.querySelector('.problems-div'); | 104 var problemsDiv = this.querySelector('.problems-div'); |
| 107 var problemsList = this.querySelector('.problems-list'); | 105 var problemsList = this.querySelector('.problems-list'); |
| 106 var performanceDiv = this.querySelector('.performance-div'); |
| 108 var gpuInfo = browserBridge.gpuInfo; | 107 var gpuInfo = browserBridge.gpuInfo; |
| 109 var i; | 108 var i; |
| 110 if (gpuInfo) { | 109 if (gpuInfo) { |
| 111 // Not using jstemplate here for blacklist status because we construct | 110 // Not using jstemplate here for blacklist status because we construct |
| 112 // href from data, which jstemplate can't seem to do. | 111 // href from data, which jstemplate can't seem to do. |
| 113 if (gpuInfo.featureStatus) { | 112 if (gpuInfo.featureStatus) { |
| 114 // feature status list | 113 // feature status list |
| 115 featureStatusList.textContent = ''; | 114 featureStatusList.textContent = ''; |
| 116 for (i = 0; i < gpuInfo.featureStatus.featureStatus.length; | 115 for (i = 0; i < gpuInfo.featureStatus.featureStatus.length; |
| 117 i++) { | 116 i++) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 151 | 150 |
| 152 } else { | 151 } else { |
| 153 featureStatusList.textContent = ''; | 152 featureStatusList.textContent = ''; |
| 154 problemsList.hidden = true; | 153 problemsList.hidden = true; |
| 155 } | 154 } |
| 156 if (gpuInfo.basic_info) | 155 if (gpuInfo.basic_info) |
| 157 this.setTable_('basic-info', gpuInfo.basic_info); | 156 this.setTable_('basic-info', gpuInfo.basic_info); |
| 158 else | 157 else |
| 159 this.setTable_('basic-info', []); | 158 this.setTable_('basic-info', []); |
| 160 | 159 |
| 160 if (gpuInfo.performance_info) { |
| 161 performanceDiv.hidden = false; |
| 162 this.setTable_('performance-info', gpuInfo.performance_info); |
| 163 } else { |
| 164 performanceDiv.hidden = true; |
| 165 } |
| 166 |
| 161 if (gpuInfo.diagnostics) { | 167 if (gpuInfo.diagnostics) { |
| 162 diagnosticsDiv.hidden = false; | 168 diagnosticsDiv.hidden = false; |
| 163 diagnosticsLoadingDiv.hidden = true; | 169 diagnosticsLoadingDiv.hidden = true; |
| 164 $('diagnostics-table').hidden = false; | 170 $('diagnostics-table').hidden = false; |
| 165 this.setTable_('diagnostics-table', gpuInfo.diagnostics); | 171 this.setTable_('diagnostics-table', gpuInfo.diagnostics); |
| 166 } else if (gpuInfo.diagnostics === null) { | 172 } else if (gpuInfo.diagnostics === null) { |
| 167 // gpu_internals.cc sets diagnostics to null when it is being loaded | 173 // gpu_internals.cc sets diagnostics to null when it is being loaded |
| 168 diagnosticsDiv.hidden = false; | 174 diagnosticsDiv.hidden = false; |
| 169 diagnosticsLoadingDiv.hidden = false; | 175 diagnosticsLoadingDiv.hidden = false; |
| 170 $('diagnostics-table').hidden = true; | 176 $('diagnostics-table').hidden = true; |
| (...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 253 | 259 |
| 254 peg.innerHTML = ''; | 260 peg.innerHTML = ''; |
| 255 peg.appendChild(template); | 261 peg.appendChild(template); |
| 256 } | 262 } |
| 257 }; | 263 }; |
| 258 | 264 |
| 259 return { | 265 return { |
| 260 InfoView: InfoView | 266 InfoView: InfoView |
| 261 }; | 267 }; |
| 262 }); | 268 }); |
| OLD | NEW |