Bug 1518344 - P4. Don't attempt to use the RDD process if we failed to start it earlier. r=mjf,bryce,padenot

Now that launching the RDD process is fully asynchronous and no longer block the parent main thread, we can enable it on all platforms.

If we did fail to start it, we will not attempt again unless on Nightly.

Re-enable the RDD on Windows for ARM seeing that even if it did fail, it won't inconvenience the user anymore (other than the first video/audio element will take longer than usual to start)

Differential Revision: https://phabricator.services.mozilla.com/D96669
This commit is contained in:
Jean-Yves Avenard 2020-11-16 17:42:55 +00:00
Родитель 5318ef7bab
Коммит 0e897d1e55
2 изменённых файлов: 15 добавлений и 5 удалений

Просмотреть файл

@ -126,6 +126,12 @@ auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
});
}
if (mNumProcessAttempts &&
!StaticPrefs::media_rdd_retryonfailure_enabled()) {
// We failed to start the RDD process earlier, abort now.
return EnsureRDDPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,
__func__);
}
// Launch the RDD process.
std::vector<std::string> extraArgs;
nsCString parentBuildID(mozilla::PlatformBuildID());
@ -161,13 +167,16 @@ auto RDDProcessManager::EnsureRDDProcessAndCreateBridge(
if (!CreateVideoBridge() ||
!CreateContentBridge(aOtherProcess, &endpoint)) {
mNumProcessAttempts++;
return EnsureRDDPromise::CreateAndReject(NS_ERROR_NOT_AVAILABLE,
__func__);
}
mNumProcessAttempts = 0;
return EnsureRDDPromise::CreateAndResolve(std::move(endpoint),
__func__);
},
[this](nsresult aError) {
mNumProcessAttempts++;
DestroyProcess();
return EnsureRDDPromise::CreateAndReject(aError, __func__);
});

Просмотреть файл

@ -4723,7 +4723,7 @@
# Whether to use the D3D11 RenderCompositor when using WebRender software backend
- name: gfx.webrender.software.d3d11
type: bool
value: true
value: true
mirror: once
# Use vsync events generated by hardware
@ -7171,11 +7171,7 @@
- name: media.rdd-process.enabled
type: RelaxedAtomicBool
#if defined(XP_WIN)
#if defined(_ARM64_)
value: false
#else
value: true
#endif
#elif defined(XP_MACOSX)
value: true
#elif defined(XP_LINUX) && !defined(ANDROID)
@ -7185,6 +7181,11 @@
#endif
mirror: always
- name: media.rdd-retryonfailure.enabled
type: RelaxedAtomicBool
value: @IS_NIGHTLY_BUILD@
mirror: always
- name: media.rdd-process.startup_timeout_ms
type: RelaxedAtomicInt32
value: 5000