1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/gl/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,157 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +gl_provider = 'Null' 1.11 + 1.12 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 1.13 + gl_provider = 'WGL' 1.14 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': 1.15 + gl_provider = 'CGL' 1.16 +elif CONFIG['MOZ_WIDGET_GTK']: 1.17 + if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']: 1.18 + gl_provider = 'EGL' 1.19 + else: 1.20 + gl_provider = 'GLX' 1.21 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt': 1.22 + gl_provider = 'GLX' 1.23 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android': 1.24 + gl_provider = 'EGL' 1.25 +elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': 1.26 + gl_provider = 'EGL' 1.27 + 1.28 +if CONFIG['MOZ_GL_PROVIDER']: 1.29 + gl_provider = CONFIG['MOZ_GL_PROVIDER'] 1.30 + 1.31 +EXPORTS += [ 1.32 + 'DecomposeIntoNoRepeatTriangles.h', 1.33 + 'ForceDiscreteGPUHelperCGL.h', 1.34 + 'GfxTexturesReporter.h', 1.35 + 'GLBlitTextureImageHelper.h', 1.36 + 'GLConsts.h', 1.37 + 'GLContext.h', 1.38 + 'GLContextEGL.h', 1.39 + 'GLContextProvider.h', 1.40 + 'GLContextProviderImpl.h', 1.41 + 'GLContextSymbols.h', 1.42 + 'GLContextTypes.h', 1.43 + 'GLDefs.h', 1.44 + 'GLLibraryEGL.h', 1.45 + 'GLLibraryLoader.h', 1.46 + 'GLReadTexImageHelper.h', 1.47 + 'GLScreenBuffer.h', 1.48 + 'GLSharedHandleHelpers.h', 1.49 + 'GLTextureImage.h', 1.50 + 'GLTypes.h', 1.51 + 'GLUploadHelpers.h', 1.52 + 'ScopedGLHelpers.h', 1.53 + 'SharedSurface.h', 1.54 + 'SharedSurfaceEGL.h', 1.55 + 'SharedSurfaceGL.h', 1.56 + 'SurfaceFactory.h', 1.57 + 'SurfaceStream.h', 1.58 + 'SurfaceTypes.h', 1.59 + 'TextureGarbageBin.h', 1.60 + 'VBOArena.h', 1.61 +] 1.62 + 1.63 +if CONFIG['MOZ_X11']: 1.64 + EXPORTS += [ 1.65 + 'GLContextGLX.h', 1.66 + 'GLXLibrary.h', 1.67 + ] 1.68 + 1.69 +# Win32 is a special snowflake, for ANGLE 1.70 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': 1.71 + EXPORTS += [ 1.72 + 'GLContextWGL.h', 1.73 + 'SharedSurfaceANGLE.h', 1.74 + 'WGLLibrary.h', 1.75 + ] 1.76 + UNIFIED_SOURCES += [ 1.77 + 'GLContextProviderEGL.cpp', 1.78 + 'SharedSurfaceANGLE.cpp', 1.79 + ] 1.80 +if CONFIG['MOZ_ENABLE_SKIA_GPU']: 1.81 + EXPORTS += ['SkiaGLGlue.h'] 1.82 + UNIFIED_SOURCES += [ 1.83 + 'SkiaGLGlue.cpp', 1.84 + ] 1.85 + 1.86 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': 1.87 + UNIFIED_SOURCES += ['SharedSurfaceGralloc.cpp'] 1.88 + EXPORTS += ['SharedSurfaceGralloc.h'] 1.89 + LOCAL_INCLUDES += ['/widget/gonk'] 1.90 + CXXFLAGS += ['-I%s/%s' % (CONFIG['ANDROID_SOURCE'], 'hardware/libhardware/include')] 1.91 + 1.92 +if gl_provider == 'CGL': 1.93 + # These files include Mac headers that are unfriendly to unified builds 1.94 + SOURCES += [ 1.95 + "GLContextProviderCGL.mm", 1.96 + "TextureImageCGL.mm" 1.97 + ] 1.98 + EXPORTS += [ 1.99 + 'GLContextCGL.h', 1.100 + 'SharedSurfaceIO.h', 1.101 + ] 1.102 + # SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers 1.103 + # which define Size and Point types in root namespace with often conflict with 1.104 + # our own types. While I haven't actually hit this issue in the present case, 1.105 + # it's been an issue in gfx/layers so let's not risk it. 1.106 + SOURCES += [ 1.107 + 'SharedSurfaceIO.cpp', 1.108 + ] 1.109 +elif gl_provider == 'GLX': 1.110 + # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES 1.111 + # as it includes X11 headers which cause conflicts. 1.112 + SOURCES += [ 1.113 + 'GLContextProviderGLX.cpp', 1.114 + ] 1.115 +else: 1.116 + UNIFIED_SOURCES += [ 1.117 + 'GLContextProvider%s.cpp' % gl_provider, 1.118 + ] 1.119 + 1.120 +UNIFIED_SOURCES += [ 1.121 + 'DecomposeIntoNoRepeatTriangles.cpp', 1.122 + 'GfxTexturesReporter.cpp', 1.123 + 'GLBlitHelper.cpp', 1.124 + 'GLBlitTextureImageHelper.cpp', 1.125 + 'GLContext.cpp', 1.126 + 'GLContextFeatures.cpp', 1.127 + 'GLContextTypes.cpp', 1.128 + 'GLDebugUtils.cpp', 1.129 + 'GLLibraryEGL.cpp', 1.130 + 'GLLibraryLoader.cpp', 1.131 + 'GLReadTexImageHelper.cpp', 1.132 + 'GLScreenBuffer.cpp', 1.133 + 'GLSharedHandleHelpers.cpp', 1.134 + 'GLTextureImage.cpp', 1.135 + 'GLUploadHelpers.cpp', 1.136 + 'ScopedGLHelpers.cpp', 1.137 + 'SharedSurface.cpp', 1.138 + 'SharedSurfaceEGL.cpp', 1.139 + 'SharedSurfaceGL.cpp', 1.140 + 'SurfaceFactory.cpp', 1.141 + 'SurfaceStream.cpp', 1.142 + 'SurfaceTypes.cpp', 1.143 + 'TextureGarbageBin.cpp', 1.144 + 'TextureImageEGL.cpp', 1.145 + 'VBOArena.cpp', 1.146 +] 1.147 + 1.148 +FAIL_ON_WARNINGS = True 1.149 + 1.150 +MSVC_ENABLE_PGO = True 1.151 + 1.152 +include('/ipc/chromium/chromium-config.mozbuild') 1.153 + 1.154 +FINAL_LIBRARY = 'xul' 1.155 + 1.156 +if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows' and CONFIG['MOZ_WEBGL']: 1.157 + DEFINES['MOZ_D3DCOMPILER_DLL'] = CONFIG['MOZ_D3DCOMPILER_DLL'] 1.158 + 1.159 +if CONFIG['MOZ_ANDROID_OMTC']: 1.160 + DEFINES['MOZ_ANDROID_OMTC'] = True