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 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
88 'flash_3d': 'Flash 3D', | 88 'flash_3d': 'Flash 3D', |
89 'flash_stage3d': 'Flash Stage3D', | 89 'flash_stage3d': 'Flash Stage3D', |
90 'flash_stage3d_baseline': 'Flash Stage3D Baseline profile', | 90 'flash_stage3d_baseline': 'Flash Stage3D Baseline profile', |
91 'texture_sharing': 'Texture Sharing', | 91 'texture_sharing': 'Texture Sharing', |
92 'video_decode': 'Video Decode', | 92 'video_decode': 'Video Decode', |
93 'video_encode': 'Video Encode', | 93 'video_encode': 'Video Encode', |
94 // GPU Switching | 94 // GPU Switching |
95 'gpu_switching': 'GPU Switching', | 95 'gpu_switching': 'GPU Switching', |
96 'panel_fitting': 'Panel Fitting', | 96 'panel_fitting': 'Panel Fitting', |
97 'rasterization': 'Rasterization', | 97 'rasterization': 'Rasterization', |
98 }; | 98 'threaded_rasterization': 'Threaded Rasterization', |
99 var statusLabelMap = { | |
100 'disabled_software': 'Software only. Hardware acceleration disabled.', | |
101 'disabled_software_animated': 'Software animated.', | |
102 'disabled_software_multithreaded': 'Software only, multi-threaded', | |
103 'disabled_off': 'Unavailable. Hardware acceleration disabled.', | |
104 'software': 'Software rendered. Hardware acceleration not enabled.', | |
105 'unavailable_off': 'Unavailable. Hardware acceleration unavailable', | |
106 'unavailable_software': | |
107 'Software only, hardware acceleration unavailable', | |
108 'unavailable_software_threaded': | |
109 'Software only and threaded. Hardware acceleration unavailable.', | |
110 'enabled_readback': 'Hardware accelerated, but at reduced performance', | |
111 'enabled_force': 'Hardware accelerated', | |
112 'enabled_threaded': 'Hardware accelerated and threaded.', | |
113 'enabled': 'Hardware accelerated', | |
114 'accelerated': 'Accelerated', | |
115 'accelerated_threaded': 'Accelerated and threaded', | |
116 // GPU Switching | |
117 'gpu_switching_automatic': 'Automatic switching', | |
118 'gpu_switching_force_discrete': 'Always on discrete GPU', | |
119 'gpu_switching_force_integrated': 'Always on integrated GPU', | |
120 }; | 99 }; |
121 | 100 |
122 var statusClassMap = { | 101 var statusMap = { |
123 'disabled_software': 'feature-yellow', | 102 'disabled_software': { |
124 'disabled_software_animated': 'feature-yellow', | 103 'label': 'Software only. Hardware acceleration disabled', |
125 'disabled_software_multithreaded': 'feature-yellow', | 104 'class': 'feature-yellow' |
126 'disabled_off': 'feature-red', | 105 }, |
127 'software': 'feature-yellow', | 106 'disabled_software_threaded': { |
128 'unavailable_off': 'feature-red', | 107 'label': 'Software only, threaded. Hardware acceleration disabled', |
129 'unavailable_software': 'feature-yellow', | 108 'class': 'feature-yellow' |
130 'unavailable_software_threaded': 'feature-yellow', | 109 }, |
131 'enabled_force': 'feature-green', | 110 'disabled_off': { |
132 'enabled_readback': 'feature-yellow', | 111 'label': 'Disabled', |
133 'enabled_threaded': 'feature-green', | 112 'class': 'feature-red' |
134 'enabled': 'feature-green', | 113 }, |
135 'accelerated': 'feature-green', | 114 'disabled_off_ok': { |
136 'accelerated_threaded': 'feature-green', | 115 'label': 'Disabled', |
116 'class': 'feature-yellow' | |
117 }, | |
118 'unavailable_software': { | |
119 'label': 'Software only, hardware acceleration unavailable', | |
120 'class': 'feature-yellow' | |
121 }, | |
122 'unavailable_software_threaded': { | |
123 'label': 'Software only, threaded. Hardware acceleration unavailable', | |
124 'class': 'feature-yellow' | |
125 }, | |
126 'unavailable_off': { | |
127 'label': 'Unavailable', | |
128 'class': 'feature-red' | |
129 }, | |
130 'unavailable_off_ok': { | |
131 'label': 'Unavailable', | |
132 'class': 'feature-yellow' | |
133 }, | |
134 'enabled_readback': { | |
135 'label': 'Hardware accelerated but at reduced performance', | |
136 'class': 'feature-yellow' | |
137 }, | |
138 'enabled_force': { | |
139 'label': 'Hardware accelerated on all pages', | |
140 'class': 'feature-green' | |
141 }, | |
142 'enabled_threaded': { | |
143 'label': 'Hardware accelerated and threaded', | |
144 'class': 'feature-green' | |
145 }, | |
146 'enabled': { | |
147 'label': 'Hardware accelerated', | |
148 'class': 'feature-green' | |
149 }, | |
150 'enabled_on': { | |
151 'label': 'Enabled', | |
152 'class': 'feature-green' | |
153 }, | |
137 // GPU Switching | 154 // GPU Switching |
Zhenyao Mo
2014/06/19 01:42:45
Actually gpu switching is moved to workaround list
| |
138 'gpu_switching_automatic': 'feature-green', | 155 'gpu_switching_automatic': { |
139 'gpu_switching_force_discrete': 'feature-red', | 156 'label': 'Automatic switching', |
140 'gpu_switching_force_integrated': 'feature-red', | 157 'class': 'feature-green' |
158 }, | |
159 'gpu_switching_force_discrete': { | |
160 'label': 'Always on discrete GPU', | |
161 'class': 'feature-red' | |
162 }, | |
163 'gpu_switching_force_integrated': { | |
164 'label': 'Always on integrated GPU', | |
165 'class': 'feature-red' | |
166 } | |
141 }; | 167 }; |
142 | 168 |
143 // GPU info, basic | 169 // GPU info, basic |
144 var diagnosticsDiv = this.querySelector('.diagnostics'); | 170 var diagnosticsDiv = this.querySelector('.diagnostics'); |
145 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); | 171 var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); |
146 var featureStatusList = this.querySelector('.feature-status-list'); | 172 var featureStatusList = this.querySelector('.feature-status-list'); |
147 var problemsDiv = this.querySelector('.problems-div'); | 173 var problemsDiv = this.querySelector('.problems-div'); |
148 var problemsList = this.querySelector('.problems-list'); | 174 var problemsList = this.querySelector('.problems-list'); |
149 var workaroundsDiv = this.querySelector('.workarounds-div'); | 175 var workaroundsDiv = this.querySelector('.workarounds-div'); |
150 var workaroundsList = this.querySelector('.workarounds-list'); | 176 var workaroundsList = this.querySelector('.workarounds-list'); |
(...skipping 11 matching lines...) Expand all Loading... | |
162 gpuInfo.featureStatus.featureStatus[featureName]; | 188 gpuInfo.featureStatus.featureStatus[featureName]; |
163 var featureEl = document.createElement('li'); | 189 var featureEl = document.createElement('li'); |
164 | 190 |
165 var nameEl = document.createElement('span'); | 191 var nameEl = document.createElement('span'); |
166 if (!featureLabelMap[featureName]) | 192 if (!featureLabelMap[featureName]) |
167 console.log('Missing featureLabel for', featureName); | 193 console.log('Missing featureLabel for', featureName); |
168 nameEl.textContent = featureLabelMap[featureName] + ': '; | 194 nameEl.textContent = featureLabelMap[featureName] + ': '; |
169 featureEl.appendChild(nameEl); | 195 featureEl.appendChild(nameEl); |
170 | 196 |
171 var statusEl = document.createElement('span'); | 197 var statusEl = document.createElement('span'); |
172 if (!statusLabelMap[featureStatus]) | 198 var statusInfo = statusMap[featureStatus]; |
173 console.log('Missing statusLabel for', featureStatus); | 199 if (!statusInfo) { |
174 if (!statusClassMap[featureStatus]) | 200 console.log('Missing status for ', featureStatus); |
175 console.log('Missing statusClass for', featureStatus); | 201 statusEl.textContent = 'Unknown'; |
176 statusEl.textContent = statusLabelMap[featureStatus]; | 202 statusEl.className = 'feature-red'; |
177 statusEl.className = statusClassMap[featureStatus]; | 203 } else { |
204 statusEl.textContent = statusInfo['label']; | |
205 statusEl.className = statusInfo['class']; | |
206 } | |
178 featureEl.appendChild(statusEl); | 207 featureEl.appendChild(statusEl); |
179 | 208 |
180 featureStatusList.appendChild(featureEl); | 209 featureStatusList.appendChild(featureEl); |
181 } | 210 } |
182 | 211 |
183 // problems list | 212 // problems list |
184 if (gpuInfo.featureStatus.problems.length) { | 213 if (gpuInfo.featureStatus.problems.length) { |
185 problemsDiv.hidden = false; | 214 problemsDiv.hidden = false; |
186 problemsList.textContent = ''; | 215 problemsList.textContent = ''; |
187 for (i = 0; i < gpuInfo.featureStatus.problems.length; i++) { | 216 for (i = 0; i < gpuInfo.featureStatus.problems.length; i++) { |
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
347 | 376 |
348 peg.innerHTML = ''; | 377 peg.innerHTML = ''; |
349 peg.appendChild(template); | 378 peg.appendChild(template); |
350 } | 379 } |
351 }; | 380 }; |
352 | 381 |
353 return { | 382 return { |
354 InfoView: InfoView | 383 InfoView: InfoView |
355 }; | 384 }; |
356 }); | 385 }); |
OLD | NEW |