зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1776724 - fix wayland-only build r=jgilbert
Differential Revision: https://phabricator.services.mozilla.com/D150485
This commit is contained in:
Родитель
2ac354b5ee
Коммит
d08627e1b0
|
@ -79,6 +79,7 @@
|
|||
# if defined(MOZ_WAYLAND)
|
||||
# include <gdk/gdkwayland.h>
|
||||
# include <wayland-egl.h>
|
||||
# include "mozilla/WidgetUtilsGtk.h"
|
||||
# include "mozilla/widget/nsWaylandDisplay.h"
|
||||
# endif
|
||||
#endif
|
||||
|
|
|
@ -13,7 +13,9 @@ namespace mozilla::gl {
|
|||
using namespace mozilla::gfx;
|
||||
using namespace mozilla::widget;
|
||||
|
||||
#ifdef MOZ_X11
|
||||
static class GLContextProviderGLX sGLContextProviderGLX;
|
||||
#endif
|
||||
static class GLContextProviderEGL sGLContextProviderEGL;
|
||||
|
||||
already_AddRefed<GLContext> GLContextProviderLinux::CreateForCompositorWidget(
|
||||
|
@ -22,9 +24,11 @@ already_AddRefed<GLContext> GLContextProviderLinux::CreateForCompositorWidget(
|
|||
if (gfxVars::UseEGL()) {
|
||||
return sGLContextProviderEGL.CreateForCompositorWidget(
|
||||
aCompositorWidget, aHardwareWebRender, aForceAccelerated);
|
||||
#ifdef MOZ_X11
|
||||
} else {
|
||||
return sGLContextProviderGLX.CreateForCompositorWidget(
|
||||
aCompositorWidget, aHardwareWebRender, aForceAccelerated);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -33,8 +37,10 @@ already_AddRefed<GLContext> GLContextProviderLinux::CreateHeadless(
|
|||
const GLContextCreateDesc& desc, nsACString* const out_failureId) {
|
||||
if (gfxVars::UseEGL()) {
|
||||
return sGLContextProviderEGL.CreateHeadless(desc, out_failureId);
|
||||
#ifdef MOZ_X11
|
||||
} else {
|
||||
return sGLContextProviderGLX.CreateHeadless(desc, out_failureId);
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -42,8 +48,10 @@ already_AddRefed<GLContext> GLContextProviderLinux::CreateHeadless(
|
|||
GLContext* GLContextProviderLinux::GetGlobalContext() {
|
||||
if (gfxVars::UseEGL()) {
|
||||
return sGLContextProviderEGL.GetGlobalContext();
|
||||
#ifdef MOZ_X11
|
||||
} else {
|
||||
return sGLContextProviderGLX.GetGlobalContext();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -51,8 +59,10 @@ GLContext* GLContextProviderLinux::GetGlobalContext() {
|
|||
void GLContextProviderLinux::Shutdown() {
|
||||
if (gfxVars::UseEGL()) {
|
||||
sGLContextProviderEGL.Shutdown();
|
||||
#ifdef MOZ_X11
|
||||
} else {
|
||||
sGLContextProviderGLX.Shutdown();
|
||||
#endif
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -107,10 +107,11 @@ elif gl_provider == "Linux":
|
|||
# GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
|
||||
# as it includes X11 headers which cause conflicts.
|
||||
SOURCES += [
|
||||
"GLContextProviderGLX.cpp",
|
||||
"GLContextProviderLinux.cpp",
|
||||
]
|
||||
EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
|
||||
if CONFIG["MOZ_X11"]:
|
||||
SOURCES += ["GLContextProviderGLX.cpp"]
|
||||
|
||||
if CONFIG["MOZ_WAYLAND"]:
|
||||
SOURCES += ["SharedSurfaceDMABUF.cpp"]
|
||||
|
|
|
@ -989,7 +989,7 @@ gfxPlatformGtk::CreateGlobalHardwareVsyncSource() {
|
|||
RefPtr<VsyncSource> softwareVsync = new XrandrSoftwareVsyncSource();
|
||||
return softwareVsync.forget();
|
||||
#else
|
||||
return CreateSoftwareVsyncSource();
|
||||
return GetSoftwareVsyncSource();
|
||||
#endif
|
||||
}
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче