diff options
author | Matt A. Tobin <email@mattatobin.com> | 2022-05-17 00:13:54 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2022-05-17 00:14:28 -0500 |
commit | d5b9a341b8fc83017590d4a435bee27c5a106c66 (patch) | |
tree | 25151a190a3a9407c2e4ac00701b8ffb8961b086 /modules | |
parent | d4ee07aad33c1e6817f558c46e849a7f0143bda2 (diff) | |
download | aura-central-d5b9a341b8fc83017590d4a435bee27c5a106c66.tar.gz |
[DOM:Media] Revert Bug 1212323 Parts 2 and 3 where supportsHardwareH264Decoding() uses a promise if MP4 Hardware Acceleration to about:support
This concern was largely Mac-specific but I did leave Part 1 intact because the Mozilla Bug makes a good point that some systems may always software render a 64x64 video (specifically apple but other implementations could adopt this nonsense as well). Personally I want accelerated video.. damn it!
The real question is.. Why was the promise never resolving in the first place? Is it fall out from killing DOM Promise? It used jsval but who the hell knows or even cares.. It works and can once again be queried without jumping through god damned hoops.
Diffstat (limited to 'modules')
-rw-r--r-- | modules/Troubleshoot.jsm | 23 |
1 files changed, 3 insertions, 20 deletions
diff --git a/modules/Troubleshoot.jsm b/modules/Troubleshoot.jsm index d8f485d2c..47e9b1d37 100644 --- a/modules/Troubleshoot.jsm +++ b/modules/Troubleshoot.jsm @@ -302,13 +302,6 @@ var dataProviders = { } catch (e) {} - let promises = []; - // done will be called upon all pending promises being resolved. - // add your pending promise to promises when adding new ones. - function completed() { - Promise.all(promises).then(() => done(data)); - } - data.numTotalWindows = 0; data.numAcceleratedWindows = 0; let winEnumer = Services.ww.getWindowEnumerator(); @@ -324,6 +317,7 @@ var dataProviders = { data.numTotalWindows++; data.windowLayerManagerType = winUtils.layerManagerType; data.windowLayerManagerRemote = winUtils.layerManagerRemote; + data.supportsHardwareH264 = winUtils.supportsHardwareH264Decoding; } catch (e) { continue; @@ -332,17 +326,6 @@ var dataProviders = { data.numAcceleratedWindows++; } - data.supportsHardwareH264 = "Unknown"; - try { - // After restart - data may not be available - let promise = winUtils.supportsHardwareH264Decoding; - promise.then(function(v) { - data.supportsHardwareH264 = v; - }); - promises.push(promise); - } catch (e) {} - - if (!data.numAcceleratedWindows && gfxInfo) { #ifdef XP_WIN let feature = gfxInfo.FEATURE_DIRECT3D_9_LAYERS; @@ -353,7 +336,7 @@ var dataProviders = { } if (!gfxInfo) { - completed(); + done(data); return; } @@ -485,7 +468,7 @@ var dataProviders = { data.featureLog = gfxInfo.getFeatureLog(); data.crashGuards = gfxInfo.getActiveCrashGuards(); - completed(); + done(data); }, media: function media(done) { |