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

Unified 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: WIP on reveman comments in #9 Created 5 years, 2 months 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 side-by-side diff with in-line comments
Download patch
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;
}
« content/browser/gpu/compositor_util.cc ('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