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