2013-04-01 22:36:59 +04:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; 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'
|
|
|
|
|
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
gl_provider = 'WGL'
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
|
|
|
|
gl_provider = 'CGL'
|
2013-06-11 21:40:27 +04:00
|
|
|
elif CONFIG['MOZ_WIDGET_GTK']:
|
2013-08-26 03:56:53 +04:00
|
|
|
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
|
2013-04-24 01:54:15 +04:00
|
|
|
gl_provider = 'EGL'
|
|
|
|
else:
|
|
|
|
gl_provider = 'GLX'
|
2013-08-26 03:56:53 +04:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
|
|
|
gl_provider = 'GLX'
|
2013-04-24 01:54:15 +04: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 23:24:43 +04:00
|
|
|
EXPORTS += [
|
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-11-29 00:57:19 +04:00
|
|
|
'GLBlitTextureImageHelper.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',
|
2013-12-03 22:44:38 +04:00
|
|
|
'GLSharedHandleHelpers.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'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',
|
2013-11-26 07:25:25 +04:00
|
|
|
'ScopedGLHelpers.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
'SharedSurface.h',
|
|
|
|
'SharedSurfaceEGL.h',
|
|
|
|
'SharedSurfaceGL.h',
|
|
|
|
'SurfaceStream.h',
|
|
|
|
'SurfaceTypes.h',
|
2013-09-07 06:13:37 +04:00
|
|
|
'TextureGarbageBin.h',
|
2013-04-16 23:24:43 +04:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2014-01-08 00:02:18 +04:00
|
|
|
EXPORTS += [
|
|
|
|
'GLContextGLX.h',
|
|
|
|
'GLXLibrary.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`.
|
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 += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'GLContextProviderEGL.cpp',
|
|
|
|
'SharedSurfaceANGLE.cpp',
|
|
|
|
]
|
2013-04-16 23:24:43 +04:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
|
2014-03-06 01:49:37 +04:00
|
|
|
EXPORTS += ['SkiaGLGlue.h']
|
2013-11-20 01:54:09 +04:00
|
|
|
UNIFIED_SOURCES += [
|
2014-03-06 01:49:37 +04:00
|
|
|
'SkiaGLGlue.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2013-05-27 18:12:13 +04:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
2013-11-20 01:54:09 +04:00
|
|
|
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
|
2013-05-27 18:12:13 +04:00
|
|
|
EXPORTS += ['SharedSurfaceGralloc.h']
|
2013-11-28 18:10:38 +04:00
|
|
|
LOCAL_INCLUDES += ['/widget/gonk']
|
2014-03-14 03:31:18 +04:00
|
|
|
CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
|
2013-05-27 18:12:13 +04: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",
|
|
|
|
"TextureImageCGL.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',
|
|
|
|
]
|
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',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
2013-04-24 01:54:15 +04:00
|
|
|
'GLContextProvider%s.cpp' % gl_provider,
|
|
|
|
]
|
|
|
|
|
2013-11-20 01:54:09 +04:00
|
|
|
UNIFIED_SOURCES += [
|
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-11-29 00:57:19 +04:00
|
|
|
'GLBlitTextureImageHelper.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'GLContext.cpp',
|
2013-08-22 21:42:05 +04:00
|
|
|
'GLContextFeatures.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'GLContextTypes.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
|
|
|
'GLScreenBuffer.cpp',
|
2013-12-03 22:44:38 +04:00
|
|
|
'GLSharedHandleHelpers.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
'GLTextureImage.cpp',
|
2013-12-03 22:44:38 +04:00
|
|
|
'GLUploadHelpers.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',
|
|
|
|
'SurfaceStream.cpp',
|
2013-12-03 22:44:38 +04:00
|
|
|
'SurfaceTypes.cpp',
|
2013-09-07 06:13:37 +04:00
|
|
|
'TextureGarbageBin.cpp',
|
2013-10-24 03:00:23 +04:00
|
|
|
'TextureImageEGL.cpp',
|
2013-04-24 01:54:15 +04:00
|
|
|
]
|
|
|
|
|
2013-08-22 10:55:59 +04:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-08-22 10:56:01 +04:00
|
|
|
MSVC_ENABLE_PGO = True
|
|
|
|
|
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']
|
|
|
|
if CONFIG['MOZ_D3DCOMPILER_XP_DLL']:
|
|
|
|
DEFINES['MOZ_D3DCOMPILER_XP_DLL'] = CONFIG['MOZ_D3DCOMPILER_XP_DLL']
|
2013-11-27 17:55:07 +04:00
|
|
|
|
|
|
|
if CONFIG['MOZ_ANDROID_OMTC']:
|
|
|
|
DEFINES['MOZ_ANDROID_OMTC'] = True
|