Loading gfx/gl/SharedSurface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create( case layers::TextureType::DMABUF: #ifdef MOZ_WAYLAND if (gl.GetContextType() == GLContextType::EGL && widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return SurfaceFactory_DMABUF::Create(gl); } #endif Loading gfx/gl/SharedSurfaceDMABUF.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ Maybe<layers::SurfaceDescriptor> SharedSurface_DMABUF::ToSurfaceDescriptor() { /*static*/ UniquePtr<SurfaceFactory_DMABUF> SurfaceFactory_DMABUF::Create(GLContext& gl) { if (!widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { if (!widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return nullptr; } Loading @@ -100,7 +100,7 @@ UniquePtr<SurfaceFactory_DMABUF> SurfaceFactory_DMABUF::Create(GLContext& gl) { LOGDMABUF( ("SurfaceFactory_DMABUF::Create() failed, fallback to SW buffers.\n")); widget::GetDMABufDevice()->DisableDMABufWebGL(); widget::nsDMABufDevice::DisableDMABufWebGL(); return nullptr; } Loading gfx/layers/CanvasRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ TextureType TexTypeForWebgl(KnowsCompositor* const knowsCompositor) { #ifdef MOZ_WAYLAND if (kIsWayland) { if (!knowsCompositor->UsingSoftwareWebRender() && widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return TextureType::DMABUF; } } Loading gfx/layers/client/TextureClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ static TextureType GetTextureType(gfx::SurfaceFormat aFormat, #ifdef MOZ_WAYLAND if ((layersBackend == LayersBackend::LAYERS_WR && !aKnowsCompositor->UsingSoftwareWebRender()) && widget::GetDMABufDevice()->IsDMABufTexturesEnabled() && widget::nsDMABufDevice::IsDMABufTexturesEnabled() && aFormat != SurfaceFormat::A8) { return TextureType::DMABUF; } Loading widget/gtk/DMABufLibWrapper.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ using namespace mozilla::gfx; namespace mozilla { namespace widget { bool nsDMABufDevice::sUseWebGLDmabufBackend = true; #define GBMLIB_NAME "libgbm.so.1" #define DRMLIB_NAME "libdrm.so.2" Loading Loading @@ -138,10 +140,7 @@ bool nsDMABufDevice::IsEnabled(nsACString& aFailureId) { } nsDMABufDevice::nsDMABufDevice() : mUseWebGLDmabufBackend(true), mDRMFd(-1), mGbmDevice(nullptr), mInitialized(false) { : mDRMFd(-1), mGbmDevice(nullptr), mInitialized(false) { Configure(); } Loading Loading @@ -217,15 +216,15 @@ bool nsDMABufDevice::IsDMABufTexturesEnabled() { return false; } bool nsDMABufDevice::IsDMABufWebGLEnabled() { LOGDMABUF( ("nsDMABufDevice::IsDMABufWebGLEnabled: UseDMABuf %d " "mUseWebGLDmabufBackend %d " "sUseWebGLDmabufBackend %d " "widget_dmabuf_webgl_enabled %d\n", gfx::gfxVars::UseDMABuf(), mUseWebGLDmabufBackend, gfx::gfxVars::UseDMABuf(), sUseWebGLDmabufBackend, StaticPrefs::widget_dmabuf_webgl_enabled())); return gfx::gfxVars::UseDMABuf() && mUseWebGLDmabufBackend && return gfx::gfxVars::UseDMABuf() && sUseWebGLDmabufBackend && StaticPrefs::widget_dmabuf_webgl_enabled(); } void nsDMABufDevice::DisableDMABufWebGL() { mUseWebGLDmabufBackend = false; } void nsDMABufDevice::DisableDMABufWebGL() { sUseWebGLDmabufBackend = false; } // TODO: Make private or make sure it's configured nsDMABufDevice* GetDMABufDevice() { Loading Loading
gfx/gl/SharedSurface.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -100,7 +100,7 @@ UniquePtr<SurfaceFactory> SurfaceFactory::Create( case layers::TextureType::DMABUF: #ifdef MOZ_WAYLAND if (gl.GetContextType() == GLContextType::EGL && widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return SurfaceFactory_DMABUF::Create(gl); } #endif Loading
gfx/gl/SharedSurfaceDMABUF.cpp +2 −2 Original line number Diff line number Diff line Loading @@ -89,7 +89,7 @@ Maybe<layers::SurfaceDescriptor> SharedSurface_DMABUF::ToSurfaceDescriptor() { /*static*/ UniquePtr<SurfaceFactory_DMABUF> SurfaceFactory_DMABUF::Create(GLContext& gl) { if (!widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { if (!widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return nullptr; } Loading @@ -100,7 +100,7 @@ UniquePtr<SurfaceFactory_DMABUF> SurfaceFactory_DMABUF::Create(GLContext& gl) { LOGDMABUF( ("SurfaceFactory_DMABUF::Create() failed, fallback to SW buffers.\n")); widget::GetDMABufDevice()->DisableDMABufWebGL(); widget::nsDMABufDevice::DisableDMABufWebGL(); return nullptr; } Loading
gfx/layers/CanvasRenderer.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -113,7 +113,7 @@ TextureType TexTypeForWebgl(KnowsCompositor* const knowsCompositor) { #ifdef MOZ_WAYLAND if (kIsWayland) { if (!knowsCompositor->UsingSoftwareWebRender() && widget::GetDMABufDevice()->IsDMABufWebGLEnabled()) { widget::nsDMABufDevice::IsDMABufWebGLEnabled()) { return TextureType::DMABUF; } } Loading
gfx/layers/client/TextureClient.cpp +1 −1 Original line number Diff line number Diff line Loading @@ -275,7 +275,7 @@ static TextureType GetTextureType(gfx::SurfaceFormat aFormat, #ifdef MOZ_WAYLAND if ((layersBackend == LayersBackend::LAYERS_WR && !aKnowsCompositor->UsingSoftwareWebRender()) && widget::GetDMABufDevice()->IsDMABufTexturesEnabled() && widget::nsDMABufDevice::IsDMABufTexturesEnabled() && aFormat != SurfaceFormat::A8) { return TextureType::DMABUF; } Loading
widget/gtk/DMABufLibWrapper.cpp +7 −8 Original line number Diff line number Diff line Loading @@ -26,6 +26,8 @@ using namespace mozilla::gfx; namespace mozilla { namespace widget { bool nsDMABufDevice::sUseWebGLDmabufBackend = true; #define GBMLIB_NAME "libgbm.so.1" #define DRMLIB_NAME "libdrm.so.2" Loading Loading @@ -138,10 +140,7 @@ bool nsDMABufDevice::IsEnabled(nsACString& aFailureId) { } nsDMABufDevice::nsDMABufDevice() : mUseWebGLDmabufBackend(true), mDRMFd(-1), mGbmDevice(nullptr), mInitialized(false) { : mDRMFd(-1), mGbmDevice(nullptr), mInitialized(false) { Configure(); } Loading Loading @@ -217,15 +216,15 @@ bool nsDMABufDevice::IsDMABufTexturesEnabled() { return false; } bool nsDMABufDevice::IsDMABufWebGLEnabled() { LOGDMABUF( ("nsDMABufDevice::IsDMABufWebGLEnabled: UseDMABuf %d " "mUseWebGLDmabufBackend %d " "sUseWebGLDmabufBackend %d " "widget_dmabuf_webgl_enabled %d\n", gfx::gfxVars::UseDMABuf(), mUseWebGLDmabufBackend, gfx::gfxVars::UseDMABuf(), sUseWebGLDmabufBackend, StaticPrefs::widget_dmabuf_webgl_enabled())); return gfx::gfxVars::UseDMABuf() && mUseWebGLDmabufBackend && return gfx::gfxVars::UseDMABuf() && sUseWebGLDmabufBackend && StaticPrefs::widget_dmabuf_webgl_enabled(); } void nsDMABufDevice::DisableDMABufWebGL() { mUseWebGLDmabufBackend = false; } void nsDMABufDevice::DisableDMABufWebGL() { sUseWebGLDmabufBackend = false; } // TODO: Make private or make sure it's configured nsDMABufDevice* GetDMABufDevice() { Loading