summaryrefslogtreecommitdiff
path: root/gfx/gl/moz.build
diff options
context:
space:
mode:
authorBrian Smith <brian@dbsoft.org>2022-04-26 09:38:50 -0500
committerBrian Smith <brian@dbsoft.org>2022-04-26 10:19:02 -0500
commitadf51bc0f5eb9b924e52c11bb184f6a4d2c5534a (patch)
tree797a081cc0bb717a8a83a7c508b9265dec244217 /gfx/gl/moz.build
parent378738aaa9924d0b95e2c57f27cbad2b2e644282 (diff)
downloaduxp-adf51bc0f5eb9b924e52c11bb184f6a4d2c5534a.tar.gz
Issue #1829 - Revert "Issue #1751 -- Remove cocoa and uikit gfx and hal support code"
This reverts commit 1ee35eafa043142293f3d42317c1eee490d00375.
Diffstat (limited to 'gfx/gl/moz.build')
-rw-r--r--gfx/gl/moz.build32
1 files changed, 31 insertions, 1 deletions
diff --git a/gfx/gl/moz.build b/gfx/gl/moz.build
index 7bf5a4ab04..c490400cbf 100644
--- a/gfx/gl/moz.build
+++ b/gfx/gl/moz.build
@@ -7,6 +7,10 @@ gl_provider = 'Null'
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
gl_provider = 'WGL'
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
+ gl_provider = 'CGL'
+elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
+ gl_provider = 'EAGL'
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
gl_provider = 'EGL'
@@ -19,6 +23,7 @@ if CONFIG['MOZ_GL_PROVIDER']:
EXPORTS += [
'DecomposeIntoNoRepeatTriangles.h',
'EGLUtils.h',
+ 'ForceDiscreteGPUHelperCGL.h',
'GfxTexturesReporter.h',
'GLBlitHelper.h',
'GLConsts.h',
@@ -73,7 +78,32 @@ if CONFIG['MOZ_ENABLE_SKIA_GPU']:
# Suppress warnings from Skia header files.
SOURCES['SkiaGLGlue.cpp'].flags += ['-Wno-implicit-fallthrough']
-if gl_provider == 'GLX':
+if gl_provider == 'CGL':
+ # These files include Mac headers that are unfriendly to unified builds
+ SOURCES += [
+ "GLContextProviderCGL.mm",
+ ]
+ EXPORTS += [
+ 'GLContextCGL.h',
+ 'SharedSurfaceIO.h',
+ ]
+ # 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.
+ SOURCES += [
+ 'SharedSurfaceIO.cpp',
+ ]
+elif gl_provider == 'EAGL':
+ # These files include ObjC headers that are unfriendly to unified builds
+ SOURCES += [
+ 'GLContextProviderEAGL.mm',
+ ]
+ EXPORTS += [
+ 'GLContextEAGL.h',
+ ]
+
+elif gl_provider == 'GLX':
# GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
# as it includes X11 headers which cause conflicts.
SOURCES += [