2013-04-01 11:36:59 -07:00
|
|
|
# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
|
2013-02-25 12:47:21 -08: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 14:54:15 -07: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 10:40:27 -07:00
|
|
|
elif CONFIG['MOZ_WIDGET_GTK']:
|
2013-08-25 16:56:53 -07:00
|
|
|
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
|
2013-04-23 14:54:15 -07:00
|
|
|
gl_provider = 'EGL'
|
|
|
|
else:
|
|
|
|
gl_provider = 'GLX'
|
2013-08-25 16:56:53 -07:00
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
|
|
|
gl_provider = 'GLX'
|
2013-04-23 14:54:15 -07: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 12:24:43 -07:00
|
|
|
EXPORTS += [
|
2013-11-28 12:57:19 -08:00
|
|
|
'DecomposeIntoNoRepeatTriangles.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'ForceDiscreteGPUHelperCGL.h',
|
2013-10-23 16:05:43 -07:00
|
|
|
'GfxTexturesReporter.h',
|
2013-11-28 12:57:19 -08:00
|
|
|
'GLBlitTextureImageHelper.h',
|
2013-08-13 07:35:03 -07:00
|
|
|
'GLConsts.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'GLContext.h',
|
2014-01-07 12:02:18 -08:00
|
|
|
'GLContextEGL.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'GLContextProvider.h',
|
|
|
|
'GLContextProviderImpl.h',
|
|
|
|
'GLContextSymbols.h',
|
|
|
|
'GLContextTypes.h',
|
|
|
|
'GLDefs.h',
|
|
|
|
'GLLibraryEGL.h',
|
|
|
|
'GLLibraryLoader.h',
|
2014-01-02 07:17:22 -08:00
|
|
|
'GLReadTexImageHelper.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'GLScreenBuffer.h',
|
2013-12-03 10:44:38 -08:00
|
|
|
'GLSharedHandleHelpers.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'GLTextureImage.h',
|
2013-08-13 07:35:03 -07:00
|
|
|
'GLTypes.h',
|
2013-12-03 10:44:38 -08:00
|
|
|
'GLUploadHelpers.h',
|
2014-05-08 18:03:37 -07:00
|
|
|
'HeapCopyOfStackArray.h',
|
2013-11-25 19:25:25 -08:00
|
|
|
'ScopedGLHelpers.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
'SharedSurface.h',
|
|
|
|
'SharedSurfaceEGL.h',
|
|
|
|
'SharedSurfaceGL.h',
|
|
|
|
'SurfaceFactory.h',
|
|
|
|
'SurfaceStream.h',
|
|
|
|
'SurfaceTypes.h',
|
2013-09-06 19:13:37 -07:00
|
|
|
'TextureGarbageBin.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
2014-01-07 12:02:18 -08:00
|
|
|
EXPORTS += [
|
|
|
|
'GLContextGLX.h',
|
|
|
|
'GLXLibrary.h',
|
|
|
|
]
|
2013-04-23 14:54:15 -07:00
|
|
|
|
|
|
|
# Win32 is a special snowflake, for ANGLE
|
2013-04-16 12:24:43 -07:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
|
|
|
|
EXPORTS += [
|
2014-01-07 12:02:18 -08:00
|
|
|
'GLContextWGL.h',
|
2013-05-16 10:22:02 -07:00
|
|
|
'SharedSurfaceANGLE.h',
|
2013-05-16 15:37:18 -07:00
|
|
|
'WGLLibrary.h',
|
2013-04-16 12:24:43 -07:00
|
|
|
]
|
2013-11-19 13:54:09 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLContextProviderEGL.cpp',
|
|
|
|
'SharedSurfaceANGLE.cpp',
|
|
|
|
]
|
2013-04-16 12:24:43 -07:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
|
2014-03-05 13:49:37 -08:00
|
|
|
EXPORTS += ['SkiaGLGlue.h']
|
2013-11-19 13:54:09 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2014-03-05 13:49:37 -08:00
|
|
|
'SkiaGLGlue.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
2013-05-27 07:12:13 -07:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
2013-11-19 13:54:09 -08:00
|
|
|
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
|
2013-05-27 07:12:13 -07:00
|
|
|
EXPORTS += ['SharedSurfaceGralloc.h']
|
2013-11-28 06:10:38 -08:00
|
|
|
LOCAL_INCLUDES += ['/widget/gonk']
|
2014-03-13 16:31:18 -07:00
|
|
|
CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')]
|
2013-05-27 07:12:13 -07:00
|
|
|
|
2013-04-23 14:54:15 -07:00
|
|
|
if gl_provider == 'CGL':
|
2013-12-03 10:44:38 -08:00
|
|
|
# These files include Mac headers that are unfriendly to unified builds
|
2013-10-24 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-12-03 10:44:38 -08:00
|
|
|
"GLContextProviderCGL.mm",
|
|
|
|
"TextureImageCGL.mm"
|
2013-07-01 09:32:40 -07:00
|
|
|
]
|
2013-07-17 20:24:15 -07:00
|
|
|
EXPORTS += [
|
2014-01-07 12:02:18 -08:00
|
|
|
'GLContextCGL.h',
|
2013-07-17 20:24:15 -07:00
|
|
|
'SharedSurfaceIO.h',
|
|
|
|
]
|
2013-11-19 13:54:09 -08: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 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-07-17 20:24:15 -07:00
|
|
|
'SharedSurfaceIO.cpp',
|
|
|
|
]
|
2013-11-19 13:54:09 -08: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 16:23:05 -07:00
|
|
|
SOURCES += [
|
2013-11-19 13:54:09 -08:00
|
|
|
'GLContextProviderGLX.cpp',
|
|
|
|
]
|
|
|
|
else:
|
|
|
|
UNIFIED_SOURCES += [
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLContextProvider%s.cpp' % gl_provider,
|
|
|
|
]
|
|
|
|
|
2013-11-19 13:54:09 -08:00
|
|
|
UNIFIED_SOURCES += [
|
2013-11-28 12:57:19 -08:00
|
|
|
'DecomposeIntoNoRepeatTriangles.cpp',
|
2013-10-23 16:05:43 -07:00
|
|
|
'GfxTexturesReporter.cpp',
|
2013-11-28 12:57:19 -08:00
|
|
|
'GLBlitHelper.cpp',
|
2013-11-28 12:57:19 -08:00
|
|
|
'GLBlitTextureImageHelper.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLContext.cpp',
|
2013-08-22 10:42:05 -07:00
|
|
|
'GLContextFeatures.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLContextTypes.cpp',
|
2014-01-22 01:21:19 -08:00
|
|
|
'GLDebugUtils.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'GLLibraryEGL.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLLibraryLoader.cpp',
|
2014-01-02 07:17:22 -08:00
|
|
|
'GLReadTexImageHelper.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLScreenBuffer.cpp',
|
2013-12-03 10:44:38 -08:00
|
|
|
'GLSharedHandleHelpers.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'GLTextureImage.cpp',
|
2013-12-03 10:44:38 -08:00
|
|
|
'GLUploadHelpers.cpp',
|
2013-11-25 19:25:25 -08:00
|
|
|
'ScopedGLHelpers.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
'SharedSurface.cpp',
|
|
|
|
'SharedSurfaceEGL.cpp',
|
|
|
|
'SharedSurfaceGL.cpp',
|
|
|
|
'SurfaceFactory.cpp',
|
|
|
|
'SurfaceStream.cpp',
|
2013-12-03 10:44:38 -08:00
|
|
|
'SurfaceTypes.cpp',
|
2013-09-06 19:13:37 -07:00
|
|
|
'TextureGarbageBin.cpp',
|
2013-10-23 16:00:23 -07:00
|
|
|
'TextureImageEGL.cpp',
|
2013-04-23 14:54:15 -07:00
|
|
|
]
|
|
|
|
|
2013-08-21 23:55:59 -07:00
|
|
|
FAIL_ON_WARNINGS = True
|
|
|
|
|
2013-08-21 23:56:01 -07:00
|
|
|
MSVC_ENABLE_PGO = True
|
|
|
|
|
2013-10-02 10:17:55 -07:00
|
|
|
include('/ipc/chromium/chromium-config.mozbuild')
|
|
|
|
|
2013-11-18 18:47:14 -08:00
|
|
|
FINAL_LIBRARY = 'xul'
|
2013-11-27 05:55:07 -08:00
|
|
|
|
2014-05-02 15:31:05 -07: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 05:55:07 -08:00
|
|
|
|
|
|
|
if CONFIG['MOZ_ANDROID_OMTC']:
|
|
|
|
DEFINES['MOZ_ANDROID_OMTC'] = True
|