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",
45 "HeapCopyOfStackArray.h",
54 # Win32 is a special snowflake, for ANGLE
55 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
58 "SharedSurfaceANGLE.h", # Needs <windows.h> for `HANDLE`.
59 "SharedSurfaceD3D11Interop.h",
63 "GLBlitHelperD3D.cpp",
64 "GLContextProviderWGL.cpp",
65 "SharedSurfaceANGLE.cpp",
66 "SharedSurfaceD3D11Interop.cpp",
69 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
71 "AndroidNativeWindow.h",
72 "SharedSurfaceAndroidHardwareBuffer.h",
75 "SharedSurfaceAndroidHardwareBuffer.cpp",
78 if gl_provider == "CGL":
79 # These files include Mac headers that are unfriendly to unified builds
81 "GLContextProviderCGL.mm",
87 # SharedSurfaceIO.cpp includes MacIOSurface.h which include Mac headers
88 # which define Size and Point types in root namespace with often conflict with
89 # our own types. While I haven't actually hit this issue in the present case,
90 # it's been an issue in gfx/layers so let's not risk it.
92 "SharedSurfaceIO.cpp",
95 "-framework IOSurface",
98 elif gl_provider == "EAGL":
99 # These files include ObjC headers that are unfriendly to unified builds
101 "GLContextProviderEAGL.mm",
107 elif gl_provider == "Linux":
108 # GLContextProviderGLX.cpp needs to be kept out of UNIFIED_SOURCES
109 # as it includes X11 headers which cause conflicts.
111 "GLContextProviderLinux.cpp",
112 "SharedSurfaceDMABUF.cpp",
114 EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
115 if CONFIG["MOZ_X11"]:
116 SOURCES += ["GLContextProviderGLX.cpp"]
119 "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",
146 include("/ipc/chromium/chromium-config.mozbuild")
148 FINAL_LIBRARY = "xul"
150 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
151 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
152 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
154 CXXFLAGS += ["-Werror=switch"]
156 if CONFIG["MOZ_WAYLAND"]:
157 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
158 CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
160 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
162 "/gfx/cairo/cairo/src",