gecko-dev/gfx/gl/moz.build

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

169 lines
4.4 KiB
Plaintext
Raw Normal View History

# -*- Mode: python; 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_TOOLKIT'] == 'uikit':
gl_provider = 'EAGL'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gtk':
if CONFIG['MOZ_EGL_XRENDER_COMPOSITE']:
gl_provider = 'EGL'
else:
gl_provider = 'GLX'
elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
gl_provider = 'EGL'
if CONFIG['MOZ_GL_PROVIDER']:
gl_provider = CONFIG['MOZ_GL_PROVIDER']
EXPORTS += [
'AndroidNativeWindow.h',
'AndroidSurfaceTexture.h',
'DecomposeIntoNoRepeatTriangles.h',
'ForceDiscreteGPUHelperCGL.h',
'GfxTexturesReporter.h',
'GLBlitHelper.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',
'GLTextureImage.h',
'GLTypes.h',
'GLUploadHelpers.h',
'HeapCopyOfStackArray.h',
'MozFramebuffer.h',
'ScopedGLHelpers.h',
'SharedSurface.h',
'SharedSurfaceEGL.h',
'SharedSurfaceGL.h',
'SurfaceTypes.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', # Needs <windows.h> for `HANDLE`.
'SharedSurfaceD3D11Interop.h',
'WGLLibrary.h',
]
UNIFIED_SOURCES += [
'GLBlitHelperD3D.cpp',
'GLContextProviderWGL.cpp',
'SharedSurfaceANGLE.cpp',
'SharedSurfaceD3D11Interop.cpp',
]
if gl_provider == 'CGL':
# These files include Mac headers that are unfriendly to unified builds
SOURCES += [
"GLContextProviderCGL.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',
]
OS_LIBS += [
'-framework IOSurface',
]
elif gl_provider == 'EAGL':
# These files include ObjC headers that are unfriendly to unified builds
SOURCES += [
'GLContextProviderEAGL.mm',
]
EXPORTS += [
'GLContextEAGL.h',
]
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',
'SharedSurfaceGLX.cpp'
]
EXPORTS += [
'SharedSurfaceGLX.h'
]
if CONFIG['MOZ_WAYLAND']:
SOURCES += [
'GLContextProviderWayland.cpp',
'SharedSurfaceDMABUF.cpp'
]
UNIFIED_SOURCES += [
'AndroidSurfaceTexture.cpp',
'DecomposeIntoNoRepeatTriangles.cpp',
'GfxTexturesReporter.cpp',
'GLBlitHelper.cpp',
'GLContext.cpp',
'GLContextFeatures.cpp',
'GLContextProviderEGL.cpp',
'GLDebugUtils.cpp',
'GLLibraryEGL.cpp',
'GLLibraryLoader.cpp',
'GLReadTexImageHelper.cpp',
'GLTextureImage.cpp',
'GLUploadHelpers.cpp',
'MozFramebuffer.cpp',
'ScopedGLHelpers.cpp',
'SharedSurface.cpp',
'SharedSurfaceEGL.cpp',
'SharedSurfaceGL.cpp',
'TextureImageEGL.cpp',
]
Bug 1477756 - Fix all webgl regression tests according to CI. r=handyman (This is a combination of 31 commits) * Fix Linux compilation. * Fix mac compilation. * CI compile fixes. * printf's size_t is %zu. %tu would be unsigned ptrdiff_t. * No non-ref Maybe args. * MOZ_CRASH for noreturn * Handle implied texture sizes, rewrite comment stripping. * Replace e.g. WebGLProgramInner with simpler webgl::ProgramKeepAlive. * Bounce ValidateProgram call off driver. * Uniform name length limit, cubemap fb-attach, non-array uniforms, undersized texImage views. * alignas for uint8_t[sizeof(float)*N] pun buffers. * CC fixes? * Fill attrib0Active. * Repair max-warnings limit. * This is basically required in order for CI's logging to not explode. * Don't cache WebGLMemoryTracker. * Deleted prog/shader error, no texSubImage(null), client-side fingerprint resist for exts. * Fix GetUniformIndices and MakeRangeFromView. * CC Traverse base class from within derived class to fix leaking the world. :( * PauseTransformFeedback * TexImage video fastpath * GetFragLocation for arrays * Forbid BindBufferRange during TF * Mark tests and fix RBAB query and test. * Change(!) query deletion behavior to match spec. * Mark conformance2/query/query.html failing for now. * Implicitly EndQuery on DeleteQuery while spec is in flux. * Fix error code for test. * RAII LruPosition for WebGL context limit. * Include std::list. * Mark CompileResult and LinkResult.pending as false when retrieved. * Hold strong-ref to NotLostData during Run<> to prevent LoseContext=>UAF. * Don't assume GetUniformLocation(foo+'[0]') means foo is an array. * Don't assume !mCanvasElement means !!mOffscreenCanvas. * Handle composition while context-lost. * All non-value-init members must be const or have inline init. * Mark passing tests on Linux. Depends on D54019 Differential Revision: https://phabricator.services.mozilla.com/D55739 --HG-- extra : moz-landing-system : lando
2020-01-08 22:19:23 +00:00
SOURCES += [
'GLScreenBuffer.cpp',
]
include('/ipc/chromium/chromium-config.mozbuild')
FINAL_LIBRARY = 'xul'
if CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']:
DEFINES['MOZ_D3DCOMPILER_VISTA_DLL'] = CONFIG['MOZ_D3DCOMPILER_VISTA_DLL']
CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CXXFLAGS += CONFIG['TK_CFLAGS']
CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
CFLAGS += CONFIG['TK_CFLAGS']
if CONFIG['MOZ_WAYLAND']:
CXXFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
CFLAGS += CONFIG['MOZ_WAYLAND_CFLAGS']
LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
if CONFIG['CC_TYPE'] in ('clang', 'gcc'):
CXXFLAGS += ['-Wno-error=shadow']