Bumping manifests a=b2g-bump
[gecko.git] / gfx / thebes / moz.build
blob61d6b0a6908ce67c8634aa239d199fad523cc295
1 # -*- Mode: python; c-basic-offset: 4; 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 EXPORTS += [
8     'DrawMode.h',
9     'gfx2DGlue.h',
10     'gfx3DMatrix.h',
11     'gfxAlphaRecovery.h',
12     'gfxASurface.h',
13     'gfxBaseSharedMemorySurface.h',
14     'gfxBlur.h',
15     'gfxColor.h',
16     'gfxContext.h',
17     'gfxDrawable.h',
18     'gfxFailure.h',
19     'gfxFont.h',
20     'gfxFontConstants.h',
21     'gfxFontFamilyList.h',
22     'gfxFontFeatures.h',
23     'gfxFontInfoLoader.h',
24     'gfxFontTest.h',
25     'gfxFontUtils.h',
26     'gfxGradientCache.h',
27     'gfxImageSurface.h',
28     'gfxLineSegment.h',
29     'gfxMathTable.h',
30     'gfxMatrix.h',
31     'gfxPattern.h',
32     'gfxPlatform.h',
33     'gfxPoint.h',
34     'gfxPrefs.h',
35     'gfxQuad.h',
36     'gfxQuaternion.h',
37     'gfxRect.h',
38     'gfxReusableImageSurfaceWrapper.h',
39     'gfxReusableSharedImageSurfaceWrapper.h',
40     'gfxReusableSurfaceWrapper.h',
41     'gfxSharedImageSurface.h',
42     'gfxSharedQuartzSurface.h',
43     'gfxSkipChars.h',
44     'gfxSVGGlyphs.h',
45     'gfxTeeSurface.h',
46     'gfxTypes.h',
47     'gfxUserFontSet.h',
48     'gfxUtils.h',
49     'GraphicsFilter.h',
50     'RoundedRect.h',
53 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
54     EXPORTS += [
55         'gfxAndroidPlatform.h',
56         'gfxFT2FontBase.h',
57         'gfxFT2Fonts.h',
58         'gfxPDFSurface.h',
59     ]
60     SOURCES += [
61         'gfxAndroidPlatform.cpp',
62         'gfxFT2FontBase.cpp',
63         'gfxFT2FontList.cpp',
64         'gfxFT2Fonts.cpp',
65         'gfxFT2Utils.cpp',
66         'gfxPDFSurface.cpp',
67     ]
68 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk':
69     EXPORTS += [
70         'gfxAndroidPlatform.h',
71         'gfxFT2FontBase.h',
72         'gfxFT2Fonts.h',
73         'gfxPDFSurface.h',
74     ]
75     SOURCES += [
76         'gfxAndroidPlatform.cpp',
77         'gfxFT2FontBase.cpp',
78         'gfxFT2FontList.cpp',
79         'gfxFT2Fonts.cpp',
80         'gfxFT2Utils.cpp',
81         'gfxPDFSurface.cpp',
82     ]
83 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
84     EXPORTS += [
85         'gfxPlatformMac.h',
86         'gfxQuartzImageSurface.h',
87         'gfxQuartzNativeDrawing.h',
88         'gfxQuartzSurface.h',
89     ]
90     SOURCES += [
91         'gfxCoreTextShaper.cpp',
92         'gfxMacFont.cpp',
93         'gfxPlatformMac.cpp',
94         'gfxQuartzImageSurface.cpp',
95         'gfxQuartzNativeDrawing.cpp',
96         'gfxQuartzSurface.cpp',
97     ]
98 elif CONFIG['MOZ_WIDGET_GTK']:
99     EXPORTS += [
100         'gfxFT2FontBase.h',
101         'gfxGdkNativeRenderer.h',
102         'gfxPangoFonts.h',
103         'gfxPDFSurface.h',
104         'gfxPlatformGtk.h',
105         'gfxPSSurface.h',
106     ]
108     SOURCES += [
109         'gfxFontconfigUtils.cpp',
110         'gfxFT2FontBase.cpp',
111         'gfxFT2Utils.cpp',
112         'gfxGdkNativeRenderer.cpp',
113         'gfxPangoFonts.cpp',
114         'gfxPDFSurface.cpp',
115         'gfxPlatformGtk.cpp',
116         'gfxPSSurface.cpp',
117     ]
119     if CONFIG['MOZ_X11']:
120         EXPORTS += [
121             'gfxXlibNativeRenderer.h',
122             'gfxXlibSurface.h',
123         ]
124         SOURCES += [
125             'gfxXlibNativeRenderer.cpp',
126             'gfxXlibSurface.cpp',
127         ]
129 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'qt':
130     EXPORTS += [
131         'gfxFT2FontBase.h',
132         'gfxPangoFonts.h',
133         'gfxPDFSurface.h',
134         'gfxQPainterSurface.h',
135         'gfxQtNativeRenderer.h',
136         'gfxQtPlatform.h',
137     ]
138     SOURCES += [
139         'gfxFontconfigUtils.cpp',
140         'gfxFT2FontBase.cpp',
141         'gfxFT2Utils.cpp',
142         'gfxPangoFonts.cpp',
143         'gfxPDFSurface.cpp',
144         'gfxQPainterSurface.cpp',
145         'gfxQtPlatform.cpp',
146     ]
148     if CONFIG['MOZ_X11']:
149         EXPORTS += [
150             'gfxXlibSurface.h',
151         ]
152         SOURCES += [
153             'gfxQtNativeRenderer.cpp',
154             'gfxXlibSurface.cpp',
155         ]
157 elif CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
158     EXPORTS += [
159         'gfxD2DSurface.h',
160         'gfxDWriteFonts.h',
161         'gfxGDIFont.h',
162         'gfxGDIFontList.h',
163         'gfxPDFSurface.h',
164         'gfxPlatformFontList.h',
165         'gfxWindowsNativeDrawing.h',
166         'gfxWindowsPlatform.h',
167         'gfxWindowsSurface.h',
168     ]
169     # gfxGDIFontList.cpp forces NSPR logging, so it cannot be built in unified mode.
170     SOURCES += [
171         'gfxGDIFont.cpp',
172         'gfxGDIFontList.cpp',
173         'gfxPDFSurface.cpp',
174         'gfxWindowsNativeDrawing.cpp',
175         'gfxWindowsPlatform.cpp',
176         'gfxWindowsSurface.cpp',
177     ]
178     if CONFIG['MOZ_ENABLE_DWRITE_FONT']:
179         # gfxDWriteFontList.cpp forces NSPR logging, so it cannot be built in unified mode.
180         SOURCES += [
181             'gfxD2DSurface.cpp',
182             'gfxDWriteCommon.cpp',
183             'gfxDWriteFontList.cpp',
184             'gfxDWriteFonts.cpp',
185         ]
187 # Are we targeting x86 or x64?  If so, build gfxAlphaRecoverySSE2.cpp.
188 if CONFIG['INTEL_ARCHITECTURE']:
189     SOURCES += ['gfxAlphaRecoverySSE2.cpp']
190     # The file uses SSE2 intrinsics, so it needs special compile flags on some
191     # compilers.
192     SOURCES['gfxAlphaRecoverySSE2.cpp'].flags += CONFIG['SSE2_FLAGS']
194 SOURCES += [
195     # Includes mac system header conflicting with point/size,
196     # and includes glxXlibSurface.h which drags in Xrender.h
197     'gfxASurface.cpp',
198     # on X11, gfxDrawable.cpp includes X headers for an old workaround which
199     # we could consider removing soon (affects Ubuntus older than 10.04 LTS)
200     # which currently prevent it from joining UNIFIED_SOURCES.
201     'gfxDrawable.cpp',
202     # Uses FORCE_PR_LOG
203     'gfxFont.cpp',
204     # Uses FORCE_PR_LOG
205     'gfxFontUtils.cpp',
206     # Includes mac system header conflicting with point/size, and also uses FORCE_PR_LOG
207     'gfxPlatform.cpp',
208     # Uses FORCE_PR_LOG
209     'gfxPlatformFontList.cpp',
210     'gfxPrefs.cpp',
211     # Uses FORCE_PR_LOG
212     'gfxUserFontSet.cpp',
215 UNIFIED_SOURCES += [
216     'CJKCompatSVS.cpp',
217     'gfx3DMatrix.cpp',
218     'gfxAlphaRecovery.cpp',
219     'gfxBaseSharedMemorySurface.cpp',
220     'gfxBlur.cpp',
221     'gfxContext.cpp',
222     'gfxFontFeatures.cpp',
223     'gfxFontInfoLoader.cpp',
224     'gfxFontMissingGlyphs.cpp',
225     'gfxFontTest.cpp',
226     'gfxGradientCache.cpp',
227     'gfxGraphiteShaper.cpp',
228     'gfxHarfBuzzShaper.cpp',
229     'gfxImageSurface.cpp',
230     'gfxMathTable.cpp',
231     'gfxMatrix.cpp',
232     'gfxPattern.cpp',
233     'gfxRect.cpp',
234     'gfxReusableImageSurfaceWrapper.cpp',
235     'gfxReusableSharedImageSurfaceWrapper.cpp',
236     'gfxScriptItemizer.cpp',
237     'gfxSkipChars.cpp',
238     'gfxSVGGlyphs.cpp',
239     'gfxTeeSurface.cpp',
240     'gfxUtils.cpp',
241     'nsUnicodeRange.cpp',
244 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa':
245     # gfxMacPlatformFontList.mm forces NSPR logging so it cannot be built in unified mode.
246     SOURCES += [
247         'gfxMacPlatformFontList.mm',
248     ]
250 FAIL_ON_WARNINGS = not CONFIG['_MSC_VER']
252 MSVC_ENABLE_PGO = True
254 include('/ipc/chromium/chromium-config.mozbuild')
256 FINAL_LIBRARY = 'xul'
258 GENERATED_FILES = [
259     'DeprecatedPremultiplyTables.h',
262 LOCAL_INCLUDES += [
263     '/dom/xml',
266 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gtk2', 'gtk3', 'gonk', 'qt'):
267     DEFINES['MOZ_ENABLE_FREETYPE'] = True
269 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows':
270     for var in ('MOZ_ENABLE_D3D9_LAYER', 'MOZ_ENABLE_D3D10_LAYER'):
271         if CONFIG[var]:
272             DEFINES[var] = True
274 CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
275 CXXFLAGS += CONFIG['TK_CFLAGS']
276 CFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
277 CFLAGS += CONFIG['TK_CFLAGS']
279 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('android', 'gonk', 'qt'):
280     CXXFLAGS += CONFIG['CAIRO_FT_CFLAGS']
282 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'android':
283     # This is set for "normal Android", that is, when Gecko is running on
284     # top of the android java runtime.
285     DEFINES['MOZ_USING_ANDROID_JAVA_WIDGETS'] = True
287 if CONFIG['MOZ_WIDGET_TOOLKIT'] in ('gtk2', 'gtk3', 'qt'):
288     CXXFLAGS += CONFIG['MOZ_PANGO_CFLAGS']
290 DEFINES['GRAPHITE2_STATIC'] = True
292 if CONFIG['OS_TARGET'] == 'WINNT':
293     DEFINES['OTS_DLL'] = True