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",
24 "gfxBaseSharedMemorySurface.h",
35 "gfxFontInfoLoader.h",
36 "gfxFontPrefLangList.h",
37 "gfxFontSrcPrincipal.h",
40 "gfxFontVariations.h",
49 "gfxPlatformFontList.h",
54 "gfxSharedImageSurface.h",
62 "SoftwareVsyncSource.h",
67 EXPORTS.mozilla.gfx += [
70 "DisplayConfigWindows.h",
72 "PrintTargetThebes.h",
76 EXPORTS.mozilla.gfx += ["SkMemoryReporter.h"]
78 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
80 "gfxAndroidPlatform.h",
84 EXPORTS.mozilla.gfx += [
88 "gfxAndroidPlatform.cpp",
95 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
98 "gfxQuartzNativeDrawing.h",
101 EXPORTS.mozilla.gfx += [
105 "gfxCoreTextShaper.cpp",
107 "gfxPlatformMac.cpp",
108 "gfxQuartzNativeDrawing.cpp",
109 "gfxQuartzSurface.cpp",
112 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
117 EXPORTS.mozilla.gfx += [
122 "gfxFcPlatformFontList.cpp",
123 "gfxFT2FontBase.cpp",
125 "gfxPlatformGtk.cpp",
126 "PrintTargetPDF.cpp",
130 if CONFIG["MOZ_X11"]:
134 EXPORTS.mozilla.gfx += [
138 "gfxXlibSurface.cpp",
142 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
143 REQUIRES_UNIFIED_BUILD = True
148 "gfxWindowsNativeDrawing.h",
149 "gfxWindowsPlatform.h",
150 "gfxWindowsSurface.h",
152 EXPORTS.mozilla.gfx += [
154 "PrintTargetWindows.h",
157 "DisplayConfigWindows.cpp",
158 "gfxDWriteCommon.cpp",
159 "gfxDWriteFonts.cpp",
161 "gfxGDIFontList.cpp",
162 "gfxWindowsNativeDrawing.cpp",
163 "gfxWindowsPlatform.cpp",
164 "gfxWindowsSurface.cpp",
165 "PrintTargetPDF.cpp",
166 "PrintTargetWindows.cpp",
169 "gfxDWriteFontList.cpp",
172 # Are we targeting x86 or x64? If so, build gfxAlphaRecoverySSE2.cpp.
173 if CONFIG["INTEL_ARCHITECTURE"]:
174 SOURCES += ["gfxAlphaRecoverySSE2.cpp"]
175 # The file uses SSE2 intrinsics, so it needs special compile flags on some
177 SOURCES["gfxAlphaRecoverySSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
180 # Includes mac system header conflicting with point/size,
181 # and includes glxXlibSurface.h which drags in Xrender.h
183 # on X11, gfxDrawable.cpp includes X headers for an old workaround which
184 # we could consider removing soon (affects Ubuntus older than 10.04 LTS)
185 # which currently prevent it from joining UNIFIED_SOURCES.
187 # gfxFontUtils.cpp and gfxPlatform.cpp include mac system header conflicting with point/size
191 "PrintTargetThebes.cpp",
196 "gfxAlphaRecovery.cpp",
197 "gfxBaseSharedMemorySurface.cpp",
202 "gfxFontFeatures.cpp",
203 "gfxFontInfoLoader.cpp",
204 "gfxFontMissingGlyphs.cpp",
205 "gfxFontSrcPrincipal.cpp",
207 "gfxGlyphExtents.cpp",
208 "gfxGradientCache.cpp",
209 "gfxGraphiteShaper.cpp",
210 "gfxHarfBuzzShaper.cpp",
211 "gfxImageSurface.cpp",
214 "gfxPlatformFontList.cpp",
215 "gfxScriptItemizer.cpp",
219 "gfxUserFontSet.cpp",
221 "SharedFontList.cpp",
222 "SoftwareVsyncSource.cpp",
227 "SkMemoryReporter.cpp",
230 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
232 "gfxMacPlatformFontList.mm",
234 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
239 "DeviceManagerDx.cpp",
242 if CONFIG["MOZ_ENABLE_SKIA_PDF"]:
243 EXPORTS.mozilla.gfx += [
244 "PrintTargetSkPDF.h",
247 "PrintTargetSkPDF.cpp",
250 # We use ICU for normalization functions:
255 include("/ipc/chromium/chromium-config.mozbuild")
257 FINAL_LIBRARY = "xul"
261 "/dom/media/platforms/apple",
263 "/gfx/cairo/cairo/src",
266 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
267 DEFINES["MOZ_ENABLE_FREETYPE"] = True
269 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
270 for var in ("MOZ_ENABLE_D3D10_LAYER",):
274 CXXFLAGS += CONFIG["TK_CFLAGS"]
275 CFLAGS += CONFIG["TK_CFLAGS"]
277 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android"):
278 CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]
280 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
281 CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
283 if CONFIG["MOZ_WAYLAND"]:
284 CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
286 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
288 DEFINES["GRAPHITE2_STATIC"] = True
290 if CONFIG["CC_TYPE"] == "clang":
291 # Suppress warnings from Skia header files.
292 SOURCES["gfxPlatform.cpp"].flags += ["-Wno-implicit-fallthrough"]
294 CXXFLAGS += ["-Werror=switch"]