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":
17 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
20 if CONFIG["MOZ_GL_PROVIDER"]:
21 gl_provider = CONFIG["MOZ_GL_PROVIDER"]
24 "AndroidSurfaceTexture.h",
25 "ForceDiscreteGPUHelperCGL.h",
26 "GfxTexturesReporter.h",
31 "GLContextProvider.h",
32 "GLContextProviderImpl.h",
38 "GLReadTexImageHelper.h",
43 "HeapCopyOfStackArray.h",
52 # Win32 is a special snowflake, for ANGLE
53 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
54 REQUIRES_UNIFIED_BUILD = True
57 "SharedSurfaceANGLE.h", # Needs <windows.h> for `HANDLE`.
58 "SharedSurfaceD3D11Interop.h",
62 "GLBlitHelperD3D.cpp",
63 "GLContextProviderWGL.cpp",
64 "SharedSurfaceANGLE.cpp",
65 "SharedSurfaceD3D11Interop.cpp",
68 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
70 "AndroidNativeWindow.h",
71 "SharedSurfaceAndroidHardwareBuffer.h",
74 "SharedSurfaceAndroidHardwareBuffer.cpp",
77 if gl_provider == "CGL":
78 # These files include Mac headers that are unfriendly to unified builds
80 "GLContextProviderCGL.mm",
86 # SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
87 # which define Size and Point types in root namespace with often conflict with
88 # our own types. While I haven't actually hit this issue in the present case,
89 # it's been an issue in gfx/layers so let's not risk it.
91 "SharedSurfaceIO.cpp",
94 "-framework IOSurface",
97 elif gl_provider == "EAGL":
98 # These files include ObjC headers that are unfriendly to unified builds
100 "GLContextProviderEAGL.mm",
106 elif gl_provider == "Linux":
107 # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
108 # as it includes X11 headers which cause conflicts.
110 "GLContextProviderLinux.cpp",
112 EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
113 if CONFIG["MOZ_X11"]:
114 SOURCES += ["GLContextProviderGLX.cpp"]
116 if CONFIG["MOZ_WAYLAND"]:
117 SOURCES += ["SharedSurfaceDMABUF.cpp"]
120 "AndroidSurfaceTexture.cpp",
121 "GfxTexturesReporter.cpp",
124 "GLContextFeatures.cpp",
125 "GLContextProviderEGL.cpp",
128 "GLLibraryLoader.cpp",
129 "GLReadTexImageHelper.cpp",
130 "GLTextureImage.cpp",
131 "GLUploadHelpers.cpp",
132 "MozFramebuffer.cpp",
133 "ScopedGLHelpers.cpp",
135 "SharedSurfaceEGL.cpp",
136 "SharedSurfaceGL.cpp",
139 "GLScreenBuffer.cpp",
142 include("/ipc/chromium/chromium-config.mozbuild")
144 FINAL_LIBRARY = "xul"
146 if CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]:
147 DEFINES["MOZ_D3DCOMPILER_VISTA_DLL"] = CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]
149 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
150 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
151 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
153 CXXFLAGS += ["-Werror=switch"]
155 if CONFIG["MOZ_WAYLAND"]:
156 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
157 CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
159 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
161 "/gfx/cairo/cairo/src",