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'
|
2013-06-11 17:40:27 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_GTK']:
|
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'
|
2013-08-25 23:56:53 +00:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
|
|
|
gl_provider = 'GLX'
|
2013-04-23 21:54:15 +00:00
|
|
|
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`.
|
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 += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLContextProviderEGL.cpp',
|
|
|
|
'SharedSurfaceANGLE.cpp',
|
|
|
|
]
|
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']
|
2013-11-19 21:54:09 +00:00
|
|
|
UNIFIED_SOURCES += [
|
2014-03-05 21:49:37 +00:00
|
|
|
'SkiaGLGlue.cpp',
|
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']
|
2014-03-13 23:31:18 +00:00
|
|
|
CXXFLAGS += ['-I%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',
|
|
|
|
]
|
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',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 21:54:15 +00:00
|
|
|
'GLContextProvider%s.cpp' % gl_provider,
|
|
|
|
]
|
|
|
|
|
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',
|
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-08-22 06:55:59 +00:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
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
|
|
|
|
|
|
|
if CONFIG['OS_ARCH'] == 'WINNT':
|
|
|
|
del DEFINES['UNICODE']
|