Bug 1548686 - only add RemoteDecoderModule in CreatePDMs if e10s. r=jya
authorMichael Froman <mfroman@mozilla.com>
Fri, 03 May 2019 00:35:15 +0000
changeset 531297 514ed4bfb0bd41fdb359befe7c30c8c72fee4566
parent 531296 f00e36d2011fb9123158ab5ea3a6b3df6c75761e
child 531298 acbe63c7a420bbc2171a1f3377496f1421ba94ae
push id11265
push userffxbld-merge
push dateMon, 13 May 2019 10:53:39 +0000
treeherdermozilla-beta@77e0fe8dbdd3 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjya
bugs1548686
milestone68.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 1548686 - only add RemoteDecoderModule in CreatePDMs if e10s. r=jya This can cause 1proc tests to fail because no decoder ends up supporting a format. The particular case was enabling Vorbis decoding on RDD. Differential Revision: https://phabricator.services.mozilla.com/D29766
dom/media/platforms/PDMFactory.cpp
dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
--- a/dom/media/platforms/PDMFactory.cpp
+++ b/dom/media/platforms/PDMFactory.cpp
@@ -11,16 +11,17 @@
 #include "EMEDecoderModule.h"
 #include "GMPDecoderModule.h"
 #include "H264.h"
 #include "MP4Decoder.h"
 #include "MediaChangeMonitor.h"
 #include "MediaInfo.h"
 #include "VPXDecoder.h"
 #include "gfxPrefs.h"
+#include "nsIXULRuntime.h" // for BrowserTabsRemoteAutostart
 #include "mozilla/CDMProxy.h"
 #include "mozilla/ClearOnShutdown.h"
 #include "mozilla/GpuDecoderModule.h"
 #include "mozilla/RemoteDecoderModule.h"
 #include "mozilla/SharedThreadPool.h"
 #include "mozilla/StaticPrefs.h"
 #include "mozilla/StaticPtr.h"
 #include "mozilla/SyncRunnable.h"
@@ -339,17 +340,18 @@ void PDMFactory::CreatePDMs() {
     m = CreateBlankDecoderModule();
     StartupPDM(m);
     // The Blank PDM SupportsMimeType reports true for all codecs; the creation
     // of its decoder is infallible. As such it will be used for all media, we
     // can stop creating more PDM from this point.
     return;
   }
 
-  if (StaticPrefs::MediaRddProcessEnabled()) {
+  if (StaticPrefs::MediaRddProcessEnabled()
+      && BrowserTabsRemoteAutostart()) {
     m = new RemoteDecoderModule;
     StartupPDM(m);
   }
 
 #ifdef XP_WIN
   if (StaticPrefs::MediaWmfEnabled() && !IsWin7AndPre2000Compatible()) {
     m = new WMFDecoderModule();
     RefPtr<PlatformDecoderModule> remote = new GpuDecoderModule(m);
--- a/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
+++ b/dom/media/platforms/agnostic/AgnosticDecoderModule.cpp
@@ -21,17 +21,18 @@
 namespace mozilla {
 
 bool AgnosticDecoderModule::SupportsMimeType(
     const nsACString& aMimeType, DecoderDoctorDiagnostics* aDiagnostics) const {
   bool supports =
       VPXDecoder::IsVPX(aMimeType) || OpusDataDecoder::IsOpus(aMimeType) ||
       WaveDataDecoder::IsWave(aMimeType) || TheoraDecoder::IsTheora(aMimeType);
   if (!StaticPrefs::MediaRddVorbisEnabled() ||
-      !StaticPrefs::MediaRddProcessEnabled()) {
+      !StaticPrefs::MediaRddProcessEnabled() ||
+      !BrowserTabsRemoteAutostart()) {
     supports |= VorbisDataDecoder::IsVorbis(aMimeType);
   }
 #ifdef MOZ_AV1
   // We remove support for decoding AV1 here if RDD is enabled so that
   // decoding on the content process doesn't accidentally happen in case
   // something goes wrong with launching the RDD process.
   if (StaticPrefs::MediaAv1Enabled() &&
       !StaticPrefs::MediaRddProcessEnabled()) {