|
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/. |
|
6 |
|
7 EXPORTS += [ |
|
8 'basic/BasicCanvasLayer.h', |
|
9 'basic/BasicImplData.h', |
|
10 'basic/BasicLayers.h', |
|
11 'basic/BasicLayersImpl.h', |
|
12 'basic/BasicThebesLayer.h', |
|
13 'client/ClientCanvasLayer.h', |
|
14 'client/ClientContainerLayer.h', |
|
15 'client/ClientLayerManager.h', |
|
16 'client/ClientThebesLayer.h', |
|
17 'client/ClientTiledThebesLayer.h', |
|
18 'composite/CompositableHost.h', |
|
19 'composite/ImageHost.h', |
|
20 'CopyableCanvasLayer.h', |
|
21 'D3D9SurfaceImage.h', |
|
22 'FrameMetrics.h', |
|
23 'GrallocImages.h', |
|
24 'ImageContainer.h', |
|
25 'ImageLayers.h', |
|
26 'ImageTypes.h', |
|
27 'ipc/CompositorChild.h', |
|
28 'ipc/CompositorParent.h', |
|
29 'ipc/ShadowLayersManager.h', |
|
30 'Layers.h', |
|
31 'LayerScope.h', |
|
32 'LayersLogging.h', |
|
33 'LayerSorter.h', |
|
34 'LayerTreeInvalidation.h', |
|
35 'opengl/Composer2D.h', |
|
36 'opengl/OGLShaderProgram.h', |
|
37 'opengl/TexturePoolOGL.h', |
|
38 'ReadbackLayer.h', |
|
39 'SharedTextureImage.h', |
|
40 'TiledLayerBuffer.h', |
|
41 ] |
|
42 |
|
43 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'windows': |
|
44 UNIFIED_SOURCES += [ |
|
45 'D3D9SurfaceImage.cpp', |
|
46 ] |
|
47 if CONFIG['MOZ_ENABLE_D3D9_LAYER']: |
|
48 EXPORTS += [ |
|
49 'd3d9/DeviceManagerD3D9.h', |
|
50 'd3d9/LayerManagerD3D9.h', |
|
51 ] |
|
52 EXPORTS.mozilla.layers += [ |
|
53 'd3d9/CompositorD3D9.h', |
|
54 'd3d9/TextureD3D9.h', |
|
55 ] |
|
56 UNIFIED_SOURCES += [ |
|
57 'd3d9/CanvasLayerD3D9.cpp', |
|
58 'd3d9/ColorLayerD3D9.cpp', |
|
59 'd3d9/ContainerLayerD3D9.cpp', |
|
60 'd3d9/ImageLayerD3D9.cpp', |
|
61 'd3d9/LayerManagerD3D9.cpp', |
|
62 'd3d9/TextureD3D9.cpp', |
|
63 'd3d9/ThebesLayerD3D9.cpp', |
|
64 ] |
|
65 SOURCES += [ |
|
66 'd3d9/CompositorD3D9.cpp', |
|
67 'd3d9/DeviceManagerD3D9.cpp', |
|
68 'd3d9/Nv3DVUtils.cpp', |
|
69 ] |
|
70 if CONFIG['MOZ_ENABLE_D3D10_LAYER']: |
|
71 EXPORTS += [ |
|
72 'd3d10/LayerManagerD3D10.h', |
|
73 'd3d10/ReadbackManagerD3D10.h', |
|
74 ] |
|
75 EXPORTS.mozilla.layers += [ |
|
76 'd3d11/CompositorD3D11.h', |
|
77 'd3d11/TextureD3D11.h', |
|
78 'ipc/ShadowLayerUtilsD3D10.h', |
|
79 ] |
|
80 UNIFIED_SOURCES += [ |
|
81 'd3d10/CanvasLayerD3D10.cpp', |
|
82 'd3d10/ColorLayerD3D10.cpp', |
|
83 'd3d10/ContainerLayerD3D10.cpp', |
|
84 'd3d10/ImageLayerD3D10.cpp', |
|
85 'd3d10/LayerManagerD3D10.cpp', |
|
86 'd3d10/ReadbackManagerD3D10.cpp', |
|
87 'd3d10/ThebesLayerD3D10.cpp', |
|
88 'd3d11/TextureD3D11.cpp', |
|
89 'ipc/ShadowLayerUtilsD3D10.cpp', |
|
90 ] |
|
91 SOURCES += [ |
|
92 'd3d11/CompositorD3D11.cpp', |
|
93 ] |
|
94 |
|
95 EXPORTS.gfxipc += [ |
|
96 'ipc/ShadowLayerUtils.h', |
|
97 ] |
|
98 |
|
99 EXPORTS.mozilla.layers += [ |
|
100 'apz/public/GeckoContentController.h', |
|
101 # exporting things from apz/src is temporary until we extract a |
|
102 # proper interface for the code there |
|
103 'apz/src/APZCTreeManager.h', |
|
104 'apz/src/AsyncPanZoomController.h', |
|
105 'apz/src/Axis.h', |
|
106 'apz/src/GestureEventListener.h', |
|
107 'apz/src/TaskThrottler.h', |
|
108 'apz/util/ActiveElementManager.h', |
|
109 'apz/util/APZCCallbackHelper.h', |
|
110 'AtomicRefCountedWithFinalize.h', |
|
111 'basic/BasicCompositor.h', |
|
112 'basic/MacIOSurfaceTextureHostBasic.h', |
|
113 'basic/TextureHostBasic.h', |
|
114 'client/CanvasClient.h', |
|
115 'client/CompositableClient.h', |
|
116 'client/ContentClient.h', |
|
117 'client/ImageClient.h', |
|
118 'client/SimpleTextureClientPool.h', |
|
119 'client/SimpleTiledContentClient.h', |
|
120 'client/TextureClient.h', |
|
121 'client/TextureClientPool.h', |
|
122 'client/TiledContentClient.h', |
|
123 'composite/AsyncCompositionManager.h', |
|
124 'composite/CanvasLayerComposite.h', |
|
125 'composite/ColorLayerComposite.h', |
|
126 'composite/ContainerLayerComposite.h', |
|
127 'composite/ContentHost.h', |
|
128 'composite/ImageHost.h', |
|
129 'composite/ImageLayerComposite.h', |
|
130 'composite/LayerManagerComposite.h', |
|
131 'composite/TextureHost.h', |
|
132 'composite/ThebesLayerComposite.h', |
|
133 'Compositor.h', |
|
134 'CompositorTypes.h', |
|
135 'D3D9SurfaceImage.h', |
|
136 'Effects.h', |
|
137 'ImageDataSerializer.h', |
|
138 'ipc/CompositableForwarder.h', |
|
139 'ipc/CompositableTransactionParent.h', |
|
140 'ipc/CompositorChild.h', |
|
141 'ipc/CompositorParent.h', |
|
142 'ipc/FenceUtils.h', |
|
143 'ipc/ImageBridgeChild.h', |
|
144 'ipc/ImageBridgeParent.h', |
|
145 'ipc/ISurfaceAllocator.h', |
|
146 'ipc/LayerTransactionChild.h', |
|
147 'ipc/LayerTransactionParent.h', |
|
148 'ipc/ShadowLayers.h', |
|
149 'ipc/ShadowLayersManager.h', |
|
150 'ipc/SharedPlanarYCbCrImage.h', |
|
151 'ipc/SharedRGBImage.h', |
|
152 'LayersTypes.h', |
|
153 'opengl/CompositingRenderTargetOGL.h', |
|
154 'opengl/CompositorOGL.h', |
|
155 'opengl/GrallocTextureClient.h', |
|
156 'opengl/GrallocTextureHost.h', |
|
157 'opengl/MacIOSurfaceTextureClientOGL.h', |
|
158 'opengl/MacIOSurfaceTextureHostOGL.h', |
|
159 'opengl/TextureClientOGL.h', |
|
160 'opengl/TextureHostOGL.h', |
|
161 'RenderTrace.h', |
|
162 'YCbCrImageDataSerializer.h', |
|
163 ] |
|
164 |
|
165 if CONFIG['MOZ_X11']: |
|
166 EXPORTS.mozilla.layers += [ |
|
167 'basic/TextureClientX11.h', |
|
168 'basic/X11TextureSourceBasic.h', |
|
169 'composite/X11TextureHost.h', |
|
170 'ipc/ShadowLayerUtilsX11.h', |
|
171 'opengl/X11TextureSourceOGL.h', |
|
172 ] |
|
173 SOURCES += [ |
|
174 'basic/TextureClientX11.cpp', |
|
175 'basic/X11TextureSourceBasic.cpp', |
|
176 'composite/X11TextureHost.cpp', |
|
177 'ipc/ShadowLayerUtilsX11.cpp', |
|
178 'opengl/X11TextureSourceOGL.cpp', |
|
179 ] |
|
180 |
|
181 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
182 EXPORTS.mozilla.layers += [ |
|
183 'opengl/GLManager.h', |
|
184 ] |
|
185 EXPORTS += [ |
|
186 'MacIOSurfaceImage.h', |
|
187 ] |
|
188 UNIFIED_SOURCES += [ |
|
189 'opengl/GLManager.cpp', |
|
190 ] |
|
191 SOURCES += [ |
|
192 'ipc/ShadowLayerUtilsMac.cpp', |
|
193 'MacIOSurfaceImage.cpp', |
|
194 ] |
|
195 |
|
196 # NB: Gralloc is available on other platforms that use the android GL |
|
197 # libraries, but only Gonk is able to use it reliably because Gecko |
|
198 # has full system permissions there. |
|
199 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'gonk': |
|
200 EXPORTS.mozilla.layers += [ |
|
201 'ipc/ShadowLayerUtilsGralloc.h', |
|
202 ] |
|
203 UNIFIED_SOURCES += [ |
|
204 'GrallocImages.cpp', |
|
205 'opengl/EGLImageHelpers.cpp', |
|
206 'opengl/GrallocTextureClient.cpp', |
|
207 'opengl/GrallocTextureHost.cpp', |
|
208 ] |
|
209 LOCAL_INCLUDES += ['/widget/gonk'] |
|
210 SOURCES += [ |
|
211 'ipc/ShadowLayerUtilsGralloc.cpp', |
|
212 ] |
|
213 |
|
214 if CONFIG['ANDROID_VERSION'] >= '17': |
|
215 EXPORTS.mozilla.layers += [ |
|
216 'ipc/FenceUtilsGonk.h', |
|
217 ] |
|
218 SOURCES += [ |
|
219 'ipc/FenceUtilsGonk.cpp', |
|
220 ] |
|
221 |
|
222 UNIFIED_SOURCES += [ |
|
223 'apz/src/APZCTreeManager.cpp', |
|
224 'apz/src/AsyncPanZoomController.cpp', |
|
225 'apz/src/Axis.cpp', |
|
226 'apz/src/GestureEventListener.cpp', |
|
227 'apz/src/TaskThrottler.cpp', |
|
228 'apz/util/ActiveElementManager.cpp', |
|
229 'apz/util/APZCCallbackHelper.cpp', |
|
230 'basic/BasicCanvasLayer.cpp', |
|
231 'basic/BasicColorLayer.cpp', |
|
232 'basic/BasicCompositor.cpp', |
|
233 'basic/BasicContainerLayer.cpp', |
|
234 'basic/BasicImages.cpp', |
|
235 'basic/BasicLayerManager.cpp', |
|
236 'basic/BasicLayersImpl.cpp', |
|
237 'basic/BasicThebesLayer.cpp', |
|
238 'basic/TextureHostBasic.cpp', |
|
239 'BufferUnrotate.cpp', |
|
240 'client/CanvasClient.cpp', |
|
241 'client/ClientCanvasLayer.cpp', |
|
242 'client/ClientColorLayer.cpp', |
|
243 'client/ClientContainerLayer.cpp', |
|
244 'client/ClientImageLayer.cpp', |
|
245 'client/ClientLayerManager.cpp', |
|
246 'client/ClientThebesLayer.cpp', |
|
247 'client/ClientTiledThebesLayer.cpp', |
|
248 'client/CompositableClient.cpp', |
|
249 'client/ContentClient.cpp', |
|
250 'client/ImageClient.cpp', |
|
251 'client/SimpleTextureClientPool.cpp', |
|
252 'client/SimpleTiledContentClient.cpp', |
|
253 'client/TextureClient.cpp', |
|
254 'client/TextureClientPool.cpp', |
|
255 'client/TiledContentClient.cpp', |
|
256 'composite/AsyncCompositionManager.cpp', |
|
257 'composite/CanvasLayerComposite.cpp', |
|
258 'composite/ColorLayerComposite.cpp', |
|
259 'composite/CompositableHost.cpp', |
|
260 'composite/ContainerLayerComposite.cpp', |
|
261 'composite/ContentHost.cpp', |
|
262 'composite/ImageHost.cpp', |
|
263 'composite/ImageLayerComposite.cpp', |
|
264 'composite/LayerManagerComposite.cpp', |
|
265 'composite/TextRenderer.cpp', |
|
266 'composite/TextureHost.cpp', |
|
267 'composite/ThebesLayerComposite.cpp', |
|
268 'composite/TiledContentHost.cpp', |
|
269 'Compositor.cpp', |
|
270 'CopyableCanvasLayer.cpp', |
|
271 'Effects.cpp', |
|
272 'ImageDataSerializer.cpp', |
|
273 'ImageLayers.cpp', |
|
274 'ipc/CompositableTransactionParent.cpp', |
|
275 'ipc/CompositorChild.cpp', |
|
276 'ipc/CompositorParent.cpp', |
|
277 'ipc/ImageBridgeChild.cpp', |
|
278 'ipc/ImageBridgeParent.cpp', |
|
279 'ipc/ISurfaceAllocator.cpp', |
|
280 'ipc/LayerTransactionChild.cpp', |
|
281 'ipc/LayerTransactionParent.cpp', |
|
282 'ipc/ShadowLayerChild.cpp', |
|
283 'ipc/ShadowLayerParent.cpp', |
|
284 'ipc/ShadowLayers.cpp', |
|
285 'ipc/SharedPlanarYCbCrImage.cpp', |
|
286 'ipc/SharedRGBImage.cpp', |
|
287 'LayerScope.cpp', |
|
288 'LayersLogging.cpp', |
|
289 'LayerSorter.cpp', |
|
290 'LayerUtils.cpp', |
|
291 'opengl/CompositingRenderTargetOGL.cpp', |
|
292 'opengl/CompositorOGL.cpp', |
|
293 'opengl/OGLShaderProgram.cpp', |
|
294 'opengl/TextureClientOGL.cpp', |
|
295 'opengl/TextureHostOGL.cpp', |
|
296 'opengl/TexturePoolOGL.cpp', |
|
297 'ReadbackProcessor.cpp', |
|
298 'RenderTrace.cpp', |
|
299 'RotatedBuffer.cpp', |
|
300 'YCbCrImageDataSerializer.cpp', |
|
301 ] |
|
302 |
|
303 SOURCES += [ |
|
304 'basic/BasicImageLayer.cpp', |
|
305 'ImageContainer.cpp', |
|
306 'Layers.cpp', |
|
307 'LayerTreeInvalidation.cpp', |
|
308 ] |
|
309 |
|
310 # Workaround compiler bug (Bug 795594) |
|
311 if CONFIG['_MSC_VER'] and CONFIG['CPU_ARCH'] == 'x86_64': |
|
312 for src in [ |
|
313 'Layers.cpp', |
|
314 'LayerTreeInvalidation.cpp', |
|
315 ]: |
|
316 SOURCES[src].no_pgo = True |
|
317 |
|
318 if CONFIG['MOZ_WIDGET_TOOLKIT'] == 'cocoa': |
|
319 SOURCES += [ |
|
320 'basic/MacIOSurfaceTextureHostBasic.cpp', |
|
321 'opengl/MacIOSurfaceTextureClientOGL.cpp', |
|
322 'opengl/MacIOSurfaceTextureHostOGL.cpp', |
|
323 ] |
|
324 |
|
325 IPDL_SOURCES = [ |
|
326 'ipc/LayersMessages.ipdlh', |
|
327 'ipc/LayersSurfaces.ipdlh', |
|
328 'ipc/PCompositable.ipdl', |
|
329 'ipc/PCompositor.ipdl', |
|
330 'ipc/PGrallocBuffer.ipdl', |
|
331 'ipc/PImageBridge.ipdl', |
|
332 'ipc/PLayer.ipdl', |
|
333 'ipc/PLayerTransaction.ipdl', |
|
334 'ipc/PTexture.ipdl', |
|
335 ] |
|
336 |
|
337 FAIL_ON_WARNINGS = True |
|
338 |
|
339 MSVC_ENABLE_PGO = True |
|
340 |
|
341 include('/ipc/chromium/chromium-config.mozbuild') |
|
342 |
|
343 FINAL_LIBRARY = 'thebes' |
|
344 |
|
345 if CONFIG['MOZ_DEBUG']: |
|
346 DEFINES['D3D_DEBUG_INFO'] = True |
|
347 |
|
348 if CONFIG['MOZ_ENABLE_D3D10_LAYER']: |
|
349 DEFINES['MOZ_ENABLE_D3D10_LAYER'] = True |
|
350 |
|
351 GENERATED_FILES = [ |
|
352 'PremultiplyTables.h', |
|
353 ] |
|
354 |
|
355 CXXFLAGS += [ |
|
356 '-I%s/%s' % (CONFIG['ANDROID_SOURCE'], d) for d in [ |
|
357 'frameworks/base/include/media/stagefright', |
|
358 'frameworks/base/include/media/stagefright/openmax', |
|
359 'frameworks/av/include/media/stagefright', |
|
360 'frameworks/native/include/media/openmax', |
|
361 ] |
|
362 ] |