Bug 1341957 - Add webgl.getSupportedExtensions() to about:support. - r=daoshengmu
authorJeff Gilbert <jgilbert@mozilla.com>
Wed, 22 Feb 2017 18:18:25 -0800
changeset 344542 caf487c8514e8cdeb0f63910a62627d8fefe0d10
parent 344541 c7e5e32cae0a3c388b03fb2117d4d5f137be3827
child 344543 fcef571d22c3ad151a62cb1cad6d751f79a72446
push id87391
push userjgilbert@mozilla.com
push dateThu, 23 Feb 2017 22:42:10 +0000
treeherdermozilla-inbound@caf487c8514e [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdaoshengmu
bugs1341957
milestone54.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1341957 - Add webgl.getSupportedExtensions() to about:support. - r=daoshengmu MozReview-Commit-ID: EQci0ZxlVyM
toolkit/content/aboutSupport.js
toolkit/locales/en-US/chrome/global/aboutSupport.properties
toolkit/modules/Troubleshoot.jsm
toolkit/modules/tests/browser/browser_Troubleshoot.js
--- a/toolkit/content/aboutSupport.js
+++ b/toolkit/content/aboutSupport.js
@@ -371,24 +371,26 @@ var snapshotFormatters = {
     delete data.numTotalWindows;
     delete data.numAcceleratedWindows;
     delete data.numAcceleratedWindowsMessage;
 
     addRow("features", "asyncPanZoom",
            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");
 
     if ("directWriteEnabled" in data) {
       let message = data.directWriteEnabled;
       if ("directWriteVersion" in data)
         message += " (" + data.directWriteVersion + ")";
--- a/toolkit/locales/en-US/chrome/global/aboutSupport.properties
+++ b/toolkit/locales/en-US/chrome/global/aboutSupport.properties
@@ -66,24 +66,26 @@ gpuDescription = Description
 gpuVendorID = Vendor ID
 gpuDeviceID = Device ID
 gpuSubsysID = Subsys ID
 gpuDrivers = Drivers
 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
 # LOCALIZATION NOTE %1$S will be replaced with a bug number string.
 bugLink = bug %1$S
 # LOCALIZATION NOTE %1$S will be replaced with an arbitrary identifier
 # string that can be searched on DXR/MXR or grepped in the source tree.
 unknownFailure = Blocklisted; failure code %1$S
--- a/toolkit/modules/Troubleshoot.jsm
+++ b/toolkit/modules/Troubleshoot.jsm
@@ -417,16 +417,17 @@ var dataProviders = {
     let doc =
       Cc["@mozilla.org/xmlextras/domparser;1"]
       .createInstance(Ci.nsIDOMParser)
       .parseFromString("<html/>", "text/html");
 
     function GetWebGLInfo(data, keyPrefix, contextType) {
         data[keyPrefix + "Renderer"] = "-";
         data[keyPrefix + "Version"] = "-";
+        data[keyPrefix + "DriverExtensions"] = "-";
         data[keyPrefix + "Extensions"] = "-";
         data[keyPrefix + "WSIInfo"] = "-";
 
         // //
 
         let canvas = doc.createElement("canvas");
         canvas.width = 1;
         canvas.height = 1;
@@ -453,24 +454,28 @@ var dataProviders = {
         }
         if (!gl) {
             data[keyPrefix + "Renderer"] = creationError || "(no creation error info)";
             return;
         }
 
         // //
 
+        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);
         let renderer = ext.getParameter(gl.RENDERER);
 
         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);
 
         // //
 
         // Eagerly free resources.
         let loseExt = gl.getExtension("WEBGL_lose_context");
         loseExt.loseContext();
     }
--- a/toolkit/modules/tests/browser/browser_Troubleshoot.js
+++ b/toolkit/modules/tests/browser/browser_Troubleshoot.js
@@ -295,28 +295,34 @@ const SNAPSHOT_SCHEMA = {
           type: "string",
         },
         webgl1Renderer: {
           type: "string",
         },
         webgl1Version: {
           type: "string",
         },
+        webgl1DriverExtensions: {
+          type: "string",
+        },
         webgl1Extensions: {
           type: "string",
         },
         webgl1WSIInfo: {
           type: "string",
         },
         webgl2Renderer: {
           type: "string",
         },
         webgl2Version: {
           type: "string",
         },
+        webgl2DriverExtensions: {
+          type: "string",
+        },
         webgl2Extensions: {
           type: "string",
         },
         webgl2WSIInfo: {
           type: "string",
         },
         info: {
           type: "object",