gecko/gfx/gl/moz.build
James Willcox 15d30be7c6 Bug 939276 - Use a single GLContext for all SkiaGL canvases r=jgilbert,vlad,gwright,bjacob
--HG--
rename : gfx/gl/GLContextSkia.cpp => gfx/gl/SkiaGLGlue.cpp
2014-03-05 15:49:37 -06:00

157 lines
4.2 KiB
Python

# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
# 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/.
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_GTK']:
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
gl_provider = 'EGL'
else:
gl_provider = 'GLX'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
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']
EXPORTS += [
'DecomposeIntoNoRepeatTriangles.h',
'ForceDiscreteGPUHelperCGL.h',
'GfxTexturesReporter.h',
'GLBlitTextureImageHelper.h',
'GLConsts.h',
'GLContext.h',
'GLContextEGL.h',
'GLContextProvider.h',
'GLContextProviderImpl.h',
'GLContextSymbols.h',
'GLContextTypes.h',
'GLDefs.h',
'GLLibraryEGL.h',
'GLLibraryLoader.h',
'GLReadTexImageHelper.h',
'GLScreenBuffer.h',
'GLSharedHandleHelpers.h',
'GLTextureImage.h',
'GLTypes.h',
'GLUploadHelpers.h',
'ScopedGLHelpers.h',
'SharedSurface.h',
'SharedSurfaceEGL.h',
'SharedSurfaceGL.h',
'SurfaceFactory.h',
'SurfaceStream.h',
'SurfaceTypes.h',
'TextureGarbageBin.h',
'VBOArena.h',
]
if CONFIG['MOZ_X11']:
EXPORTS += [
'GLContextGLX.h',
'GLXLibrary.h',
]
# Win32 is a special snowflake, for ANGLE
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
EXPORTS += [
'GLContextWGL.h',
'SharedSurfaceANGLE.h',
'WGLLibrary.h',
]
UNIFIED_SOURCES += [
'GLContextProviderEGL.cpp',
'SharedSurfaceANGLE.cpp',
]
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
EXPORTS += ['SkiaGLGlue.h']
UNIFIED_SOURCES += [
'SkiaGLGlue.cpp',
]
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp']
EXPORTS += ['SharedSurfaceGralloc.h']
LOCAL_INCLUDES += ['/widget/gonk']
if gl_provider == 'CGL':
# These files include Mac headers that are unfriendly to unified builds
SOURCES += [
"GLContextProviderCGL.mm",
"TextureImageCGL.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 == 'GLX':
# GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
# as it includes X11 headers which cause conflicts.
SOURCES += [
'GLContextProviderGLX.cpp',
]
else:
UNIFIED_SOURCES += [
'GLContextProvider%s.cpp' % gl_provider,
]
UNIFIED_SOURCES += [
'DecomposeIntoNoRepeatTriangles.cpp',
'GfxTexturesReporter.cpp',
'GLBlitHelper.cpp',
'GLBlitTextureImageHelper.cpp',
'GLContext.cpp',
'GLContextFeatures.cpp',
'GLContextTypes.cpp',
'GLDebugUtils.cpp',
'GLLibraryEGL.cpp',
'GLLibraryLoader.cpp',
'GLReadTexImageHelper.cpp',
'GLScreenBuffer.cpp',
'GLSharedHandleHelpers.cpp',
'GLTextureImage.cpp',
'GLUploadHelpers.cpp',
'ScopedGLHelpers.cpp',
'SharedSurface.cpp',
'SharedSurfaceEGL.cpp',
'SharedSurfaceGL.cpp',
'SurfaceFactory.cpp',
'SurfaceStream.cpp',
'SurfaceTypes.cpp',
'TextureGarbageBin.cpp',
'TextureImageEGL.cpp',
'VBOArena.cpp',
]
FAIL_ON_WARNINGS = True
MSVC_ENABLE_PGO = True
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows' and CONFIG['MOZ_WEBGL']:
DEFINES['MOZ_D3DCOMPILER_DLL'] = CONFIG['MOZ_D3DCOMPILER_DLL']
if CONFIG['MOZ_ANDROID_OMTC']:
DEFINES['MOZ_ANDROID_OMTC'] = True