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-03-19 11:47:00 -07:00
|
|
|
MODULE = 'gl'
|
|
|
|
|
2013-04-23 14:54:15 -07:00
|
|
|
# NOTE: Please keep gl_provider in sync with Makefile.in until all variables
|
|
|
|
# are moved over.
|
|
|
|
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_TOOLKIT'] == 'gtk2':
|
|
|
|
if CONFIG['fdef MOZ_PLATFORM_MAEMO']:
|
|
|
|
gl_provider = 'EGL'
|
|
|
|
else:
|
|
|
|
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
|
|
|
|
gl_provider = 'EGL'
|
|
|
|
else:
|
|
|
|
gl_provider = 'GLX'
|
|
|
|
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
|
|
|
|
if CONFIG['fdef MOZ_PLATFORM_MAEMO']:
|
|
|
|
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 12:24:43 -07:00
|
|
|
EXPORTS += [
|
|
|
|
'ForceDiscreteGPUHelperCGL.h',
|
|
|
|
'GLContext.h',
|
|
|
|
'GLContextProvider.h',
|
|
|
|
'GLContextProviderImpl.h',
|
|
|
|
'GLContextSymbols.h',
|
|
|
|
'GLContextTypes.h',
|
|
|
|
'GLDefs.h',
|
|
|
|
'GLLibraryEGL.h',
|
|
|
|
'GLLibraryLoader.h',
|
|
|
|
'GLScreenBuffer.h',
|
|
|
|
'GLTextureImage.h',
|
|
|
|
'SharedSurface.h',
|
|
|
|
'SharedSurfaceEGL.h',
|
|
|
|
'SharedSurfaceGL.h',
|
|
|
|
'SurfaceFactory.h',
|
|
|
|
'SurfaceStream.h',
|
|
|
|
'SurfaceTypes.h',
|
|
|
|
]
|
|
|
|
|
|
|
|
if CONFIG['MOZ_X11']:
|
|
|
|
EXPORTS += ['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 += [
|
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-04-23 14:54:15 -07:00
|
|
|
CPP_SOURCES += [
|
|
|
|
'GLContextProviderEGL.cpp',
|
|
|
|
'GLLibraryEGL.cpp',
|
|
|
|
'SharedSurfaceANGLE.cpp',
|
|
|
|
]
|
2013-04-16 12:24:43 -07:00
|
|
|
if CONFIG['MOZ_ENABLE_SKIA_GPU']:
|
|
|
|
EXPORTS += ['GLContextSkia.h']
|
2013-04-23 14:54:15 -07:00
|
|
|
CPP_SOURCES += [
|
|
|
|
'GLContextSkia.cpp',
|
|
|
|
]
|
|
|
|
|
2013-05-27 07:12:13 -07:00
|
|
|
if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
|
|
|
|
CPP_SOURCES += ['SharedSurfaceGralloc.cpp']
|
|
|
|
EXPORTS += ['SharedSurfaceGralloc.h']
|
|
|
|
|
2013-04-23 14:54:15 -07:00
|
|
|
if gl_provider == 'CGL':
|
|
|
|
# TODO: CMMSRCS
|
|
|
|
pass
|
|
|
|
else:
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'GLContextProvider%s.cpp' % gl_provider,
|
|
|
|
]
|
|
|
|
|
|
|
|
if gl_provider == 'EGL':
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'GLLibraryEGL.cpp',
|
|
|
|
]
|
|
|
|
|
|
|
|
CPP_SOURCES += [
|
|
|
|
'GLContext.cpp',
|
|
|
|
'GLContextTypes.cpp',
|
|
|
|
'GLContextUtils.cpp',
|
|
|
|
'GLLibraryLoader.cpp',
|
|
|
|
'GLScreenBuffer.cpp',
|
|
|
|
'GLTextureImage.cpp',
|
|
|
|
'SharedSurface.cpp',
|
|
|
|
'SharedSurfaceEGL.cpp',
|
|
|
|
'SharedSurfaceGL.cpp',
|
|
|
|
'SurfaceFactory.cpp',
|
|
|
|
'SurfaceStream.cpp',
|
|
|
|
]
|
|
|
|
|