Bug 1551855 - Add a dedicated pref for enabling GraphRunner. r=karlt
authorAndreas Pehrson <apehrson@mozilla.com>
Thu, 16 May 2019 06:10:54 +0000
changeset 535960 7908eb064b0c211e6e40b70f4313b12a1487d741
parent 535959 7f053480beaab8263f4ac6a7fd740d9eaaa5ee5a
child 535961 2a9a034e1b6a38cba33ba668704cce7ad7a04cd3
push id2082
push userffxbld-merge
push dateMon, 01 Jul 2019 08:34:18 +0000
treeherdermozilla-release@2fb19d0466d2 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerskarlt
bugs1551855
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 1551855 - Add a dedicated pref for enabling GraphRunner. r=karlt Differential Revision: https://phabricator.services.mozilla.com/D31262
dom/media/MediaStreamGraph.cpp
modules/libpref/init/all.js
--- a/dom/media/MediaStreamGraph.cpp
+++ b/dom/media/MediaStreamGraph.cpp
@@ -3305,17 +3305,19 @@ MediaStreamGraph* MediaStreamGraph::GetI
           aWindow->AsGlobal()->AbstractMainThreadFor(TaskCategory::Other);
     } else {
       // Uncommon case, only for some old configuration of webspeech.
       mainThread = AbstractThread::MainThread();
     }
 
     GraphRunType runType = DIRECT_DRIVER;
     if (aGraphDriverRequested != OFFLINE_THREAD_DRIVER &&
-        Preferences::GetBool("dom.audioworklet.enabled", false)) {
+        (Preferences::GetBool("dom.audioworklet.enabled", false) ||
+         Preferences::GetBool("media.audiograph.single_thread.enabled",
+                              false))) {
       runType = SINGLE_THREAD;
     }
 
     // In a real time graph, the number of output channels is determined by
     // the underlying number of channel of the default audio output device, and
     // capped to 8.
     uint32_t channelCount =
         std::min<uint32_t>(8, CubebUtils::MaxNumberOfChannels());
--- a/modules/libpref/init/all.js
+++ b/modules/libpref/init/all.js
@@ -618,16 +618,19 @@ pref("media.cubeb.logging_level", "");
 pref("media.cubeb.sandbox", true);
 pref("media.audioipc.pool_size", 2);
 // 64 * 4 kB stack per pool thread.
 pref("media.audioipc.stack_size", 262144);
 #else
 pref("media.cubeb.sandbox", false);
 #endif
 
+// GraphRunner (fixed MediaStreamGraph thread) control
+pref("media.audiograph.single_thread.enabled", false);
+
 #ifdef MOZ_AV1
 #if defined(XP_WIN) && !defined(_ARM64_)
 pref("media.av1.enabled", true);
 pref("media.av1.use-dav1d", true);
 #elif defined(XP_MACOSX)
 pref("media.av1.enabled", true);
 pref("media.av1.use-dav1d", true);
 #elif defined(XP_UNIX) && !defined(MOZ_WIDGET_ANDROID)