diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build index 52a6bf99f..38f753074 100644 --- a/gfx/gl/moz.build +++ b/gfx/gl/moz.build @@ -35,7 +35,6 @@ EXPORTS += [ 'GLContextEGL.h', 'GLContextProvider.h', 'GLContextProviderImpl.h', - 'GLContextProviderX11.h', 'GLContextSymbols.h', 'GLContextTypes.h', 'GLDefs.h', @@ -58,8 +57,19 @@ EXPORTS += [ if CONFIG['MOZ_X11']: EXPORTS += [ 'GLContextGLX.h', + 'GLContextProviderX11.h', 'GLXLibrary.h', ] + # GLContextProviderX11.cpp falls back to GLX, so keep the GLX provider + # available on all X11 builds even when EGL is the preferred provider. + # GLContextProviderGLX.cpp must stay out of UNIFIED_SOURCES because it + # includes X11 headers that cause conflicts there. + SOURCES += [ + 'GLContextProviderGLX.cpp', + ] + UNIFIED_SOURCES += [ + 'GLContextProviderX11.cpp', + ] # Win32 is a special snowflake, for ANGLE if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': @@ -108,11 +118,8 @@ elif gl_provider == 'EAGL': 'GLContextEAGL.h', ] -elif gl_provider == 'GLX': - # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES - # as it includes X11 headers which cause conflicts. +if CONFIG['MOZ_X11'] and gl_provider == 'GLX': SOURCES += [ - 'GLContextProviderGLX.cpp', 'SharedSurfaceGLX.cpp' ] EXPORTS += [ @@ -128,7 +135,6 @@ UNIFIED_SOURCES += [ 'GLContext.cpp', 'GLContextFeatures.cpp', 'GLContextProviderEGL.cpp', - 'GLContextProviderX11.cpp', 'GLContextTypes.cpp', 'GLDebugUtils.cpp', 'GLLibraryEGL.cpp',