Bug 1708193 - Remove mozapps/extensions/internal/Content.js r=rpl
[gecko.git] / gfx / thebes / moz.build
blobbaa6f090a9a3a8d8b4873664a7ba873411d78bb5
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/.
7 with Files("*Text*"):
8     BUG_COMPONENT = ("Core", "Graphics: Text")
10 with Files("*DWrite*"):
11     BUG_COMPONENT = ("Core", "Graphics: Text")
13 XPIDL_SOURCES += [
14     "nsIFontLoadCompleteCallback.idl",
17 XPIDL_MODULE = "gfx"
19 EXPORTS += [
20     "DrawMode.h",
21     "gfx2DGlue.h",
22     "gfxAlphaRecovery.h",
23     "gfxASurface.h",
24     "gfxBaseSharedMemorySurface.h",
25     "gfxBlur.h",
26     "gfxColor.h",
27     "gfxContext.h",
28     "gfxDrawable.h",
29     "gfxEnv.h",
30     "gfxFailure.h",
31     "gfxFont.h",
32     "gfxFontConstants.h",
33     "gfxFontEntry.h",
34     "gfxFontFeatures.h",
35     "gfxFontInfoLoader.h",
36     "gfxFontPrefLangList.h",
37     "gfxFontSrcPrincipal.h",
38     "gfxFontSrcURI.h",
39     "gfxFontUtils.h",
40     "gfxFontVariations.h",
41     "gfxGradientCache.h",
42     "gfxImageSurface.h",
43     "gfxLineSegment.h",
44     "gfxMathTable.h",
45     "gfxMatrix.h",
46     "gfxOTSUtils.h",
47     "gfxPattern.h",
48     "gfxPlatform.h",
49     "gfxPlatformFontList.h",
50     "gfxPoint.h",
51     "gfxQuad.h",
52     "gfxQuaternion.h",
53     "gfxRect.h",
54     "gfxSharedImageSurface.h",
55     "gfxSkipChars.h",
56     "gfxSVGGlyphs.h",
57     "gfxTextRun.h",
58     "gfxTypes.h",
59     "gfxUserFontSet.h",
60     "gfxUtils.h",
61     "SharedFontList.h",
62     "SoftwareVsyncSource.h",
63     "ThebesRLBoxTypes.h",
64     "VsyncSource.h",
67 EXPORTS.mozilla.gfx += [
68     "D3D11Checks.h",
69     "DeviceManagerDx.h",
70     "DisplayConfigWindows.h",
71     "PrintTarget.h",
72     "PrintTargetThebes.h",
73     "ThebesRLBox.h",
76 EXPORTS.mozilla.gfx += ["SkMemoryReporter.h"]
78 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
79     EXPORTS += [
80         "gfxAndroidPlatform.h",
81         "gfxFT2FontBase.h",
82         "gfxFT2Fonts.h",
83     ]
84     EXPORTS.mozilla.gfx += [
85         "PrintTargetPDF.h",
86     ]
87     SOURCES += [
88         "gfxAndroidPlatform.cpp",
89         "gfxFT2FontBase.cpp",
90         "gfxFT2FontList.cpp",
91         "gfxFT2Fonts.cpp",
92         "gfxFT2Utils.cpp",
93         "PrintTargetPDF.cpp",
94     ]
95 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
96     EXPORTS += [
97         "gfxPlatformMac.h",
98         "gfxQuartzNativeDrawing.h",
99         "gfxQuartzSurface.h",
100     ]
101     EXPORTS.mozilla.gfx += [
102         "PrintTargetCG.h",
103     ]
104     SOURCES += [
105         "gfxCoreTextShaper.cpp",
106         "gfxMacFont.cpp",
107         "gfxPlatformMac.cpp",
108         "gfxQuartzNativeDrawing.cpp",
109         "gfxQuartzSurface.cpp",
110         "PrintTargetCG.mm",
111     ]
112 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
113     EXPORTS += [
114         "gfxFT2FontBase.h",
115         "gfxPlatformGtk.h",
116     ]
117     EXPORTS.mozilla.gfx += [
118         "PrintTargetPDF.h",
119         "PrintTargetPS.h",
120     ]
121     SOURCES += [
122         "gfxFcPlatformFontList.cpp",
123         "gfxFT2FontBase.cpp",
124         "gfxFT2Utils.cpp",
125         "gfxPlatformGtk.cpp",
126         "PrintTargetPDF.cpp",
127         "PrintTargetPS.cpp",
128     ]
130     if CONFIG["MOZ_X11"]:
131         EXPORTS += [
132             "gfxXlibSurface.h",
133         ]
134         EXPORTS.mozilla.gfx += [
135             "XlibDisplay.h",
136         ]
137         SOURCES += [
138             "gfxXlibSurface.cpp",
139             "XlibDisplay.cpp",
140         ]
142 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
143     REQUIRES_UNIFIED_BUILD = True
144     EXPORTS += [
145         "gfxDWriteFonts.h",
146         "gfxGDIFont.h",
147         "gfxGDIFontList.h",
148         "gfxWindowsNativeDrawing.h",
149         "gfxWindowsPlatform.h",
150         "gfxWindowsSurface.h",
151     ]
152     EXPORTS.mozilla.gfx += [
153         "PrintTargetPDF.h",
154         "PrintTargetWindows.h",
155     ]
156     SOURCES += [
157         "DisplayConfigWindows.cpp",
158         "gfxDWriteCommon.cpp",
159         "gfxDWriteFonts.cpp",
160         "gfxGDIFont.cpp",
161         "gfxGDIFontList.cpp",
162         "gfxWindowsNativeDrawing.cpp",
163         "gfxWindowsPlatform.cpp",
164         "gfxWindowsSurface.cpp",
165         "PrintTargetPDF.cpp",
166         "PrintTargetWindows.cpp",
167     ]
168     UNIFIED_SOURCES += [
169         "gfxDWriteFontList.cpp",
170     ]
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
176     # compilers.
177     SOURCES["gfxAlphaRecoverySSE2.cpp"].flags += CONFIG["SSE2_FLAGS"]
179 SOURCES += [
180     # Includes mac system header conflicting with point/size,
181     # and includes glxXlibSurface.h which drags in Xrender.h
182     "gfxASurface.cpp",
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.
186     "gfxDrawable.cpp",
187     # gfxFontUtils.cpp and gfxPlatform.cpp include mac system header conflicting with point/size
188     "gfxFontUtils.cpp",
189     "gfxPlatform.cpp",
190     "PrintTarget.cpp",
191     "PrintTargetThebes.cpp",
194 UNIFIED_SOURCES += [
195     "CJKCompatSVS.cpp",
196     "gfxAlphaRecovery.cpp",
197     "gfxBaseSharedMemorySurface.cpp",
198     "gfxBlur.cpp",
199     "gfxContext.cpp",
200     "gfxFont.cpp",
201     "gfxFontEntry.cpp",
202     "gfxFontFeatures.cpp",
203     "gfxFontInfoLoader.cpp",
204     "gfxFontMissingGlyphs.cpp",
205     "gfxFontSrcPrincipal.cpp",
206     "gfxFontSrcURI.cpp",
207     "gfxGlyphExtents.cpp",
208     "gfxGradientCache.cpp",
209     "gfxGraphiteShaper.cpp",
210     "gfxHarfBuzzShaper.cpp",
211     "gfxImageSurface.cpp",
212     "gfxMathTable.cpp",
213     "gfxPattern.cpp",
214     "gfxPlatformFontList.cpp",
215     "gfxScriptItemizer.cpp",
216     "gfxSkipChars.cpp",
217     "gfxSVGGlyphs.cpp",
218     "gfxTextRun.cpp",
219     "gfxUserFontSet.cpp",
220     "gfxUtils.cpp",
221     "SharedFontList.cpp",
222     "SoftwareVsyncSource.cpp",
223     "VsyncSource.cpp",
226 UNIFIED_SOURCES += [
227     "SkMemoryReporter.cpp",
230 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
231     UNIFIED_SOURCES += [
232         "gfxMacPlatformFontList.mm",
233     ]
234 elif CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
235     UNIFIED_SOURCES += [
236         "D3D11Checks.cpp",
237     ]
238     SOURCES += [
239         "DeviceManagerDx.cpp",
240     ]
242 if CONFIG["MOZ_ENABLE_SKIA_PDF"]:
243     EXPORTS.mozilla.gfx += [
244         "PrintTargetSkPDF.h",
245     ]
246     SOURCES += [
247         "PrintTargetSkPDF.cpp",
248     ]
250 # We use ICU for normalization functions:
251 USE_LIBS += [
252     "icu",
255 include("/ipc/chromium/chromium-config.mozbuild")
257 FINAL_LIBRARY = "xul"
259 LOCAL_INCLUDES += [
260     "!/security/rlbox",
261     "/dom/base",
262     "/dom/media/platforms/apple",
263     "/dom/xml",
264     "/gfx/cairo/cairo/src",
267 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
268     DEFINES["MOZ_ENABLE_FREETYPE"] = True
270 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
271     for var in ("MOZ_ENABLE_D3D10_LAYER",):
272         if CONFIG[var]:
273             DEFINES[var] = True
275 CXXFLAGS += CONFIG["TK_CFLAGS"]
276 CFLAGS += CONFIG["TK_CFLAGS"]
278 if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android"):
279     CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]
281 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
282     CXXFLAGS += CONFIG["MOZ_PANGO_CFLAGS"]
284 if CONFIG["MOZ_WAYLAND"]:
285     CXXFLAGS += CONFIG["MOZ_WAYLAND_CFLAGS"]
287 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
289 DEFINES["GRAPHITE2_STATIC"] = True
291 if CONFIG["CC_TYPE"] == "clang":
292     # Suppress warnings from Skia header files.
293     SOURCES["gfxPlatform.cpp"].flags += ["-Wno-implicit-fallthrough"]
295 CXXFLAGS += ["-Werror=switch"]