Bug 1850713: remove duplicated setting of early hint preloader id in `ScriptLoader...
[gecko.git] / dom / canvas / moz.build
blob7238b2824c3a6549d20d237c82aef77a4d30dca7
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("**"):
8     BUG_COMPONENT = ("Core", "Graphics: Canvas2D")
10 with Files("TexUnpackBlob.cpp"):
11     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
13 with Files("WebGL*"):
14     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
16 with Files("test/webgl-conf/**"):
17     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
19 with Files("test/webgl-mochitest/**"):
20     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
22 with Files("test/reftest/webgl*"):
23     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
25 with Files("test/chrome/*webgl*"):
26     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
28 with Files("test/crossorigin/*webgl*"):
29     BUG_COMPONENT = ("Core", "Graphics: CanvasWebGL")
31 # Change the following line(s) to avoid bug 1081323 (clobber after changing a manifest):
32 # * Adjust failure errata for webgl-conf.
34 MOCHITEST_MANIFESTS += [
35     "test/crash/mochitest.ini",
36     "test/crossorigin/mochitest.ini",
37     "test/mochitest.ini",
38     "test/webgl-conf/generated-mochitest.ini",
39     "test/webgl-mochitest/mochitest.ini",
42 MOCHITEST_CHROME_MANIFESTS += ["test/chrome/chrome.ini"]
44 EXPORTS += [
45     "nsICanvasRenderingContextInternal.h",
48 EXPORTS.mozilla.dom += [
49     "CanvasGradient.h",
50     "CanvasPath.h",
51     "CanvasPattern.h",
52     "CanvasRenderingContext2D.h",
53     "CanvasRenderingContextHelper.h",
54     "CanvasUtils.h",
55     "GeneratePlaceholderCanvasData.h",
56     "ImageBitmap.h",
57     "ImageBitmapRenderingContext.h",
58     "ImageBitmapSource.h",
59     "ImageData.h",
60     "ImageUtils.h",
61     "OffscreenCanvas.h",
62     "OffscreenCanvasDisplayHelper.h",
63     "OffscreenCanvasRenderingContext2D.h",
64     "QueueParamTraits.h",
65     "TextMetrics.h",
66     "TiedFields.h",
67     "TupleUtils.h",
68     "WebGLChild.h",
69     "WebGLCommandQueue.h",
70     "WebGLIpdl.h",
71     "WebGLParent.h",
72     "WebGLTexelConversions.h",
73     "WebGLTypes.h",
74     "XRWebGLLayer.h",
76 # XRWebGLLayer.h must be exported for use by the generated WebXRBinding.h
78 EXPORTS.mozilla.gfx += [
79     "DrawTargetWebgl.h",
82 # Canvas 2D and common sources
84 # Due to bug 1745384, and the associated clang mingw cross compile crash, we
85 # must be careful about disturbing the unified file combinations.
86 # nsICanvasRenderingContextInternal.cpp cannot be built standalone until this
87 # is resolved, so new files may need to be added to SOURCES for the time being.
88 UNIFIED_SOURCES += [
89     "CanvasGradient.cpp",
90     "CanvasImageCache.cpp",
91     "CanvasPattern.cpp",
92     "CanvasRenderingContext2D.cpp",
93     "CanvasRenderingContextHelper.cpp",
94     "CanvasUtils.cpp",
95     "ImageBitmap.cpp",
96     "ImageBitmapRenderingContext.cpp",
97     "ImageData.cpp",
98     "nsICanvasRenderingContextInternal.cpp",
99     "OffscreenCanvas.cpp",
100     "XRWebGLLayer.cpp",
103 SOURCES += [
104     "DrawTargetWebgl.cpp",  # Isolate Skia
105     "ImageUtils.cpp",
106     "OffscreenCanvasDisplayHelper.cpp",  # See bug 1745384
107     "OffscreenCanvasRenderingContext2D.cpp",  # See bug 1745384
108     "SourceSurfaceWebgl.cpp",
111 # WebGL Sources
112 UNIFIED_SOURCES += [
113     "CacheInvalidator.cpp",
114     "ClientWebGLContext.cpp",
115     "ClientWebGLExtensions.cpp",
116     "HostWebGLContext.cpp",
117     "SanitizeRenderer.cpp",
118     "TexUnpackBlob.cpp",
119     "WebGL2Context.cpp",
120     "WebGL2ContextBuffers.cpp",
121     "WebGL2ContextFramebuffers.cpp",
122     "WebGL2ContextMRTs.cpp",
123     "WebGL2ContextQueries.cpp",
124     "WebGL2ContextRenderbuffers.cpp",
125     "WebGL2ContextSamplers.cpp",
126     "WebGL2ContextState.cpp",
127     "WebGL2ContextSync.cpp",
128     "WebGL2ContextTransformFeedback.cpp",
129     "WebGL2ContextUniforms.cpp",
130     "WebGLBuffer.cpp",
131     "WebGLChild.cpp",
132     "WebGLContext.cpp",
133     "WebGLContextBuffers.cpp",
134     "WebGLContextDraw.cpp",
135     "WebGLContextExtensions.cpp",
136     "WebGLContextFramebufferOperations.cpp",
137     "WebGLContextGL.cpp",
138     "WebGLContextLossHandler.cpp",
139     "WebGLContextState.cpp",
140     "WebGLContextTextures.cpp",
141     "WebGLContextUtils.cpp",
142     "WebGLContextValidate.cpp",
143     "WebGLContextVertexArray.cpp",
144     "WebGLContextVertices.cpp",
145     "WebGLExtensions.cpp",
146     "WebGLFormats.cpp",
147     "WebGLFramebuffer.cpp",
148     "WebGLMemoryTracker.cpp",
149     "WebGLParent.cpp",
150     "WebGLProgram.cpp",
151     "WebGLQuery.cpp",
152     "WebGLRenderbuffer.cpp",
153     "WebGLSampler.cpp",
154     "WebGLShader.cpp",
155     "WebGLShaderValidator.cpp",
156     "WebGLSync.cpp",
157     "WebGLTexelConversions.cpp",
158     "WebGLTexture.cpp",
159     "WebGLTextureUpload.cpp",
160     "WebGLTransformFeedback.cpp",
161     "WebGLValidateStrings.cpp",
162     "WebGLVertexArray.cpp",
163     "WebGLVertexArrayFake.cpp",
164     "WebGLVertexArrayGL.cpp",
167 SOURCES += [
168     "MurmurHash3.cpp",
171 IPDL_SOURCES += [
172     "PWebGL.ipdl",
175 TEST_DIRS += [
176     "gtest",
179 # Suppress warnings from third-party code.
180 SOURCES["MurmurHash3.cpp"].flags += ["-Wno-implicit-fallthrough"]
182 LOCAL_INCLUDES += [
183     "/js/xpconnect/wrappers",
186 include("/ipc/chromium/chromium-config.mozbuild")
189 USE_LIBS += ["translator"]  # Grab the Angle shader translator.
191 FINAL_LIBRARY = "xul"
192 LOCAL_INCLUDES += [
193     "/dom/base",
194     "/dom/html",
195     "/dom/svg",
196     "/dom/workers",
197     "/dom/xul",
198     "/gfx/angle/checkout/include",
199     "/gfx/cairo/cairo/src",
200     "/gfx/gl",
201     "/image",
202     "/js/xpconnect/src",
203     "/layout/generic",
204     "/layout/style",
205     "/layout/xul",
206     "/media/libyuv/libyuv/include",
209 if CONFIG["MOZ_WIDGET_TOOLKIT"] == "gtk":
210     CXXFLAGS += CONFIG["MOZ_GTK3_CFLAGS"]
212 LOCAL_INCLUDES += CONFIG["SKIA_INCLUDES"]
214 if CONFIG["CC_TYPE"] in ("clang", "clang-cl"):
215     CXXFLAGS += ["-Werror=implicit-int-conversion"]
216     CXXFLAGS += ["-Werror=switch"]
218 if CONFIG["CC_TYPE"] == "gcc":
219     CXXFLAGS += ["-Wno-error=unused-result"]  # GCC doesn't ignore (void)MustUse();
221 # Add libFuzzer configuration directives
222 include("/tools/fuzzing/libfuzzer-config.mozbuild")