Bug 1661450 - 5/8 Fix build system to handle undefined MOZ_X11 r=stransky

Force usage of EGL when building for wayland only.

Enable build component that get disabled by undefined MOZ_X11 but are required
for MOZ_WAYLAND.

Depends on D139530

Differential Revision: https://phabricator.services.mozilla.com/D139531
This commit is contained in:
ganguin 2022-04-20 09:32:08 +00:00
Родитель 882971ce56
Коммит 9396739e3c
6 изменённых файлов: 26 добавлений и 16 удалений

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

@ -29,3 +29,6 @@ DEFINES['__NDK_FPABI__'] = ''
DEFINES['ANGLE_SKIP_DXGI_1_2_CHECK'] = True
DEFINES['ANGLE_ENABLE_KEYEDMUTEX'] = True
DEFINES['ANGLE_TRANSLATOR_ESSL_ONLY'] = True
if CONFIG["MOZ_WAYLAND"]:
CXXFLAGS += [ "-DWL_EGL_PLATFORM" ]

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

@ -13,10 +13,10 @@ elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
gl_provider = "EAGL"
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]:
gl_provider = "EGL"
else:
if CONFIG["MOZ_X11"]:
gl_provider = "GLX"
else:
gl_provider = "EGL"
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
gl_provider = "EGL"
@ -117,7 +117,10 @@ elif gl_provider == "GLX":
EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
if CONFIG["MOZ_WAYLAND"]:
SOURCES += ["GLContextProviderWayland.cpp", "SharedSurfaceDMABUF.cpp"]
SOURCES += ["SharedSurfaceDMABUF.cpp"]
if CONFIG["MOZ_WAYLAND"] and CONFIG["MOZ_X11"]:
SOURCES += ["GLContextProviderWayland.cpp"]
UNIFIED_SOURCES += [
"AndroidSurfaceTexture.cpp",

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

@ -4,7 +4,7 @@
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
Program("screentopng")
SOURCES += [
"gdk-screenshot.cpp",

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

@ -156,7 +156,7 @@ SOURCES += [
"ProfileReset.cpp",
]
if CONFIG["MOZ_X11"]:
if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
UNIFIED_SOURCES += [
"glxtest.cpp",
]
@ -187,7 +187,7 @@ include("/ipc/chromium/chromium-config.mozbuild")
FINAL_LIBRARY = "xul"
if CONFIG["MOZ_X11"]:
if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
DEFINES["USE_GLX_TEST"] = True
for var in (

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

@ -113,17 +113,12 @@ if CONFIG["MOZ_WAYLAND"]:
"mozva",
]
if CONFIG["MOZ_X11"]:
if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
UNIFIED_SOURCES += [
"CompositorWidgetChild.cpp",
"CompositorWidgetParent.cpp",
"InProcessGtkCompositorWidget.cpp",
"nsClipboardX11.cpp",
"nsShmImage.cpp",
"nsUserIdleServiceGTK.cpp",
"WindowSurfaceX11.cpp",
"WindowSurfaceX11Image.cpp",
"WindowSurfaceX11SHM.cpp",
]
EXPORTS.mozilla.widget += [
"CompositorWidgetChild.h",
@ -132,6 +127,15 @@ if CONFIG["MOZ_X11"]:
"InProcessGtkCompositorWidget.h",
]
if CONFIG["MOZ_X11"]:
UNIFIED_SOURCES += [
"nsClipboardX11.cpp",
"nsShmImage.cpp",
"WindowSurfaceX11.cpp",
"WindowSurfaceX11Image.cpp",
"WindowSurfaceX11SHM.cpp",
]
if CONFIG["NS_PRINTING"]:
UNIFIED_SOURCES += [
"nsDeviceContextSpecG.cpp",
@ -159,7 +163,7 @@ LOCAL_INCLUDES += [
"/widget/headless",
]
if CONFIG["MOZ_X11"]:
if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
LOCAL_INCLUDES += [
"/widget/x11",
]

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

@ -295,7 +295,7 @@ if CONFIG["MOZ_INSTRUMENT_EVENT_LOOP"]:
EXPORTS.ipc = ["nsGUIEventIPC.h"]
if CONFIG["MOZ_X11"]:
if CONFIG["MOZ_X11"] or CONFIG["MOZ_WAYLAND"]:
DIRS += ["x11"]
if toolkit in ("cocoa", "windows"):
@ -342,7 +342,7 @@ if toolkit == "windows":
"windows/PCompositorWidget.ipdl",
"windows/PlatformWidgetTypes.ipdlh",
]
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk" and CONFIG["MOZ_X11"]:
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
IPDL_SOURCES = [
"gtk/PCompositorWidget.ipdl",
"gtk/PlatformWidgetTypes.ipdlh",