From ec01b04c7e527c43a040435a9b53e751db842ec9 Mon Sep 17 00:00:00 2001 From: Jeff Gilbert Date: Wed, 22 Feb 2017 18:18:25 -0800 Subject: [PATCH] Bug 1341957 - Add webgl.getSupportedExtensions() to about:support. - r=daoshengmu MozReview-Commit-ID: EQci0ZxlVyM --- toolkit/content/aboutSupport.js | 6 ++++-- .../chrome/global/aboutSupport.properties | 18 ++++++++++-------- toolkit/modules/Troubleshoot.jsm | 7 ++++++- .../tests/browser/browser_Troubleshoot.js | 6 ++++++ 4 files changed, 26 insertions(+), 11 deletions(-) diff --git a/toolkit/content/aboutSupport.js b/toolkit/content/aboutSupport.js index 7183458ad5ff..ba8d1ba2dd24 100644 --- a/toolkit/content/aboutSupport.js +++ b/toolkit/content/aboutSupport.js @@ -376,14 +376,16 @@ var snapshotFormatters = { apzInfo.length ? apzInfo.join("; ") : localizedMsg(["apzNone"])); + addRowFromKey("features", "webgl1WSIInfo"); addRowFromKey("features", "webgl1Renderer"); addRowFromKey("features", "webgl1Version"); + addRowFromKey("features", "webgl1DriverExtensions"); addRowFromKey("features", "webgl1Extensions"); - addRowFromKey("features", "webgl1WSIInfo"); + addRowFromKey("features", "webgl2WSIInfo"); addRowFromKey("features", "webgl2Renderer"); addRowFromKey("features", "webgl2Version"); + addRowFromKey("features", "webgl2DriverExtensions"); addRowFromKey("features", "webgl2Extensions"); - addRowFromKey("features", "webgl2WSIInfo"); addRowFromKey("features", "supportsHardwareH264", "hardwareH264"); addRowFromKey("features", "currentAudioBackend", "audioBackend"); addRowFromKey("features", "direct2DEnabled", "#Direct2D"); diff --git a/toolkit/locales/en-US/chrome/global/aboutSupport.properties b/toolkit/locales/en-US/chrome/global/aboutSupport.properties index 09298359a1a5..d19dcd03cdae 100644 --- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties +++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties @@ -71,14 +71,16 @@ gpuRAM = RAM gpuDriverVersion = Driver Version gpuDriverDate = Driver Date gpuActive = Active -webgl1Renderer = WebGL 1 Renderer -webgl1Version = WebGL 1 GL Version -webgl1Extensions = WebGL 1 GL Extensions -webgl1WSIInfo = WebGL 1 WSI Info -webgl2Renderer = WebGL 2 Renderer -webgl2Version = WebGL 2 GL Version -webgl2Extensions = WebGL 2 GL Extensions -webgl2WSIInfo = WebGL 2 WSI Info +webgl1WSIInfo = WebGL 1 Driver WSI Info +webgl1Renderer = WebGL 1 Driver Renderer +webgl1Version = WebGL 1 Driver Version +webgl1DriverExtensions = WebGL 1 Driver Extensions +webgl1Extensions = WebGL 1 Extensions +webgl2WSIInfo = WebGL 2 Driver WSI Info +webgl2Renderer = WebGL 2 Driver Renderer +webgl2Version = WebGL 2 Driver Version +webgl2DriverExtensions = WebGL 2 Driver Extensions +webgl2Extensions = WebGL 2 Extensions GPU1 = GPU #1 GPU2 = GPU #2 blocklistedBug = Blocklisted due to known issues diff --git a/toolkit/modules/Troubleshoot.jsm b/toolkit/modules/Troubleshoot.jsm index dbb114cb45b7..aea6dd80de79 100644 --- a/toolkit/modules/Troubleshoot.jsm +++ b/toolkit/modules/Troubleshoot.jsm @@ -422,6 +422,7 @@ var dataProviders = { function GetWebGLInfo(data, keyPrefix, contextType) { data[keyPrefix + "Renderer"] = "-"; data[keyPrefix + "Version"] = "-"; + data[keyPrefix + "DriverExtensions"] = "-"; data[keyPrefix + "Extensions"] = "-"; data[keyPrefix + "WSIInfo"] = "-"; @@ -458,6 +459,10 @@ var dataProviders = { // // + data[keyPrefix + "Extensions"] = gl.getSupportedExtensions().join(' '); + + // // + let ext = gl.getExtension("MOZ_debug_get"); // This extension is unconditionally available to chrome. No need to check. let vendor = ext.getParameter(gl.VENDOR); @@ -465,7 +470,7 @@ var dataProviders = { data[keyPrefix + "Renderer"] = vendor + " -- " + renderer; data[keyPrefix + "Version"] = ext.getParameter(gl.VERSION); - data[keyPrefix + "Extensions"] = ext.getParameter(ext.EXTENSIONS); + data[keyPrefix + "DriverExtensions"] = ext.getParameter(ext.EXTENSIONS); data[keyPrefix + "WSIInfo"] = ext.getParameter(ext.WSI_INFO); // // diff --git a/toolkit/modules/tests/browser/browser_Troubleshoot.js b/toolkit/modules/tests/browser/browser_Troubleshoot.js index d3c7711196ba..b1a9d71f90b2 100644 --- a/toolkit/modules/tests/browser/browser_Troubleshoot.js +++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js @@ -300,6 +300,9 @@ const SNAPSHOT_SCHEMA = { webgl1Version: { type: "string", }, + webgl1DriverExtensions: { + type: "string", + }, webgl1Extensions: { type: "string", }, @@ -312,6 +315,9 @@ const SNAPSHOT_SCHEMA = { webgl2Version: { type: "string", }, + webgl2DriverExtensions: { + type: "string", + }, webgl2Extensions: { type: "string", },