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 DEFINES["GLES_SILENCE_DEPRECATION"] = 1
16 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
18 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
21 if CONFIG["MOZ_GL_PROVIDER"]:
22 gl_provider = CONFIG["MOZ_GL_PROVIDER"]
25 "AndroidSurfaceTexture.h",
28 "ForceDiscreteGPUHelperCGL.h",
29 "GfxTexturesReporter.h",
34 "GLContextProvider.h",
35 "GLContextProviderImpl.h",
41 "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",
113 "SharedSurfaceDMABUF.cpp",
115 EXPORTS += ["GLContextGLX.h", "GLXLibrary.h"]
116 if CONFIG["MOZ_X11"]:
117 SOURCES += ["GLContextProviderGLX.cpp"]
120 "AndroidSurfaceTexture.cpp",
122 "GfxTexturesReporter.cpp",
125 "GLContextFeatures.cpp",
126 "GLContextProviderEGL.cpp",
129 "GLLibraryLoader.cpp",
130 "GLReadTexImageHelper.cpp",
131 "GLTextureImage.cpp",
132 "GLUploadHelpers.cpp",
133 "MozFramebuffer.cpp",
134 "ScopedGLHelpers.cpp",
136 "SharedSurfaceEGL.cpp",
137 "SharedSurfaceGL.cpp",
140 "GLScreenBuffer.cpp",
147 include("/ipc/chromium/chromium-config.mozbuild")
149 FINAL_LIBRARY = "xul"
151 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
152 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
153 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
155 CXXFLAGS += ["-Werror=switch"]
157 if CONFIG["MOZ_WAYLAND"]:
158 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
159 CFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
161 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
163 "/gfx/cairo/cairo/src",