зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1773282 [Linux] Remove IsDMABufVAAPIEnabled() r=emilio,media-playback-reviewers,alwu
We don't need IsDMABufVAAPIEnabled() as we use gfx::gfxVars::CanUseHardwareVideoDecoding() directly. Differential Revision: https://phabricator.services.mozilla.com/D149764
This commit is contained in:
Родитель
59dfb5f41a
Коммит
447c0b7acc
|
@ -12,6 +12,7 @@
|
|||
#include "PlatformDecoderModule.h"
|
||||
#include "prlink.h"
|
||||
#ifdef MOZ_WAYLAND
|
||||
# include "mozilla/gfx/gfxVars.h"
|
||||
# include "mozilla/widget/DMABufLibWrapper.h"
|
||||
#endif
|
||||
|
||||
|
@ -284,7 +285,7 @@ void FFmpegLibWrapper::Unlink() {
|
|||
|
||||
#ifdef MOZ_WAYLAND
|
||||
void FFmpegLibWrapper::LinkVAAPILibs() {
|
||||
if (!widget::GetDMABufDevice()->IsDMABufVAAPIEnabled()) {
|
||||
if (!gfx::gfxVars::CanUseHardwareVideoDecoding() || !XRE_IsRDDProcess()) {
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -368,10 +368,9 @@ void FFmpegVideoDecoder<LIBAV_VER>::InitHWDecodingPrefs() {
|
|||
FFMPEG_LOG("Hardware WebRender is off, VAAPI is disabled");
|
||||
return;
|
||||
}
|
||||
|
||||
if (!widget::GetDMABufDevice()->IsDMABufVAAPIEnabled()) {
|
||||
if (!XRE_IsRDDProcess()) {
|
||||
mEnableHardwareDecoding = false;
|
||||
FFMPEG_LOG("VA-API is disabled by preference.");
|
||||
FFMPEG_LOG("VA-API works in RDD process only");
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -269,16 +269,6 @@ bool nsDMABufDevice::IsDMABufTexturesEnabled() {
|
|||
#else
|
||||
bool nsDMABufDevice::IsDMABufTexturesEnabled() { return false; }
|
||||
#endif
|
||||
bool nsDMABufDevice::IsDMABufVAAPIEnabled() {
|
||||
LOGDMABUF(
|
||||
("nsDMABufDevice::IsDMABufVAAPIEnabled: EGL %d "
|
||||
"media_ffmpeg_vaapi_enabled %d CanUseHardwareVideoDecoding %d "
|
||||
"XRE_IsRDDProcess %d\n",
|
||||
gfx::gfxVars::UseEGL(), StaticPrefs::media_ffmpeg_vaapi_enabled(),
|
||||
gfx::gfxVars::CanUseHardwareVideoDecoding(), XRE_IsRDDProcess()));
|
||||
return gfx::gfxVars::UseVAAPI() && XRE_IsRDDProcess() &&
|
||||
gfx::gfxVars::CanUseHardwareVideoDecoding();
|
||||
}
|
||||
bool nsDMABufDevice::IsDMABufWebGLEnabled() {
|
||||
LOGDMABUF(
|
||||
("nsDMABufDevice::IsDMABufWebGLEnabled: UseDMABuf %d "
|
||||
|
|
|
@ -190,8 +190,6 @@ class nsDMABufDevice {
|
|||
|
||||
// Use dmabuf for WebRender general web content
|
||||
bool IsDMABufTexturesEnabled();
|
||||
// Use dmabuf for VA-API video playback
|
||||
bool IsDMABufVAAPIEnabled();
|
||||
// Use dmabuf for WebGL content
|
||||
bool IsDMABufWebGLEnabled();
|
||||
void DisableDMABufWebGL();
|
||||
|
|
Загрузка…
Ссылка в новой задаче