1 # -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
2 # vim: set filetype=python:
3 # This Source Code Form is subject to the terms of the Mozilla Public
4 # License, v. 2.0. If a copy of the MPL was not distributed with this
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
11 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
13 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "uikit":
15 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
16 if CONFIG["MOZ_EGL_XRENDER_COMPOSITE"]:
20 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
23 if CONFIG["MOZ_GL_PROVIDER"]:
24 gl_provider = CONFIG["MOZ_GL_PROVIDER"]
27 "AndroidSurfaceTexture.h",
28 "DecomposeIntoNoRepeatTriangles.h",
29 "ForceDiscreteGPUHelperCGL.h",
30 "GfxTexturesReporter.h",
35 "GLContextProvider.h",
36 "GLContextProviderImpl.h",
42 "GLReadTexImageHelper.h",
47 "HeapCopyOfStackArray.h",
56 # Win32 is a special snowflake, for ANGLE
57 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
58 REQUIRES_UNIFIED_BUILD = True
61 "SharedSurfaceANGLE.h", # Needs <windows.h> for `HANDLE`.
62 "SharedSurfaceD3D11Interop.h",
66 "GLBlitHelperD3D.cpp",
67 "GLContextProviderWGL.cpp",
68 "SharedSurfaceANGLE.cpp",
69 "SharedSurfaceD3D11Interop.cpp",
72 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
74 "AndroidNativeWindow.h",
75 "SharedSurfaceAndroidHardwareBuffer.h",
78 "SharedSurfaceAndroidHardwareBuffer.cpp",
81 if gl_provider == "CGL":
82 # These files include Mac headers that are unfriendly to unified builds
84 "GLContextProviderCGL.mm",
90 # SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
91 # which define Size and Point types in root namespace with often conflict with
92 # our own types. While I haven't actually hit this issue in the present case,
93 # it's been an issue in gfx/layers so let's not risk it.
95 "SharedSurfaceIO.cpp",
98 "-framework IOSurface",
101 elif gl_provider == "EAGL":
102 # These files include ObjC headers that are unfriendly to unified builds
104 "GLContextProviderEAGL.mm",
110 elif gl_provider == "GLX":
111 # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
112 # as it includes X11 headers which cause conflicts.
114 "GLContextProviderGLX.cpp",
115 "GLContextProviderX11.cpp",
117 EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
119 if CONFIG["MOZ_WAYLAND"]:
120 SOURCES += ["GLContextProviderWayland.cpp", "SharedSurfaceDMABUF.cpp"]
123 "AndroidSurfaceTexture.cpp",
124 "DecomposeIntoNoRepeatTriangles.cpp",
125 "GfxTexturesReporter.cpp",
128 "GLContextFeatures.cpp",
129 "GLContextProviderEGL.cpp",
132 "GLLibraryLoader.cpp",
133 "GLReadTexImageHelper.cpp",
134 "GLTextureImage.cpp",
135 "GLUploadHelpers.cpp",
136 "MozFramebuffer.cpp",
137 "ScopedGLHelpers.cpp",
139 "SharedSurfaceEGL.cpp",
140 "SharedSurfaceGL.cpp",
143 "GLScreenBuffer.cpp",
146 include("/ipc/chromium/chromium-config.mozbuild")
148 FINAL_LIBRARY = "xul"
150 if CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]:
151 DEFINES["MOZ_D3DCOMPILER_VISTA_DLL"] = CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]
153 CXXFLAGS += CONFIG["TK_CFLAGS"]
154 CFLAGS += CONFIG["TK_CFLAGS"]
156 CXXFLAGS += ["-Werror=switch"]
158 if CONFIG["MOZ_WAYLAND"]:
159 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
160 CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
162 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
164 "/gfx/cairo/cairo/src",
167 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
168 CXXFLAGS += ["-Wno-error=shadow"]