2016-07-14 19:16:42 +03:00
|
|
|
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-26 00:47:21 +04:00
|
|
|
# vim: set filetype=python:
|
|
|
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
|
|
# 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/.
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
gl_provider = "Null"
|
2020-10-26 21:34:53 +03:00
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
|
|
|
gl_provider = "WGL"
|
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
|
|
|
|
gl_provider = "CGL"
|
2015-09-29 01:09:56 +03:00
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
|
|
|
|
gl_provider = "EAGL"
|
2019-08-21 15:25:42 +03:00
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
|
2018-05-15 17:15:35 +03:00
|
|
|
if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]:
|
2013-04-24 01:54:15 +04:00
|
|
|
gl_provider = "EGL"
|
|
|
|
else:
|
|
|
|
gl_provider = "GLX"
|
|
|
|
elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
|
|
|
gl_provider = "EGL"
|
|
|
|
|
|
|
|
if CONFIG["MOZ_GL_PROVIDER"]:
|
|
|
|
gl_provider = CONFIG["MOZ_GL_PROVIDER"]
|
|
|
|
|
2013-04-16 23:24:43 +04:00
|
|
|
EXPORTS += [
|
2020-08-07 10:14:46 +03:00
|
|
|
"AndroidSurfaceTexture.h",
|
2013-11-29 00:57:19 +04:00
|
|
|
"DecomposeIntoNoRepeatTriangles.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"ForceDiscreteGPUHelperCGL.h",
|
2013-10-24 03:05:43 +04:00
|
|
|
"GfxTexturesReporter.h",
|
2014-07-08 22:52:00 +04:00
|
|
|
"GLBlitHelper.h",
|
2013-08-13 18:35:03 +04:00
|
|
|
"GLConsts.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"GLContext.h",
|
2014-01-08 00:02:18 +04:00
|
|
|
"GLContextEGL.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"GLContextProvider.h",
|
|
|
|
"GLContextProviderImpl.h",
|
|
|
|
"GLContextSymbols.h",
|
|
|
|
"GLContextTypes.h",
|
|
|
|
"GLDefs.h",
|
|
|
|
"GLLibraryEGL.h",
|
|
|
|
"GLLibraryLoader.h",
|
2014-01-02 19:17:22 +04:00
|
|
|
"GLReadTexImageHelper.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"GLScreenBuffer.h",
|
|
|
|
"GLTextureImage.h",
|
2013-08-13 18:35:03 +04:00
|
|
|
"GLTypes.h",
|
2013-12-03 22:44:38 +04:00
|
|
|
"GLUploadHelpers.h",
|
2014-05-09 05:03:37 +04:00
|
|
|
"HeapCopyOfStackArray.h",
|
2019-09-02 01:35:56 +03:00
|
|
|
"MozFramebuffer.h",
|
2013-11-26 07:25:25 +04:00
|
|
|
"ScopedGLHelpers.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
"SharedSurface.h",
|
|
|
|
"SharedSurfaceEGL.h",
|
|
|
|
"SharedSurfaceGL.h",
|
|
|
|
"SurfaceTypes.h",
|
|
|
|
]
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
# Win32 is a special snowflake, for ANGLE
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
|
|
|
|
EXPORTS += [
|
2014-01-08 00:02:18 +04:00
|
|
|
"GLContextWGL.h",
|
2014-06-19 04:04:05 +04:00
|
|
|
"SharedSurfaceANGLE.h", # Needs <windows.h> for `HANDLE`.
|
2015-11-06 03:19:24 +03:00
|
|
|
"SharedSurfaceD3D11Interop.h",
|
2013-05-17 02:37:18 +04:00
|
|
|
"WGLLibrary.h",
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
2013-11-20 01:54:09 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2017-07-18 05:17:41 +03:00
|
|
|
"GLBlitHelperD3D.cpp",
|
2015-09-24 22:21:05 +03:00
|
|
|
"GLContextProviderWGL.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
"SharedSurfaceANGLE.cpp",
|
2015-11-06 03:19:24 +03:00
|
|
|
"SharedSurfaceD3D11Interop.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2020-06-24 21:59:14 +03:00
|
|
|
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
|
|
|
|
EXPORTS += [
|
|
|
|
"AndroidNativeWindow.h",
|
2020-09-11 06:11:45 +03:00
|
|
|
"SharedSurfaceAndroidHardwareBuffer.h",
|
|
|
|
]
|
|
|
|
UNIFIED_SOURCES += [
|
|
|
|
"SharedSurfaceAndroidHardwareBuffer.cpp",
|
2020-06-24 21:59:14 +03:00
|
|
|
]
|
|
|
|
|
2013-04-24 01:54:15 +04:00
|
|
|
if gl_provider == "CGL":
|
2013-12-03 22:44:38 +04:00
|
|
|
# These files include Mac headers that are unfriendly to unified builds
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-12-03 22:44:38 +04:00
|
|
|
"GLContextProviderCGL.mm",
|
2013-07-01 20:32:40 +04:00
|
|
|
]
|
2013-07-18 07:24:15 +04:00
|
|
|
EXPORTS += [
|
2014-01-08 00:02:18 +04:00
|
|
|
"GLContextCGL.h",
|
2013-07-18 07:24:15 +04:00
|
|
|
"SharedSurfaceIO.h",
|
|
|
|
]
|
2013-11-20 01:54:09 +04:00
|
|
|
# SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
|
|
|
|
# which define Size and Point types in root namespace with often conflict with
|
|
|
|
# our own types. While I haven't actually hit this issue in the present case,
|
|
|
|
# it's been an issue in gfx/layers so let's not risk it.
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-07-18 07:24:15 +04:00
|
|
|
"SharedSurfaceIO.cpp",
|
|
|
|
]
|
2019-07-17 23:44:44 +03:00
|
|
|
OS_LIBS += [
|
|
|
|
"-framework IOSurface",
|
|
|
|
]
|
|
|
|
|
2015-09-29 01:09:56 +03:00
|
|
|
elif gl_provider == "EAGL":
|
|
|
|
# These files include ObjC headers that are unfriendly to unified builds
|
|
|
|
SOURCES += [
|
|
|
|
"GLContextProviderEAGL.mm",
|
|
|
|
]
|
|
|
|
EXPORTS += [
|
|
|
|
"GLContextEAGL.h",
|
|
|
|
]
|
|
|
|
|
2013-11-20 01:54:09 +04:00
|
|
|
elif gl_provider == "GLX":
|
|
|
|
# GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
|
|
|
|
# as it includes X11 headers which cause conflicts.
|
2013-10-25 03:23:05 +04:00
|
|
|
SOURCES += [
|
2013-11-20 01:54:09 +04:00
|
|
|
"GLContextProviderGLX.cpp",
|
2020-07-02 16:50:41 +03:00
|
|
|
"GLContextProviderX11.cpp",
|
2015-07-30 19:40:56 +03:00
|
|
|
"SharedSurfaceGLX.cpp",
|
2013-11-20 01:54:09 +04:00
|
|
|
]
|
2015-07-30 19:40:56 +03:00
|
|
|
EXPORTS += ["GLContextGLX.h", "GLXLibrary.h", "SharedSurfaceGLX.h"]
|
2013-04-24 01:54:15 +04:00
|
|
|
|
2018-05-15 17:15:35 +03:00
|
|
|
if CONFIG["MOZ_WAYLAND"]:
|
|
|
|
SOURCES += ["GLContextProviderWayland.cpp", "SharedSurfaceDMABUF.cpp"]
|
|
|
|
|
2013-11-20 01:54:09 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2020-08-07 10:14:46 +03:00
|
|
|
"AndroidSurfaceTexture.cpp",
|
2013-11-29 00:57:19 +04:00
|
|
|
"DecomposeIntoNoRepeatTriangles.cpp",
|
2013-10-24 03:05:43 +04:00
|
|
|
"GfxTexturesReporter.cpp",
|
2013-11-29 00:57:19 +04:00
|
|
|
"GLBlitHelper.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
"GLContext.cpp",
|
2013-08-22 21:42:05 +04:00
|
|
|
"GLContextFeatures.cpp",
|
2015-09-24 22:21:05 +03:00
|
|
|
"GLContextProviderEGL.cpp",
|
2014-01-22 13:21:19 +04:00
|
|
|
"GLDebugUtils.cpp",
|
2013-10-24 03:00:23 +04:00
|
|
|
"GLLibraryEGL.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
"GLLibraryLoader.cpp",
|
2014-01-02 19:17:22 +04:00
|
|
|
"GLReadTexImageHelper.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
"GLTextureImage.cpp",
|
2013-12-03 22:44:38 +04:00
|
|
|
"GLUploadHelpers.cpp",
|
2017-12-19 05:19:38 +03:00
|
|
|
"MozFramebuffer.cpp",
|
2013-11-26 07:25:25 +04:00
|
|
|
"ScopedGLHelpers.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
"SharedSurface.cpp",
|
|
|
|
"SharedSurfaceEGL.cpp",
|
|
|
|
"SharedSurfaceGL.cpp",
|
2013-10-24 03:00:23 +04:00
|
|
|
"TextureImageEGL.cpp",
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
2020-01-09 01:19:23 +03:00
|
|
|
SOURCES += [
|
|
|
|
"GLScreenBuffer.cpp",
|
|
|
|
]
|
2013-04-24 01:54:15 +04:00
|
|
|
|
2013-10-02 21:17:55 +04:00
|
|
|
include("/ipc/chromium/chromium-config.mozbuild")
|
|
|
|
|
2013-11-19 06:47:14 +04:00
|
|
|
FINAL_LIBRARY = "xul"
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2014-05-03 02:31:05 +04:00
|
|
|
if CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]:
|
|
|
|
DEFINES["MOZ_D3DCOMPILER_VISTA_DLL"] = CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]
|
2013-11-27 17:55:07 +04:00
|
|
|
|
2014-07-24 19:55:33 +04:00
|
|
|
CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
|
|
|
|
CXXFLAGS += CONFIG["TK_CFLAGS"]
|
|
|
|
CFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
|
|
|
|
CFLAGS += CONFIG["TK_CFLAGS"]
|
2015-02-23 20:46:55 +03:00
|
|
|
|
2021-03-19 03:58:23 +03:00
|
|
|
CXXFLAGS += ["-Werror=switch"]
|
|
|
|
|
2019-07-01 09:38:32 +03:00
|
|
|
if CONFIG["MOZ_WAYLAND"]:
|
|
|
|
CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
|
|
|
|
CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
|
|
|
|
|
2015-07-30 19:05:22 +03:00
|
|
|
LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
|
|
|
|
|
2017-12-08 00:09:15 +03:00
|
|
|
if CONFIG["CC_TYPE"] in ("clang", "gcc"):
|
2016-05-11 10:00:01 +03:00
|
|
|
CXXFLAGS += ["-Wno-error=shadow"]
|