Chromium Code Reviews| Index: content/browser/resources/gpu/info_view.js |
| diff --git a/content/browser/resources/gpu/info_view.js b/content/browser/resources/gpu/info_view.js |
| index 20c6b8e9cc8ca74a9f02a2541ad77e9784853125..2c9b53003138be54c412984958efaa60c1630626 100644 |
| --- a/content/browser/resources/gpu/info_view.js |
| +++ b/content/browser/resources/gpu/info_view.js |
| @@ -96,6 +96,11 @@ cr.define('gpu', function() { |
| 'multiple_raster_threads': 'Multiple Raster Threads', |
| }; |
| + // GpuMemoryBuffer map |
| + var gmbLabelMap = { |
| + 'native_gpu_memory_buffers': 'Native', |
| + }; |
|
reveman
2015/10/16 18:37:43
Why is this not just another field in featureLabel
|
| + |
| var statusMap = { |
| 'disabled_software': { |
| 'label': 'Software only. Hardware acceleration disabled', |
| @@ -147,6 +152,7 @@ cr.define('gpu', function() { |
| var diagnosticsDiv = this.querySelector('.diagnostics'); |
| var diagnosticsLoadingDiv = this.querySelector('.diagnostics-loading'); |
| var featureStatusList = this.querySelector('.feature-status-list'); |
| + var gmbImplementationList = this.querySelector('.gmb-implementation-list'); |
| var problemsDiv = this.querySelector('.problems-div'); |
| var problemsList = this.querySelector('.problems-list'); |
| var workaroundsDiv = this.querySelector('.workarounds-div'); |
| @@ -185,6 +191,34 @@ cr.define('gpu', function() { |
| featureStatusList.appendChild(featureEl); |
| } |
| + // GpuMemoryBuffer Implementation list |
| + gmbImplementationList.textContent = ''; |
| + for (var featureName in gpuInfo.featureStatus.gmbStatus) { |
| + var gmbStatus = |
| + gpuInfo.featureStatus.gmbStatus[featureName]; |
| + var featureEl = document.createElement('li'); |
| + |
| + var nameEl = document.createElement('span'); |
| + if (!gmbLabelMap[featureName]) |
| + console.log('Missing featureLabel for', featureName); |
| + nameEl.textContent = gmbLabelMap[featureName] + ': '; |
| + featureEl.appendChild(nameEl); |
| + |
| + var statusEl = document.createElement('span'); |
| + var statusInfo = statusMap[gmbStatus]; |
| + if (!statusInfo) { |
| + console.log('Missing status for ', gmbStatus); |
| + statusEl.textContent = 'Unknown'; |
| + statusEl.className = 'feature-red'; |
| + } else { |
| + statusEl.textContent = statusInfo['label']; |
| + statusEl.className = statusInfo['class']; |
| + } |
| + featureEl.appendChild(statusEl); |
| + |
| + gmbImplementationList.appendChild(featureEl); |
| + } |
| + |
| // problems list |
| if (gpuInfo.featureStatus.problems.length) { |
| problemsDiv.hidden = false; |
| @@ -213,6 +247,7 @@ cr.define('gpu', function() { |
| } else { |
| featureStatusList.textContent = ''; |
| + gmbImplementationList.textContent = ''; |
| problemsList.hidden = true; |
| workaroundsList.hidden = true; |
| } |