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: Layers")
11 BUG_COMPONENT = ("Core", "Panning and Zooming")
14 "basic/BasicCanvasLayer.h",
15 "basic/BasicImplData.h",
16 "basic/BasicLayers.h",
17 "basic/BasicLayersImpl.h",
18 "basic/BasicPaintedLayer.h",
19 "client/ClientCanvasLayer.h",
20 "client/ClientContainerLayer.h",
21 "client/ClientLayerManager.h",
22 "client/ClientPaintedLayer.h",
23 "client/ClientTiledPaintedLayer.h",
24 "composite/CompositableHost.h",
25 "composite/ImageHost.h",
39 "LayerTreeInvalidation.h",
41 "opengl/OGLShaderConfig.h",
42 "opengl/OGLShaderProgram.h",
43 "protobuf/LayerScopePacket.pb.h",
48 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
50 "D3D11ShareHandleImage.cpp",
51 "D3D11YCbCrImage.cpp",
54 "D3D9SurfaceImage.cpp",
58 EXPORTS.mozilla.layers += [
61 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
62 EXPORTS.mozilla.layers += [
63 "d3d11/CompositorD3D11.h",
64 "d3d11/DeviceAttachmentsD3D11.h",
65 "d3d11/DiagnosticsD3D11.h",
66 "d3d11/HelpersD3D11.h",
67 "d3d11/ReadbackManagerD3D11.h",
68 "d3d11/ShaderDefinitionsD3D11.h",
69 "d3d11/TextureD3D11.h",
72 "d3d11/DiagnosticsD3D11.cpp",
73 "d3d11/TextureD3D11.cpp",
76 "d3d11/CompositorD3D11.cpp",
77 "d3d11/DeviceAttachmentsD3D11.cpp",
78 "d3d11/ReadbackManagerD3D11.cpp",
82 "ipc/ShadowLayerUtils.h",
83 "ipc/SurfaceDescriptor.h",
86 EXPORTS.mozilla.dom += [
87 "apz/util/CheckerboardReportService.h",
90 EXPORTS.mozilla.gfx += [
94 EXPORTS.mozilla.layers += [
97 "AnimationStorageData.h",
98 "apz/public/APZInputBridge.h",
99 "apz/public/APZPublicUtils.h",
100 "apz/public/APZSampler.h",
101 "apz/public/APZUpdater.h",
102 "apz/public/CompositorController.h",
103 "apz/public/GeckoContentController.h",
104 "apz/public/GeckoContentControllerTypes.h",
105 "apz/public/IAPZCTreeManager.h",
106 "apz/public/MatrixMessage.h",
107 "apz/public/MetricsSharingController.h",
108 # exporting things from apz/src is temporary until we extract a
109 # proper interface for the code there
110 "apz/src/APZUtils.h",
111 "apz/src/AsyncDragMetrics.h",
112 "apz/src/FocusTarget.h",
113 "apz/src/KeyboardMap.h",
114 "apz/src/KeyboardScrollAction.h",
115 "apz/testutil/APZTestData.h",
116 "apz/util/ActiveElementManager.h",
117 "apz/util/APZCCallbackHelper.h",
118 "apz/util/APZEventState.h",
119 "apz/util/APZThreadUtils.h",
120 "apz/util/ChromeProcessController.h",
121 "apz/util/ContentProcessController.h",
122 "apz/util/DoubleTapToZoom.h",
123 "apz/util/InputAPZContext.h",
124 "apz/util/ScrollInputMethods.h",
125 "apz/util/ScrollLinkedEffectDetector.h",
126 "apz/util/TouchActionHelper.h",
127 "apz/util/TouchCounter.h",
128 "AtomicRefCountedWithFinalize.h",
129 "AxisPhysicsModel.h",
130 "AxisPhysicsMSDModel.h",
131 "basic/BasicCompositor.h",
132 "basic/MacIOSurfaceTextureHostBasic.h",
133 "basic/TextureHostBasic.h",
137 "CanvasDrawEventRecorder.h",
139 "client/CanvasClient.h",
140 "client/CompositableClient.h",
141 "client/ContentClient.h",
142 "client/GPUVideoTextureClient.h",
143 "client/ImageClient.h",
144 "client/MultiTiledContentClient.h",
145 "client/SingleTiledContentClient.h",
146 "client/TextureClient.h",
147 "client/TextureClientPool.h",
148 "client/TextureClientRecycleAllocator.h",
149 "client/TextureClientSharedSurface.h",
150 "client/TextureRecorded.h",
151 "client/TiledContentClient.h",
152 "composite/AsyncCompositionManager.h",
153 "composite/CanvasLayerComposite.h",
154 "composite/ColorLayerComposite.h",
155 "composite/ContainerLayerComposite.h",
156 "composite/ContentHost.h",
157 "composite/Diagnostics.h",
158 "composite/FPSCounter.h",
159 "composite/FrameUniformityData.h",
160 "composite/GPUVideoTextureHost.h",
161 "composite/ImageComposite.h",
162 "composite/ImageHost.h",
163 "composite/ImageLayerComposite.h",
164 "composite/LayerManagerComposite.h",
165 "composite/LayerManagerCompositeUtils.h",
166 "composite/PaintedLayerComposite.h",
167 "composite/TextRenderer.h",
168 "composite/TextureHost.h",
169 "composite/TiledContentHost.h",
170 "CompositionRecorder.h",
172 "CompositorAnimationStorage.h",
174 "D3D11ShareHandleImage.h",
176 "D3D9SurfaceImage.h",
179 "ImageDataSerializer.h",
181 "ipc/APZCTreeManagerChild.h",
182 "ipc/APZCTreeManagerParent.h",
183 "ipc/APZInputBridgeChild.h",
184 "ipc/APZInputBridgeParent.h",
186 "ipc/CanvasThread.h",
187 "ipc/CanvasTranslator.h",
188 "ipc/CompositableForwarder.h",
189 "ipc/CompositableTransactionParent.h",
190 "ipc/CompositorBridgeChild.h",
191 "ipc/CompositorBridgeParent.h",
192 "ipc/CompositorManagerChild.h",
193 "ipc/CompositorManagerParent.h",
194 "ipc/CompositorThread.h",
195 "ipc/CompositorVsyncScheduler.h",
196 "ipc/CompositorVsyncSchedulerOwner.h",
197 "ipc/ContentCompositorBridgeParent.h",
198 "ipc/ImageBridgeChild.h",
199 "ipc/ImageBridgeParent.h",
200 "ipc/ISurfaceAllocator.h",
201 "ipc/KnowsCompositor.h",
202 "ipc/LayerAnimationUtils.h",
203 "ipc/LayersMessageUtils.h",
204 "ipc/LayerTransactionChild.h",
205 "ipc/LayerTransactionParent.h",
206 "ipc/LayerTreeOwnerTracker.h",
207 "ipc/RefCountedShmem.h",
208 "ipc/RemoteContentController.h",
209 "ipc/ShadowLayers.h",
210 "ipc/SharedPlanarYCbCrImage.h",
211 "ipc/SharedRGBImage.h",
212 "ipc/SharedSurfacesChild.h",
213 "ipc/SharedSurfacesMemoryReport.h",
214 "ipc/SharedSurfacesParent.h",
215 "ipc/SynchronousTask.h",
216 "ipc/TextureForwarder.h",
217 "ipc/UiCompositorControllerChild.h",
218 "ipc/UiCompositorControllerMessageTypes.h",
219 "ipc/UiCompositorControllerParent.h",
220 "ipc/VideoBridgeChild.h",
221 "ipc/VideoBridgeParent.h",
222 "ipc/VideoBridgeUtils.h",
225 "LayerMetricsWrapper.h",
228 "MemoryPressureObserver.h",
230 "OOPCanvasRenderer.h",
231 "opengl/CompositingRenderTargetOGL.h",
232 "opengl/CompositorOGL.h",
233 "opengl/MacIOSurfaceTextureClientOGL.h",
234 "opengl/MacIOSurfaceTextureHostOGL.h",
235 "opengl/TextureClientOGL.h",
236 "opengl/TextureHostOGL.h",
238 "PersistentBufferProvider.h",
239 "ProfilerScreenshots.h",
244 "ScreenshotGrabber.h",
245 "ScrollableLayerGuid.h",
246 "ShareableCanvasRenderer.h",
247 "SourceSurfaceSharedData.h",
248 "SourceSurfaceVolatileData.h",
251 "TextureSourceProvider.h",
252 "TextureWrapperImage.h",
253 "TransactionIdAllocator.h",
255 "UpdateImageHelper.h",
256 "wr/AsyncImagePipelineManager.h",
258 "wr/DisplayItemCache.h",
259 "wr/HitTestInfoManager.h",
260 "wr/IpcResourceUpdateQueue.h",
261 "wr/OMTAController.h",
263 "wr/RenderRootStateManager.h",
264 "wr/RenderRootTypes.h",
265 "wr/StackingContextHelper.h",
266 "wr/WebRenderBridgeChild.h",
267 "wr/WebRenderBridgeParent.h",
268 "wr/WebRenderCanvasRenderer.h",
269 "wr/WebRenderCommandBuilder.h",
270 "wr/WebRenderDrawEventRecorder.h",
271 "wr/WebRenderImageHost.h",
272 "wr/WebRenderLayerManager.h",
273 "wr/WebRenderMessageUtils.h",
274 "wr/WebRenderScrollData.h",
275 "wr/WebRenderScrollDataWrapper.h",
276 "wr/WebRenderTextureHost.h",
277 "wr/WebRenderUserData.h",
281 if CONFIG["MOZ_X11"]:
282 EXPORTS.mozilla.layers += [
283 "basic/TextureClientX11.h",
284 "basic/X11TextureSourceBasic.h",
285 "composite/X11TextureHost.h",
286 "ipc/ShadowLayerUtilsX11.h",
287 "opengl/X11TextureSourceOGL.h",
290 "basic/TextureClientX11.cpp",
291 "basic/X11BasicCompositor.cpp",
292 "basic/X11TextureSourceBasic.cpp",
293 "composite/X11TextureHost.cpp",
294 "ipc/ShadowLayerUtilsX11.cpp",
295 "opengl/X11TextureSourceOGL.cpp",
298 if CONFIG["MOZ_WAYLAND"]:
299 EXPORTS.mozilla.layers += [
300 "DMABUFSurfaceImage.h",
301 "opengl/DMABUFTextureClientOGL.h",
302 "opengl/DMABUFTextureHostOGL.h",
305 "DMABUFSurfaceImage.cpp",
306 "opengl/DMABUFTextureClientOGL.cpp",
307 "opengl/DMABUFTextureHostOGL.cpp",
310 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
311 EXPORTS.mozilla.layers += [
317 "MacIOSurfaceHelpers.h",
318 "MacIOSurfaceImage.h",
326 "ipc/ShadowLayerUtilsMac.cpp",
327 "MacIOSurfaceHelpers.cpp",
328 "MacIOSurfaceImage.cpp",
331 "-framework IOSurface",
334 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
335 EXPORTS.mozilla.layers += [
336 "AndroidHardwareBuffer.h",
339 "AndroidHardwareBuffer.cpp",
340 "apz/src/AndroidAPZ.cpp",
341 "apz/src/AndroidFlingPhysics.cpp",
342 "apz/src/AndroidVelocityTracker.cpp",
346 "AnimationHelper.cpp",
348 "apz/src/APZCTreeManager.cpp",
349 "apz/src/APZInputBridge.cpp",
350 "apz/src/APZPublicUtils.cpp",
351 "apz/src/APZSampler.cpp",
352 "apz/src/APZUpdater.cpp",
353 "apz/src/APZUtils.cpp",
354 "apz/src/AsyncPanZoomController.cpp",
355 "apz/src/AutoscrollAnimation.cpp",
357 "apz/src/CheckerboardEvent.cpp",
358 "apz/src/DragTracker.cpp",
359 "apz/src/ExpectedGeckoMetrics.cpp",
360 "apz/src/FlingAccelerator.cpp",
361 "apz/src/FocusState.cpp",
362 "apz/src/FocusTarget.cpp",
363 "apz/src/GenericScrollAnimation.cpp",
364 "apz/src/GestureEventListener.cpp",
365 "apz/src/HitTestingTreeNode.cpp",
366 "apz/src/InputBlockState.cpp",
367 "apz/src/InputQueue.cpp",
368 "apz/src/KeyboardMap.cpp",
369 "apz/src/KeyboardScrollAction.cpp",
370 "apz/src/OverscrollHandoffState.cpp",
371 "apz/src/OvershootDetector.cpp",
372 "apz/src/PotentialCheckerboardDurationTracker.cpp",
373 "apz/src/QueuedInput.cpp",
374 "apz/src/SampledAPZCState.cpp",
375 "apz/src/SimpleVelocityTracker.cpp",
376 "apz/src/SmoothMsdScrollAnimation.cpp",
377 "apz/src/SmoothScrollAnimation.cpp",
378 "apz/src/WheelScrollAnimation.cpp",
379 "apz/testutil/APZTestData.cpp",
380 "apz/util/ActiveElementManager.cpp",
381 "apz/util/APZCCallbackHelper.cpp",
382 "apz/util/APZEventState.cpp",
383 "apz/util/APZThreadUtils.cpp",
384 "apz/util/CheckerboardReportService.cpp",
385 "apz/util/ChromeProcessController.cpp",
386 "apz/util/ContentProcessController.cpp",
387 "apz/util/DoubleTapToZoom.cpp",
388 "apz/util/InputAPZContext.cpp",
389 "apz/util/ScrollLinkedEffectDetector.cpp",
390 "apz/util/TouchActionHelper.cpp",
391 "apz/util/TouchCounter.cpp",
392 "AxisPhysicsModel.cpp",
393 "AxisPhysicsMSDModel.cpp",
394 "basic/BasicCanvasLayer.cpp",
395 "basic/BasicColorLayer.cpp",
396 "basic/BasicContainerLayer.cpp",
397 "basic/BasicImages.cpp",
398 "basic/BasicLayerManager.cpp",
399 "basic/BasicLayersImpl.cpp",
400 "basic/BasicPaintedLayer.cpp",
401 "basic/TextureHostBasic.cpp",
404 "CanvasDrawEventRecorder.cpp",
405 "CanvasRenderer.cpp",
406 "client/CanvasClient.cpp",
407 "client/ClientCanvasLayer.cpp",
408 "client/ClientCanvasRenderer.cpp",
409 "client/ClientColorLayer.cpp",
410 "client/ClientContainerLayer.cpp",
411 "client/ClientImageLayer.cpp",
412 "client/ClientLayerManager.cpp",
413 "client/ClientPaintedLayer.cpp",
414 "client/ClientTiledPaintedLayer.cpp",
415 "client/CompositableClient.cpp",
416 "client/ContentClient.cpp",
417 "client/GPUVideoTextureClient.cpp",
418 "client/ImageClient.cpp",
419 "client/MultiTiledContentClient.cpp",
420 "client/SingleTiledContentClient.cpp",
421 "client/TextureClientPool.cpp",
422 "client/TextureClientRecycleAllocator.cpp",
423 "client/TextureClientSharedSurface.cpp",
424 "client/TextureRecorded.cpp",
425 "client/TiledContentClient.cpp",
426 "composite/AsyncCompositionManager.cpp",
427 "composite/CanvasLayerComposite.cpp",
428 "composite/ColorLayerComposite.cpp",
429 "composite/CompositableHost.cpp",
430 "composite/ContainerLayerComposite.cpp",
431 "composite/ContentHost.cpp",
432 "composite/Diagnostics.cpp",
433 "composite/FPSCounter.cpp",
434 "composite/FrameUniformityData.cpp",
435 "composite/GPUVideoTextureHost.cpp",
436 "composite/ImageComposite.cpp",
437 "composite/ImageHost.cpp",
438 "composite/ImageLayerComposite.cpp",
439 "composite/LayerManagerComposite.cpp",
440 "composite/PaintedLayerComposite.cpp",
441 "composite/TextRenderer.cpp",
442 "composite/TextureHost.cpp",
443 "composite/TiledContentHost.cpp",
444 "CompositionRecorder.cpp",
446 "CompositorAnimationStorage.cpp",
447 "CompositorTypes.cpp",
451 "ImageDataSerializer.cpp",
454 "ipc/APZCTreeManagerChild.cpp",
455 "ipc/APZCTreeManagerParent.cpp",
456 "ipc/APZInputBridgeChild.cpp",
457 "ipc/APZInputBridgeParent.cpp",
458 "ipc/CanvasChild.cpp",
459 "ipc/CanvasThread.cpp",
460 "ipc/CanvasTranslator.cpp",
461 "ipc/CompositableForwarder.cpp",
462 "ipc/CompositableTransactionParent.cpp",
463 "ipc/CompositorBench.cpp",
464 "ipc/CompositorBridgeChild.cpp",
465 "ipc/CompositorBridgeParent.cpp",
466 "ipc/CompositorManagerChild.cpp",
467 "ipc/CompositorManagerParent.cpp",
468 "ipc/CompositorThread.cpp",
469 "ipc/CompositorVsyncScheduler.cpp",
470 "ipc/ContentCompositorBridgeParent.cpp",
471 "ipc/ImageBridgeChild.cpp",
472 "ipc/ImageBridgeParent.cpp",
473 "ipc/ISurfaceAllocator.cpp",
474 "ipc/LayerAnimationUtils.cpp",
475 "ipc/LayerTransactionChild.cpp",
476 "ipc/LayerTransactionParent.cpp",
477 "ipc/LayerTreeOwnerTracker.cpp",
478 "ipc/RefCountedShmem.cpp",
479 "ipc/RemoteContentController.cpp",
480 "ipc/ShadowLayers.cpp",
481 "ipc/SharedPlanarYCbCrImage.cpp",
482 "ipc/SharedRGBImage.cpp",
483 "ipc/SharedSurfacesChild.cpp",
484 "ipc/SharedSurfacesParent.cpp",
485 "ipc/UiCompositorControllerChild.cpp",
486 "ipc/UiCompositorControllerParent.cpp",
487 "ipc/VideoBridgeChild.cpp",
488 "ipc/VideoBridgeParent.cpp",
495 "LayerTreeInvalidation.cpp",
496 "MemoryPressureObserver.cpp",
497 "opengl/CompositingRenderTargetOGL.cpp",
498 "opengl/CompositorOGL.cpp",
499 "opengl/GLBlitTextureImageHelper.cpp",
500 "opengl/OGLShaderProgram.cpp",
501 "opengl/TextureClientOGL.cpp",
502 "opengl/TextureHostOGL.cpp",
504 "ProfilerScreenshots.cpp",
505 "ReadbackProcessor.cpp",
507 "RepaintRequest.cpp",
510 "ScreenshotGrabber.cpp",
511 "ScrollableLayerGuid.cpp",
512 "ShareableCanvasRenderer.cpp",
513 "SourceSurfaceSharedData.cpp",
514 "SourceSurfaceVolatileData.cpp",
516 "TextureSourceProvider.cpp",
517 "TextureWrapperImage.cpp",
518 "wr/AsyncImagePipelineManager.cpp",
519 "wr/ClipManager.cpp",
520 "wr/DisplayItemCache.cpp",
521 "wr/HitTestInfoManager.cpp",
522 "wr/IpcResourceUpdateQueue.cpp",
523 "wr/OMTAController.cpp",
524 "wr/OMTASampler.cpp",
525 "wr/RenderRootStateManager.cpp",
526 "wr/RenderRootTypes.cpp",
527 "wr/StackingContextHelper.cpp",
528 "wr/WebRenderBridgeChild.cpp",
529 "wr/WebRenderBridgeParent.cpp",
530 "wr/WebRenderCanvasRenderer.cpp",
531 "wr/WebRenderCommandBuilder.cpp",
532 "wr/WebRenderDrawEventRecorder.cpp",
533 "wr/WebRenderImageHost.cpp",
534 "wr/WebRenderLayerManager.cpp",
535 "wr/WebRenderScrollData.cpp",
536 "wr/WebRenderUserData.cpp",
537 "ZoomConstraints.cpp",
538 # XXX here are some unified build error.
539 #'wr/WebRenderTextureHost.cpp'
543 "basic/BasicCompositor.cpp",
544 "basic/BasicImageLayer.cpp",
545 "client/TextureClient.cpp",
546 "ImageContainer.cpp",
547 "PersistentBufferProvider.cpp",
548 "protobuf/LayerScopePacket.pb.cc",
549 "wr/WebRenderTextureHost.cpp",
552 DEFINES["GOOGLE_PROTOBUF_NO_RTTI"] = True
553 DEFINES["GOOGLE_PROTOBUF_NO_STATIC_INITIALIZER"] = True
554 DEFINES["MOZ_APP_VERSION"] = CONFIG["MOZ_APP_VERSION"]
556 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "cocoa":
558 "basic/MacIOSurfaceTextureHostBasic.cpp",
559 "opengl/MacIOSurfaceTextureClientOGL.cpp",
560 "opengl/MacIOSurfaceTextureHostOGL.cpp",
564 "ipc/LayersMessages.ipdlh",
565 "ipc/LayersSurfaces.ipdlh",
567 "ipc/PAPZCTreeManager.ipdl",
568 "ipc/PAPZInputBridge.ipdl",
570 "ipc/PCompositorBridge.ipdl",
571 "ipc/PCompositorBridgeTypes.ipdlh",
572 "ipc/PCompositorManager.ipdl",
573 "ipc/PImageBridge.ipdl",
574 "ipc/PLayerTransaction.ipdl",
576 "ipc/PUiCompositorController.ipdl",
577 "ipc/PVideoBridge.ipdl",
578 "ipc/PWebRenderBridge.ipdl",
579 "ipc/WebRenderMessages.ipdlh",
582 include("/ipc/chromium/chromium-config.mozbuild")
584 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "windows":
586 "CompositorD3D11Shaders.h",
587 script="d3d11/genshaders.py",
588 inputs=["d3d11/shaders.manifest"],
592 "/docshell/base", # for nsDocShell.h
593 "/dom/canvas", # for intertwined WebGL headers
594 "/layout/base", # for TouchManager.h
595 "/layout/generic", # for nsTextFrame.h
596 "/media/libyuv/libyuv/include", # for libyuv.h
599 FINAL_LIBRARY = "xul"
601 if CONFIG["MOZ_DEBUG"]:
602 DEFINES["D3D_DEBUG_INFO"] = True
604 if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
605 DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
607 if CONFIG["ENABLE_TESTS"]:
608 DIRS += ["apz/test/gtest"]
609 DIRS += ["apz/test/gtest/mvm"]
611 MOCHITEST_MANIFESTS += ["apz/test/mochitest/mochitest.ini"]
612 BROWSER_CHROME_MANIFESTS += ["apz/test/mochitest/browser.ini"]
614 CXXFLAGS += CONFIG["MOZ_CAIRO_CFLAGS"]
615 CXXFLAGS += CONFIG["TK_CFLAGS"]
617 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
619 if CONFIG["CC_TYPE"] in ("clang", "gcc"):
620 CXXFLAGS += ["-Wno-error=shadow"]
621 # Suppress warnings in third-party code.
622 CXXFLAGS += ["-Wno-maybe-uninitialized"]
624 if CONFIG["MOZ_ENABLE_SKIA"]:
626 "composite/PaintCounter.cpp",
629 if CONFIG["FUZZING"] and CONFIG["FUZZING_INTERFACES"]:
630 TEST_DIRS += ["ipc/fuzztest"]
632 # Add libFuzzer configuration directives
633 include("/tools/fuzzing/libfuzzer-config.mozbuild")