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",
27 "ForceDiscreteGPUHelperCGL.h",
28 "GfxTexturesReporter.h",
33 "GLContextProvider.h",
34 "GLContextProviderImpl.h",
40 "GLReadTexImageHelper.h",
46 "HeapCopyOfStackArray.h",
55 # Win32 is a special snowflake, for ANGLE
56 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
59 "SharedSurfaceANGLE.h", # Needs <windows.h> for `HANDLE`.
60 "SharedSurfaceD3D11Interop.h",
64 "GLBlitHelperD3D.cpp",
65 "GLContextProviderWGL.cpp",
66 "SharedSurfaceANGLE.cpp",
67 "SharedSurfaceD3D11Interop.cpp",
70 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
72 "AndroidNativeWindow.h",
73 "SharedSurfaceAndroidHardwareBuffer.h",
76 "SharedSurfaceAndroidHardwareBuffer.cpp",
79 if gl_provider == "CGL":
80 # These files include Mac headers that are unfriendly to unified builds
82 "GLContextProviderCGL.mm",
88 # SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
89 # which define Size and Point types in root namespace with often conflict with
90 # our own types. While I haven't actually hit this issue in the present case,
91 # it's been an issue in gfx/layers so let's not risk it.
93 "SharedSurfaceIO.cpp",
96 "-framework IOSurface",
99 elif gl_provider == "EAGL":
100 # These files include ObjC headers that are unfriendly to unified builds
102 "GLContextProviderEAGL.mm",
108 elif gl_provider == "Linux":
109 # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
110 # as it includes X11 headers which cause conflicts.
112 "GLContextProviderLinux.cpp",
114 EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
115 if CONFIG["MOZ_X11"]:
116 SOURCES += ["GLContextProviderGLX.cpp"]
118 if CONFIG["MOZ_WAYLAND"]:
119 SOURCES += ["SharedSurfaceDMABUF.cpp"]
122 "AndroidSurfaceTexture.cpp",
124 "GfxTexturesReporter.cpp",
127 "GLContextFeatures.cpp",
128 "GLContextProviderEGL.cpp",
131 "GLLibraryLoader.cpp",
132 "GLReadTexImageHelper.cpp",
133 "GLTextureImage.cpp",
134 "GLUploadHelpers.cpp",
135 "MozFramebuffer.cpp",
136 "ScopedGLHelpers.cpp",
138 "SharedSurfaceEGL.cpp",
139 "SharedSurfaceGL.cpp",
142 "GLScreenBuffer.cpp",
149 include("/ipc/chromium/chromium-config.mozbuild")
151 FINAL_LIBRARY = "xul"
153 if CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]:
154 DEFINES["MOZ_D3DCOMPILER_VISTA_DLL"] = CONFIG["MOZ_D3DCOMPILER_VISTA_DLL"]
156 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
157 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
158 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
160 CXXFLAGS += ["-Werror=switch"]
162 if CONFIG["MOZ_WAYLAND"]:
163 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
164 CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
166 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
168 "/gfx/cairo/cairo/src",