2013-04-01 18:36:59 +00:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 20:47:21 +00: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-23 21:54:15 +00:00
|
|
|
gl_provider = 'Null'
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
gl_provider = 'WGL'
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
gl_provider = 'CGL'
|
2015-09-28 22:09:56 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'uikit':
|
|
|
|
gl_provider = 'EAGL'
|
2016-03-16 05:06:26 +00:00
|
|
|
elif 'gtk' in CONFIG['MOZ_WIDGET_TOOLKIT']:
|
2013-08-25 23:56:53 +00:00
|
|
|
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
|
2013-04-23 21:54:15 +00:00
|
|
|
gl_provider = 'EGL'
|
|
|
|
else:
|
|
|
|
gl_provider = 'GLX'
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
|
|
|
|
gl_provider = 'EGL'
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
gl_provider = 'EGL'
|
|
|
|
|
|
|
|
if CONFIG['MOZ_GL_PROVIDER']:
|
|
|
|
gl_provider = CONFIG['MOZ_GL_PROVIDER']
|
|
|
|
|
2013-04-16 19:24:43 +00:00
|
|
|
EXPORTS += [
|
2014-10-21 13:53:00 +00:00
|
|
|
'AndroidNativeWindow.h',
|
2014-10-21 13:53:00 +00:00
|
|
|
'AndroidSurfaceTexture.h',
|
2013-11-28 20:57:19 +00:00
|
|
|
'DecomposeIntoNoRepeatTriangles.h',
|
2014-09-17 13:13:29 +00:00
|
|
|
'EGLUtils.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'ForceDiscreteGPUHelperCGL.h',
|
2013-10-23 23:05:43 +00:00
|
|
|
'GfxTexturesReporter.h',
|
2014-07-08 18:52:00 +00:00
|
|
|
'GLBlitHelper.h',
|
2013-08-13 14:35:03 +00:00
|
|
|
'GLConsts.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'GLContext.h',
|
2014-01-07 20:02:18 +00:00
|
|
|
'GLContextEGL.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'GLContextProvider.h',
|
|
|
|
'GLContextProviderImpl.h',
|
|
|
|
'GLContextSymbols.h',
|
|
|
|
'GLContextTypes.h',
|
|
|
|
'GLDefs.h',
|
|
|
|
'GLLibraryEGL.h',
|
|
|
|
'GLLibraryLoader.h',
|
2014-01-02 15:17:22 +00:00
|
|
|
'GLReadTexImageHelper.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'GLScreenBuffer.h',
|
|
|
|
'GLTextureImage.h',
|
2013-08-13 14:35:03 +00:00
|
|
|
'GLTypes.h',
|
2013-12-03 18:44:38 +00:00
|
|
|
'GLUploadHelpers.h',
|
2014-05-09 01:03:37 +00:00
|
|
|
'HeapCopyOfStackArray.h',
|
2013-11-26 03:25:25 +00:00
|
|
|
'ScopedGLHelpers.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
'SharedSurface.h',
|
|
|
|
'SharedSurfaceEGL.h',
|
|
|
|
'SharedSurfaceGL.h',
|
|
|
|
'SurfaceTypes.h',
|
2013-09-07 02:13:37 +00:00
|
|
|
'TextureGarbageBin.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2014-01-07 20:02:18 +00:00
|
|
|
EXPORTS += [
|
|
|
|
'GLContextGLX.h',
|
|
|
|
'GLXLibrary.h',
|
|
|
|
]
|
2013-04-23 21:54:15 +00:00
|
|
|
|
|
|
|
# Win32 is a special snowflake, for ANGLE
|
2013-04-16 19:24:43 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
EXPORTS += [
|
2014-01-07 20:02:18 +00:00
|
|
|
'GLContextWGL.h',
|
2014-06-19 00:04:05 +00:00
|
|
|
'SharedSurfaceANGLE.h', # Needs <windows.h> for `HANDLE`.
|
2015-11-06 00:19:24 +00:00
|
|
|
'SharedSurfaceD3D11Interop.h',
|
2013-05-16 22:37:18 +00:00
|
|
|
'WGLLibrary.h',
|
2013-04-16 19:24:43 +00:00
|
|
|
]
|
2013-11-19 21:54:09 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2015-09-24 19:21:05 +00:00
|
|
|
'GLContextProviderWGL.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'SharedSurfaceANGLE.cpp',
|
2015-11-06 00:19:24 +00:00
|
|
|
'SharedSurfaceD3D11Interop.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2013-04-16 19:24:43 +00:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
|
2014-03-05 21:49:37 +00:00
|
|
|
EXPORTS += ['SkiaGLGlue.h']
|
2016-01-08 08:43:58 +00:00
|
|
|
SOURCES += [
|
2014-03-05 21:49:37 +00:00
|
|
|
'SkiaGLGlue.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
2016-01-08 08:43:58 +00:00
|
|
|
if CONFIG['CLANG_CXX']:
|
|
|
|
# Suppress warnings from Skia header files.
|
|
|
|
SOURCES['SkiaGLGlue.cpp'].flags += ['-Wno-implicit-fallthrough']
|
2013-04-23 21:54:15 +00:00
|
|
|
|
2013-05-27 14:12:13 +00:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
2013-11-19 21:54:09 +00:00
|
|
|
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
|
2013-05-27 14:12:13 +00:00
|
|
|
EXPORTS += ['SharedSurfaceGralloc.h']
|
2013-11-28 14:10:38 +00:00
|
|
|
LOCAL_INCLUDES += ['/widget/gonk']
|
2015-11-04 05:28:42 +00:00
|
|
|
LOCAL_INCLUDES += ['%' + '%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
|
2013-05-27 14:12:13 +00:00
|
|
|
|
2013-04-23 21:54:15 +00:00
|
|
|
if gl_provider == 'CGL':
|
2013-12-03 18:44:38 +00:00
|
|
|
# These files include Mac headers that are unfriendly to unified builds
|
2013-10-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-12-03 18:44:38 +00:00
|
|
|
"GLContextProviderCGL.mm",
|
|
|
|
"TextureImageCGL.mm"
|
2013-07-01 16:32:40 +00:00
|
|
|
]
|
2013-07-18 03:24:15 +00:00
|
|
|
EXPORTS += [
|
2014-01-07 20:02:18 +00:00
|
|
|
'GLContextCGL.h',
|
2013-07-18 03:24:15 +00:00
|
|
|
'SharedSurfaceIO.h',
|
|
|
|
]
|
2013-11-19 21:54:09 +00: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-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-07-18 03:24:15 +00:00
|
|
|
'SharedSurfaceIO.cpp',
|
|
|
|
]
|
2015-09-28 22:09:56 +00:00
|
|
|
elif gl_provider == 'EAGL':
|
|
|
|
# These files include ObjC headers that are unfriendly to unified builds
|
|
|
|
SOURCES += [
|
|
|
|
'GLContextProviderEAGL.mm',
|
|
|
|
]
|
|
|
|
EXPORTS += [
|
|
|
|
'GLContextEAGL.h',
|
|
|
|
]
|
|
|
|
|
2013-11-19 21:54:09 +00: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-24 23:23:05 +00:00
|
|
|
SOURCES += [
|
2013-11-19 21:54:09 +00:00
|
|
|
'GLContextProviderGLX.cpp',
|
2015-07-30 16:40:56 +00:00
|
|
|
'SharedSurfaceGLX.cpp'
|
|
|
|
]
|
|
|
|
EXPORTS += [
|
|
|
|
'SharedSurfaceGLX.h'
|
2013-11-19 21:54:09 +00:00
|
|
|
]
|
2013-04-23 21:54:15 +00:00
|
|
|
|
2013-11-19 21:54:09 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2014-10-21 13:53:00 +00:00
|
|
|
'AndroidNativeWindow.cpp',
|
2014-10-21 13:53:00 +00:00
|
|
|
'AndroidSurfaceTexture.cpp',
|
2013-11-28 20:57:19 +00:00
|
|
|
'DecomposeIntoNoRepeatTriangles.cpp',
|
2014-09-17 13:13:29 +00:00
|
|
|
'EGLUtils.cpp',
|
2013-10-23 23:05:43 +00:00
|
|
|
'GfxTexturesReporter.cpp',
|
2013-11-28 20:57:19 +00:00
|
|
|
'GLBlitHelper.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLContext.cpp',
|
2013-08-22 17:42:05 +00:00
|
|
|
'GLContextFeatures.cpp',
|
2015-09-24 19:21:05 +00:00
|
|
|
'GLContextProviderEGL.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLContextTypes.cpp',
|
2014-01-22 09:21:19 +00:00
|
|
|
'GLDebugUtils.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'GLLibraryEGL.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLLibraryLoader.cpp',
|
2014-01-02 15:17:22 +00:00
|
|
|
'GLReadTexImageHelper.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLScreenBuffer.cpp',
|
|
|
|
'GLTextureImage.cpp',
|
2013-12-03 18:44:38 +00:00
|
|
|
'GLUploadHelpers.cpp',
|
2013-11-26 03:25:25 +00:00
|
|
|
'ScopedGLHelpers.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
'SharedSurface.cpp',
|
|
|
|
'SharedSurfaceEGL.cpp',
|
|
|
|
'SharedSurfaceGL.cpp',
|
2013-12-03 18:44:38 +00:00
|
|
|
'SurfaceTypes.cpp',
|
2013-09-07 02:13:37 +00:00
|
|
|
'TextureGarbageBin.cpp',
|
2013-10-23 23:00:23 +00:00
|
|
|
'TextureImageEGL.cpp',
|
2013-04-23 21:54:15 +00:00
|
|
|
]
|
|
|
|
|
2013-10-02 17:17:55 +00:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-19 02:47:14 +00:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 13:55:07 +00:00
|
|
|
|
2014-05-02 22:31:05 +00:00
|
|
|
if CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']:
|
|
|
|
DEFINES['MOZ_D3DCOMPILER_VISTA_DLL'] = CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']
|
|
|
|
if CONFIG['MOZ_D3DCOMPILER_XP_DLL']:
|
|
|
|
DEFINES['MOZ_D3DCOMPILER_XP_DLL'] = CONFIG['MOZ_D3DCOMPILER_XP_DLL']
|
2013-11-27 13:55:07 +00:00
|
|
|
|
2014-07-24 15:55:33 +00:00
|
|
|
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
CXXFLAGS += CONFIG['TK_CFLAGS']
|
|
|
|
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
|
|
|
|
CFLAGS += CONFIG['TK_CFLAGS']
|
2015-02-23 17:46:55 +00:00
|
|
|
|
2015-07-30 16:05:22 +00:00
|
|
|
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
|
|
|
|
|
2016-05-11 07:00:01 +00:00
|
|
|
if CONFIG['GNU_CXX']:
|
|
|
|
CXXFLAGS += ['-Wno-error=shadow']
|