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/.
8 BUG_COMPONENT = ("Core", "Graphics: Text")
10 with Files("*DWrite*"):
11 BUG_COMPONENT = ("Core", "Graphics: Text")
14 "nsIFontLoadCompleteCallback.idl",
25 "gfxBaseSharedMemorySurface.h",
36 "gfxFontInfoLoader.h",
37 "gfxFontPrefLangList.h",
38 "gfxFontSrcPrincipal.h",
41 "gfxFontVariations.h",
50 "gfxPlatformFontList.h",
51 "gfxPlatformWorker.h",
56 "gfxSharedImageSurface.h",
64 "SoftwareVsyncSource.h",
69 EXPORTS.mozilla.gfx += [
73 "DisplayConfigWindows.h",
76 "PrintTargetThebes.h",
80 EXPORTS.mozilla.gfx += ["SkMemoryReporter.h"]
82 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
84 "gfxAndroidPlatform.h",
88 EXPORTS.mozilla.gfx += [
92 "gfxAndroidPlatform.cpp",
99 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
103 "gfxQuartzNativeDrawing.h",
104 "gfxQuartzSurface.h",
106 EXPORTS.mozilla.gfx += [
110 "gfxCoreTextShaper.cpp",
113 "gfxPlatformMac.cpp",
114 "gfxQuartzNativeDrawing.cpp",
115 "gfxQuartzSurface.cpp",
118 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
123 EXPORTS.mozilla.gfx += [
127 "gfxFcPlatformFontList.cpp",
128 "gfxFT2FontBase.cpp",
130 "gfxPlatformGtk.cpp",
131 "PrintTargetPDF.cpp",
134 if CONFIG["MOZ_X11"]:
138 EXPORTS.mozilla.gfx += [
142 "gfxXlibSurface.cpp",
146 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
147 REQUIRES_UNIFIED_BUILD = True
153 "gfxWindowsNativeDrawing.h",
154 "gfxWindowsPlatform.h",
155 "gfxWindowsSurface.h",
157 EXPORTS.mozilla.gfx += [
159 "PrintTargetWindows.h",
162 "DisplayConfigWindows.cpp",
163 "gfxDWriteCommon.cpp",
164 "gfxDWriteFonts.cpp",
166 "gfxGDIFontList.cpp",
167 "gfxWindowsNativeDrawing.cpp",
168 "gfxWindowsPlatform.cpp",
169 "gfxWindowsSurface.cpp",
170 "PrintTargetPDF.cpp",
171 "PrintTargetWindows.cpp",
174 "gfxDWriteFontList.cpp",
177 # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp.
178 if CONFIG["INTEL_ARCHITECTURE"]:
179 SOURCES += ["gfxAlphaRecoverySSE2.cpp"]
180 # The file uses SSE2 intrinsics, so it needs special compile flags on some
182 SOURCES["gfxAlphaRecoverySSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
185 # Includes mac system header conflicting with point/size,
186 # and includes glxXlibSurface.h which drags in Xrender.h
188 # on X11, gfxDrawable.cpp includes X headers for an old workaround which
189 # we could consider removing soon (affects Ubuntus older than 10.04 LTS)
190 # which currently prevent it from joining UNIFIED_SOURCES.
192 # gfxFontUtils.cpp and gfxPlatform.cpp include mac system header conflicting with point/size
196 "PrintTargetThebes.cpp",
202 "gfxAlphaRecovery.cpp",
203 "gfxBaseSharedMemorySurface.cpp",
208 "gfxFontFeatures.cpp",
209 "gfxFontInfoLoader.cpp",
210 "gfxFontMissingGlyphs.cpp",
211 "gfxFontSrcPrincipal.cpp",
213 "gfxGlyphExtents.cpp",
214 "gfxGradientCache.cpp",
215 "gfxGraphiteShaper.cpp",
216 "gfxHarfBuzzShaper.cpp",
217 "gfxImageSurface.cpp",
220 "gfxPlatformFontList.cpp",
221 "gfxPlatformWorker.cpp",
222 "gfxScriptItemizer.cpp",
226 "gfxUserFontSet.cpp",
228 "SharedFontList.cpp",
229 "SoftwareVsyncSource.cpp",
234 "SkMemoryReporter.cpp",
237 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
239 "gfxMacPlatformFontList.mm",
241 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
246 "DeviceManagerDx.cpp",
249 if CONFIG["MOZ_ENABLE_SKIA_PDF"]:
250 EXPORTS.mozilla.gfx += [
251 "PrintTargetSkPDF.h",
254 "PrintTargetSkPDF.cpp",
257 # We use ICU for normalization functions:
262 include("/ipc/chromium/chromium-config.mozbuild")
264 FINAL_LIBRARY = "xul"
269 "/dom/media/platforms/apple",
271 "/gfx/cairo/cairo/src",
275 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
276 DEFINES["MOZ_ENABLE_FREETYPE"] = True
278 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
279 for var in ("MOZ_ENABLE_D3D10_LAYER",):
283 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android"):
284 CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]
286 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
287 CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
288 CFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
289 CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
291 if CONFIG["MOZ_WAYLAND"]:
292 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
294 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
296 DEFINES["GRAPHITE2_STATIC"] = True
298 CXXFLAGS += ["-Werror=switch"]
300 include("/tools/fuzzing/libfuzzer-config.mozbuild")