summaryrefslogtreecommitdiffstats
path: root/gfx/webrender_bindings/moz.build
blob: 6cca348acbffccce75e648ac69d0f75aaa4b8f13 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# -*- Mode: python; indent-tabs-mode: nil; tab-width: 40 -*-
# vim: set filetype=python:
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

with Files("**"):
    BUG_COMPONENT = ("Core", "Graphics: WebRender")

EXPORTS.mozilla.webrender += [
    "RenderBufferTextureHost.h",
    "RenderCompositor.h",
    "RenderCompositorEGL.h",
    "RenderCompositorLayersSWGL.h",
    "RenderCompositorOGL.h",
    "RenderCompositorOGLSWGL.h",
    "RenderCompositorSWGL.h",
    "RenderEGLImageTextureHost.h",
    "RendererOGL.h",
    "RendererScreenshotGrabber.h",
    "RenderExternalTextureHost.h",
    "RenderSharedSurfaceTextureHost.h",
    "RenderTextureHost.h",
    "RenderTextureHostSWGL.h",
    "RenderTextureHostWrapper.h",
    "RenderThread.h",
    "webrender_ffi.h",
    "WebRenderAPI.h",
    "WebRenderTypes.h",
]

UNIFIED_SOURCES += [
    "Moz2DImageRenderer.cpp",
    "RenderBufferTextureHost.cpp",
    "RenderCompositor.cpp",
    "RenderCompositorEGL.cpp",
    "RenderCompositorLayersSWGL.cpp",
    "RenderCompositorOGL.cpp",
    "RenderCompositorOGLSWGL.cpp",
    "RenderCompositorSWGL.cpp",
    "RenderEGLImageTextureHost.cpp",
    "RendererOGL.cpp",
    "RendererScreenshotGrabber.cpp",
    "RenderExternalTextureHost.cpp",
    "RenderSharedSurfaceTextureHost.cpp",
    "RenderTextureHost.cpp",
    "RenderTextureHostSWGL.cpp",
    "RenderTextureHostWrapper.cpp",
    "RenderThread.cpp",
    "WebRenderAPI.cpp",
    "WebRenderTypes.cpp",
]

if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("cocoa", "uikit"):
    EXPORTS.mozilla.webrender += [
        "RenderCompositorNative.h",
        "RenderMacIOSurfaceTextureHost.h",
    ]
    UNIFIED_SOURCES += [
        "RenderCompositorNative.cpp",
        "RenderMacIOSurfaceTextureHost.cpp",
    ]

if CONFIG["MOZ_WIDGET_TOOLKIT"] == "android":
    EXPORTS.mozilla.webrender += [
        "RenderAndroidHardwareBufferTextureHost.h",
        "RenderAndroidSurfaceTextureHost.h",
    ]
    UNIFIED_SOURCES += [
        "RenderAndroidHardwareBufferTextureHost.cpp",
        "RenderAndroidSurfaceTextureHost.cpp",
    ]

if CONFIG["MOZ_ENABLE_D3D10_LAYER"]:
    DEFINES["MOZ_ENABLE_D3D10_LAYER"] = True
    EXPORTS.mozilla.webrender += [
        "DCLayerTree.h",
        "RenderCompositorANGLE.h",
        "RenderCompositorD3D11SWGL.h",
        "RenderD3D11TextureHost.h",
        "RenderDcompSurfaceTextureHost.h",
    ]
    UNIFIED_SOURCES += [
        "DCLayerTree.cpp",
        "RenderCompositorANGLE.cpp",
        "RenderCompositorD3D11SWGL.cpp",
        "RenderD3D11TextureHost.cpp",
    ]
    SOURCES += [
        "RenderDcompSurfaceTextureHost.cpp",
    ]

if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    EXPORTS.mozilla.webrender += [
        "RenderDMABUFTextureHost.h",
    ]
    SOURCES += [
        "RenderDMABUFTextureHost.cpp",
    ]

if CONFIG["MOZ_WAYLAND"]:
    EXPORTS.mozilla.webrender += [
        "RenderCompositorNative.h",
    ]
    SOURCES += [
        "RenderCompositorNative.cpp",
    ]

if CONFIG["MOZ_WIDGET_TOOLKIT"] in ("android", "gtk"):
    CXXFLAGS += CONFIG["CAIRO_FT_CFLAGS"]

if CONFIG["COMPILE_ENVIRONMENT"]:
    EXPORTS.mozilla.webrender += [
        "!webrender_ffi_generated.h",
    ]

    CbindgenHeader(
        "webrender_ffi_generated.h",
        inputs=[
            "/gfx/webrender_bindings",
            "/gfx/wr/webrender",
            "/gfx/wr/webrender_api",
        ],
    )


include("/ipc/chromium/chromium-config.mozbuild")

FINAL_LIBRARY = "xul"

LOCAL_INCLUDES += [
    "/gfx/cairo/cairo/src",
]
if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
    CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]

CXXFLAGS += ["-Werror=switch"]