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/.
6
7TEST_DIRS += [
8    'gtest'
9]
10
11# Change the following line(s) to avoid bug 1081323 (clobber after changing a manifest):
12# * Adjust failure errata for webgl-conf.
13
14MOCHITEST_MANIFESTS += [
15    'test/crash/mochitest.ini',
16    'test/crossorigin/mochitest.ini',
17    'test/mochitest.ini',
18    'test/webgl-conf/generated-mochitest.ini',
19    'test/webgl-mochitest/mochitest.ini',
20]
21
22MOCHITEST_CHROME_MANIFESTS += ['test/chrome/chrome.ini']
23
24EXPORTS += [
25    'nsICanvasRenderingContextInternal.h',
26]
27
28EXPORTS.mozilla.dom += [
29    'CanvasGradient.h',
30    'CanvasPath.h',
31    'CanvasPattern.h',
32    'CanvasRenderingContext2D.h',
33    'CanvasRenderingContextHelper.h',
34    'CanvasUtils.h',
35    'ImageBitmap.h',
36    'ImageBitmapRenderingContext.h',
37    'ImageBitmapSource.h',
38    'ImageData.h',
39    'OffscreenCanvas.h',
40    'TextMetrics.h',
41    'WebGLVertexArrayObject.h',
42]
43
44# Canvas 2D and common sources
45UNIFIED_SOURCES += [
46    'CanvasImageCache.cpp',
47    'CanvasRenderingContext2D.cpp',
48    'CanvasRenderingContextHelper.cpp',
49    'CanvasUtils.cpp',
50    'ImageBitmap.cpp',
51    'ImageBitmapColorUtils.cpp',
52    'ImageBitmapRenderingContext.cpp',
53    'ImageBitmapUtils.cpp',
54    'ImageData.cpp',
55    'OffscreenCanvas.cpp',
56]
57
58SOURCES += [
59    'ImageUtils.cpp',
60]
61
62# WebGL Sources
63UNIFIED_SOURCES += [
64    'TexUnpackBlob.cpp',
65    'WebGL1Context.cpp',
66    'WebGL1ContextUniforms.cpp',
67    'WebGL2Context.cpp',
68    'WebGL2ContextBuffers.cpp',
69    'WebGL2ContextFramebuffers.cpp',
70    'WebGL2ContextMRTs.cpp',
71    'WebGL2ContextPrograms.cpp',
72    'WebGL2ContextQueries.cpp',
73    'WebGL2ContextRenderbuffers.cpp',
74    'WebGL2ContextSamplers.cpp',
75    'WebGL2ContextState.cpp',
76    'WebGL2ContextSync.cpp',
77    'WebGL2ContextTextures.cpp',
78    'WebGL2ContextTransformFeedback.cpp',
79    'WebGL2ContextUniforms.cpp',
80    'WebGL2ContextVAOs.cpp',
81    'WebGL2ContextVertices.cpp',
82    'WebGLActiveInfo.cpp',
83    'WebGLBuffer.cpp',
84    'WebGLContext.cpp',
85    'WebGLContextBuffers.cpp',
86    'WebGLContextDraw.cpp',
87    'WebGLContextExtensions.cpp',
88    'WebGLContextFramebufferOperations.cpp',
89    'WebGLContextGL.cpp',
90    'WebGLContextLossHandler.cpp',
91    'WebGLContextState.cpp',
92    'WebGLContextTextures.cpp',
93    'WebGLContextUnchecked.cpp',
94    'WebGLContextUtils.cpp',
95    'WebGLContextValidate.cpp',
96    'WebGLContextVertexArray.cpp',
97    'WebGLContextVertices.cpp',
98    'WebGLElementArrayCache.cpp',
99    'WebGLExtensionBase.cpp',
100    'WebGLExtensionBlendMinMax.cpp',
101    'WebGLExtensionColorBufferFloat.cpp',
102    'WebGLExtensionColorBufferHalfFloat.cpp',
103    'WebGLExtensionCompressedTextureATC.cpp',
104    'WebGLExtensionCompressedTextureES3.cpp',
105    'WebGLExtensionCompressedTextureETC1.cpp',
106    'WebGLExtensionCompressedTexturePVRTC.cpp',
107    'WebGLExtensionCompressedTextureS3TC.cpp',
108    'WebGLExtensionDebugRendererInfo.cpp',
109    'WebGLExtensionDebugShaders.cpp',
110    'WebGLExtensionDepthTexture.cpp',
111    'WebGLExtensionDisjointTimerQuery.cpp',
112    'WebGLExtensionDrawBuffers.cpp',
113    'WebGLExtensionElementIndexUint.cpp',
114    'WebGLExtensionEXTColorBufferFloat.cpp',
115    'WebGLExtensionFragDepth.cpp',
116    'WebGLExtensionInstancedArrays.cpp',
117    'WebGLExtensionLoseContext.cpp',
118    'WebGLExtensionShaderTextureLod.cpp',
119    'WebGLExtensionSRGB.cpp',
120    'WebGLExtensionStandardDerivatives.cpp',
121    'WebGLExtensionTextureFilterAnisotropic.cpp',
122    'WebGLExtensionTextureFloat.cpp',
123    'WebGLExtensionTextureFloatLinear.cpp',
124    'WebGLExtensionTextureHalfFloat.cpp',
125    'WebGLExtensionTextureHalfFloatLinear.cpp',
126    'WebGLExtensionVertexArray.cpp',
127    'WebGLFormats.cpp',
128    'WebGLFramebuffer.cpp',
129    'WebGLFramebufferAttachable.cpp',
130    'WebGLMemoryTracker.cpp',
131    'WebGLObjectModel.cpp',
132    'WebGLProgram.cpp',
133    'WebGLQuery.cpp',
134    'WebGLRenderbuffer.cpp',
135    'WebGLSampler.cpp',
136    'WebGLShader.cpp',
137    'WebGLShaderPrecisionFormat.cpp',
138    'WebGLShaderValidator.cpp',
139    'WebGLSync.cpp',
140    'WebGLTexelConversions.cpp',
141    'WebGLTexture.cpp',
142    'WebGLTextureUpload.cpp',
143    'WebGLTransformFeedback.cpp',
144    'WebGLUniformLocation.cpp',
145    'WebGLValidateStrings.cpp',
146    'WebGLVertexArray.cpp',
147    'WebGLVertexArrayFake.cpp',
148    'WebGLVertexArrayGL.cpp',
149    'WebGLVertexArrayObject.cpp',
150    'WebGLVertexAttribData.cpp',
151]
152
153SOURCES += [
154    'MurmurHash3.cpp',
155]
156
157# Suppress warnings from third-party code.
158if CONFIG['CLANG_CXX']:
159    SOURCES['MurmurHash3.cpp'].flags += ['-Wno-implicit-fallthrough']
160
161LOCAL_INCLUDES += [
162    '/js/xpconnect/wrappers',
163]
164
165include('/ipc/chromium/chromium-config.mozbuild')
166
167FINAL_LIBRARY = 'xul'
168LOCAL_INCLUDES += [
169    '../workers',
170    '/dom/base',
171    '/dom/html',
172    '/dom/svg',
173    '/dom/workers',
174    '/dom/xul',
175    '/gfx/gl',
176    '/image',
177    '/js/xpconnect/src',
178    '/layout/generic',
179    '/layout/style',
180    '/layout/xul',
181    '/media/libyuv/include',
182]
183
184CXXFLAGS += CONFIG['MOZ_CAIRO_CFLAGS']
185CXXFLAGS += CONFIG['TK_CFLAGS']
186
187LOCAL_INCLUDES += CONFIG['SKIA_INCLUDES']
188
189if CONFIG['GNU_CXX']:
190    CXXFLAGS += ['-Wno-error=shadow']
191
192if CONFIG['_MSC_VER']:
193    # This is intended as a temporary workaround to unblock compilation
194    # on VS2015 in warnings as errors mode.
195    CXXFLAGS += ['-wd4312']
196