blob: e16c5dc13ea5479955350c30e3625b7a8c264275 [file] [log] [blame]
Kevin Lubick217056c2018-09-20 17:39:31 -04001/*
2 * This externs file prevents the Closure JS compiler from minifying away
3 * names of objects created by Emscripten.
4 * Basically, by defining empty objects and functions here, Closure will
5 * know not to rename them. This is needed because of our pre-js files,
6 * that is, the JS we hand-write to bundle into the output. That JS will be
7 * hit by the closure compiler and thus needs to know about what functions
8 * have special names and should not be minified.
9 *
10 * Emscripten does not support automatically generating an externs file, so we
11 * do it by hand. The general process is to write some JS code, and then put any
12 * calls to CanvasKit or related things in here. Running ./compile.sh and then
13 * looking at the minified results or running the Release trybot should
14 * verify nothing was missed. Optionally, looking directly at the minified
15 * pathkit.js can be useful when developing locally.
16 *
17 * Docs:
18 * https://github.com/cljsjs/packages/wiki/Creating-Externs
19 * https://github.com/google/closure-compiler/wiki/Types-in-the-Closure-Type-System
20 *
21 * Example externs:
22 * https://github.com/google/closure-compiler/tree/master/externs
23 */
24
25var CanvasKit = {
26 // public API (i.e. things we declare in the pre-js file)
Kevin Lubick006a6f32018-10-19 14:34:34 -040027 Color: function() {},
28 /** @return {CanvasKit.SkRect} */
29 LTRBRect: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050030 /** @return {CanvasKit.SkRect} */
31 XYWHRect: function() {},
Kevin Lubick7d644e12019-09-11 14:22:22 -040032 /** @return {CanvasKit.SkRRect} */
33 RRectXY: function() {},
Kevin Lubick52b9f372018-12-04 13:57:36 -050034 /** @return {ImageData} */
35 ImageData: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -050036
37 GetWebGLContext: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050038 MakeBlurMaskFilter: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040039 MakeCanvas: function() {},
40 MakeCanvasSurface: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -050041 MakeGrContext: function() {},
Kevin Lubick6b921b72019-09-18 16:18:17 -040042 /** @return {CanvasKit.SkAnimatedImage} */
43 MakeAnimatedImageFromEncoded: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050044 /** @return {CanvasKit.SkImage} */
45 MakeImageFromEncoded: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050046 /** @return {LinearCanvasGradient} */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040047 MakeLinearGradientShader: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -050048 MakeOnScreenGLSurface: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -050049 MakePathFromCmds: function() {},
Kevin Lubicka40f8322018-12-17 16:01:36 -050050 MakePathFromOp: function() {},
51 MakePathFromSVGString: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050052 MakeRadialGradientShader: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -050053 MakeRenderTarget: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050054 MakeSWCanvasSurface: function() {},
Kevin Lubickf5ea37f2019-02-28 10:06:18 -050055 MakeManagedAnimation: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040056 MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040057 MakeSkVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040058 MakeSurface: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050059 /** @return {RadialCanvasGradient} */
60 MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050061 MakeWebGLCanvasSurface: function() {},
Kevin Lubicke25df6c2019-10-22 09:04:32 -040062 /** @return {TypedArray} */
63 Malloc: function() {},
Kevin Lubick50f377e2019-09-11 15:23:00 -040064 /** @return {TonalColors} */
65 computeTonalColors: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040066 currentContext: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050067 getColorComponents: function() {},
Florin Malita0d603d82019-11-25 13:45:28 -050068 getDecodeCacheLimitBytes: function() {},
69 getDecodeCacheUsageBytes: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050070 getSkDataBytes: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050071 multiplyByAlpha: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040072 setCurrentContext: function() {},
Florin Malita0d603d82019-11-25 13:45:28 -050073 setDecodeCacheLimitBytes: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040074
75 // private API (i.e. things declared in the bindings that we use
76 // in the pre-js file)
Kevin Lubick52b9f372018-12-04 13:57:36 -050077 _MakeImage: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040078 _MakeLinearGradientShader: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -050079 _MakePathFromCmds: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040080 _MakeRadialGradientShader: function() {},
Kevin Lubickf5ea37f2019-02-28 10:06:18 -050081 _MakeManagedAnimation: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040082 _MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040083 _MakeSkVertices: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050084 _MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick6b921b72019-09-18 16:18:17 -040085 _decodeAnimatedImage: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050086 _decodeImage: function() {},
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050087 _drawShapedText: function() {},
Kevin Lubickea905ec2018-11-30 14:05:58 -050088 _getRasterDirectSurface: function() {},
Kevin Lubick134be1d2018-10-30 15:05:04 -040089 _getRasterN32PremulSurface: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040090
Kevin Lubick1a05fce2018-11-20 12:51:16 -050091 // The testing object is meant to expose internal functions
92 // for more fine-grained testing, e.g. parseColor
93 _testing: {},
94
Kevin Lubick217056c2018-09-20 17:39:31 -040095 // Objects and properties on CanvasKit
96
Kevin Lubickcd544662019-03-22 15:41:36 -040097 GrContext: {
98 // public API (from C++ bindings)
99 getResourceCacheLimitBytes: function() {},
100 getResourceCacheUsageBytes: function() {},
101 setResourceCacheLimitBytes: function() {},
102 },
103
Kevin Lubick369f6a52019-10-03 11:22:08 -0400104 Paragraph: {
105 // public API (from C++ bindings)
Kevin Lubick04912672019-11-15 14:48:55 -0500106 didExceedMaxLines: function() {},
107 getAlphabeticBaseline: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400108 getGlyphPositionAtCoordinate: function() {},
Kevin Lubick04912672019-11-15 14:48:55 -0500109 getHeight: function() {},
110 getIdeographicBaseline: function() {},
111 getLongestLine: function() {},
112 getMaxIntrinsicWidth: function() {},
113 getMaxWidth: function() {},
114 getMinIntrinsicWidth: function() {},
115 getWordBoundary: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400116 layout: function() {},
117
118 // private API
119 /** @return {Float32Array} */
120 _getRectsForRange: function() {},
121 },
122
123 ParagraphStyle: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400124 RSXFormBuilder: function() {},
Kevin Lubickee91c072019-03-29 10:39:52 -0400125 SkColorBuilder: function() {},
126 SkRectBuilder: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400127
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -0500128 ShapedText: {
129 // public API (from C++ bindings)
130 getBounds: function() {},
131 },
132
Kevin Lubick6b921b72019-09-18 16:18:17 -0400133 SkAnimatedImage: {
134 // public API (from C++ bindings)
Kevin Lubick6b921b72019-09-18 16:18:17 -0400135 decodeNextFrame: function() {},
Kevin Lubick47bd9f12019-11-08 06:55:15 -0800136 getFrameCount: function() {},
137 getRepetitionCount: function() {},
138 height: function() {},
139 reset: function() {},
140 width: function() {},
Kevin Lubick6b921b72019-09-18 16:18:17 -0400141 },
142
Kevin Lubick006a6f32018-10-19 14:34:34 -0400143 SkCanvas: {
144 // public API (from C++ bindings)
145 clear: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500146 clipPath: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400147 clipRRect: function() {},
Kevin Lubick5d5723c2018-12-07 10:09:11 -0500148 clipRect: function() {},
149 concat: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400150 drawAnimatedImage: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500151 drawArc: function() {},
Kevin Lubicke384df42019-08-26 15:48:09 -0400152 drawCircle: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400153 drawColor: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400154 drawDRRect: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500155 drawImage: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500156 drawImageNine: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500157 drawImageRect: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500158 drawLine: function() {},
159 drawOval: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400160 drawPaint: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400161 drawParagraph: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400162 drawPath: function() {},
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400163 drawPicture: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400164 drawRRect: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500165 drawRect: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500166 drawRoundRect: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500167 drawShadow: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500168 drawText: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500169 drawTextBlob: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500170 drawVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400171 flush: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400172 getSaveCount: function() {},
Kevin Lubick5d5723c2018-12-07 10:09:11 -0500173 getTotalMatrix: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -0500174 makeSurface: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500175 restore: function() {},
Kevin Lubickb3574c92019-03-06 08:25:36 -0500176 restoreToCount: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400177 rotate: function() {},
178 save: function() {},
Kevin Lubickb3574c92019-03-06 08:25:36 -0500179 saveLayer: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400180 scale: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400181 skew: function() {},
182 translate: function() {},
183
184 // private API
Kevin Lubickee91c072019-03-29 10:39:52 -0400185 _drawAtlas: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500186 _drawPoints: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500187 _drawSimpleText: function() {},
Kevin Lubick52b9f372018-12-04 13:57:36 -0500188 _readPixels: function() {},
189 _writePixels: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400190 delete: function() {},
191 },
192
Kevin Lubickd3729342019-09-12 11:11:25 -0400193 SkColorFilter: {
194 // public API (from C++ bindings and JS interface)
195 MakeBlend: function() {},
196 MakeCompose: function() {},
197 MakeLerp: function() {},
198 MakeLinearToSRGBGamma: function() {},
199 MakeMatrix: function() {},
200 MakeSRGBToLinearGamma: function() {},
201 // private API (from C++ bindings)
202 _makeMatrix: function() {},
203 },
204
205 SkColorMatrix: {
206 concat: function() {},
207 identity: function() {},
208 postTranslate: function() {},
209 rotated: function() {},
210 scaled: function() {},
211 },
212
Kevin Lubicke59c1672019-11-20 14:17:53 -0500213 SkContourMeasureIter: {
214 next: function() {},
215 },
216
217 SkContourMeasure: {
218 getPosTan: function() {},
219 getSegment: function() {},
220 isClosed: function() {},
221 length: function() {},
222 },
223
Kevin Lubick35ac0382019-01-02 15:13:57 -0500224 SkFont: {
225 // public API (from C++ bindings)
226 getScaleX: function() {},
227 getSize: function() {},
228 getSkewX: function() {},
229 getTypeface: function() {},
230 measureText: function() {},
231 setScaleX: function() {},
232 setSize: function() {},
233 setSkewX: function() {},
234 setTypeface: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400235 // private API (from C++ bindings)
236 _getWidths: function() {},
Kevin Lubick35ac0382019-01-02 15:13:57 -0500237 },
238
Kevin Lubickddd0a332018-12-12 10:35:13 -0500239 SkFontMgr: {
Kevin Lubick61887c72019-09-26 13:20:50 -0400240 // public API (from C++ and JS bindings)
241 FromData: function() {},
Kevin Lubickddd0a332018-12-12 10:35:13 -0500242 RefDefault: function() {},
243 countFamilies: function() {},
244
245 // private API
246 _makeTypefaceFromData: function() {},
Kevin Lubick61887c72019-09-26 13:20:50 -0400247 _fromData: function() {},
Kevin Lubickddd0a332018-12-12 10:35:13 -0500248 },
249
Kevin Lubick006a6f32018-10-19 14:34:34 -0400250 SkImage: {
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500251 // public API (from C++ bindings)
252 height: function() {},
253 width: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300254 // private API
255 _encodeToData: function() {},
256 _encodeToDataWithFormat: function() {},
Kevin Lubicka064c282019-04-04 09:28:53 -0400257 _makeShader: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400258 },
259
Kevin Lubick15b40232019-10-29 09:55:39 -0400260 SkImageFilter: {
261 MakeBlur: function() {},
262 MakeColorFilter: function() {},
263 MakeCompose: function() {},
Kevin Lubickd2677192019-11-15 14:13:20 -0500264 MakeMatrixTransform: function() {},
Kevin Lubick15b40232019-10-29 09:55:39 -0400265 },
266
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500267 SkMatrix: {
Kevin Lubickb9db3902018-11-26 11:47:54 -0500268 identity: function() {},
Kevin Lubickf3555182019-03-14 10:55:10 -0400269 invert: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500270 mapPoints: function() {},
271 multiply: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500272 rotated: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500273 scaled: function() {},
274 skewed: function() {},
275 translated: function() {},
276 },
277
Kevin Lubick15b40232019-10-29 09:55:39 -0400278 SkMaskFilter: {
279 MakeBlur: function() {},
280 },
281
Kevin Lubickb9db3902018-11-26 11:47:54 -0500282 SkPaint: {
283 // public API (from C++ bindings)
284 /** @return {CanvasKit.SkPaint} */
285 copy: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500286 getBlendMode: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500287 getColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500288 getFilterQuality: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500289 getStrokeCap: function() {},
290 getStrokeJoin: function() {},
291 getStrokeMiter: function() {},
292 getStrokeWidth: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500293 setAntiAlias: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500294 setBlendMode: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500295 setColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500296 setFilterQuality: function() {},
Kevin Lubick15b40232019-10-29 09:55:39 -0400297 setImageFilter: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500298 setMaskFilter: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500299 setPathEffect: function() {},
300 setShader: function() {},
301 setStrokeCap: function() {},
302 setStrokeJoin: function() {},
303 setStrokeMiter: function() {},
304 setStrokeWidth: function() {},
305 setStyle: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500306
307 //private API
308 delete: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500309 },
310
Kevin Lubick006a6f32018-10-19 14:34:34 -0400311 SkPath: {
312 // public API (from C++ bindings)
Kevin Lubickb9db3902018-11-26 11:47:54 -0500313 computeTightBounds: function() {},
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500314 contains: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500315 /** @return {CanvasKit.SkPath} */
316 copy: function() {},
317 countPoints: function() {},
318 equals: function() {},
319 getBounds: function() {},
320 getFillType: function() {},
321 getPoint: function() {},
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500322 isEmpty: function() {},
Kevin Lubick2b79d1c2018-12-14 16:10:38 -0500323 isVolatile: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500324 reset: function() {},
325 rewind: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500326 setFillType: function() {},
Kevin Lubick2b79d1c2018-12-14 16:10:38 -0500327 setIsVolatile: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500328 toSVGString: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400329
330 // private API
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500331 _addArc: function() {},
Kevin Lubicke384df42019-08-26 15:48:09 -0400332 _addOval: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400333 _addPath: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500334 _addRect: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500335 _addPoly: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500336 _addRoundRect: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300337 _arc: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400338 _arcTo: function() {},
339 _close: function() {},
340 _conicTo: function() {},
341 _cubicTo: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400342 _dash: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400343 _lineTo: function() {},
344 _moveTo: function() {},
345 _op: function() {},
346 _quadTo: function() {},
Kevin Lubick79b71342019-11-01 14:36:52 -0400347 _rArcTo: function() {},
348 _rConicTo: function() {},
349 _rCubicTo: function() {},
350 _rLineTo: function() {},
351 _rMoveTo: function() {},
352 _rQuadTo: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400353 _rect: function() {},
354 _simplify: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400355 _stroke: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400356 _transform: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400357 _trim: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400358 delete: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500359 dump: function() {},
360 dumpHex: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400361 },
362
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400363 SkPathMeasure: {
364 getLength: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500365 getSegment: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400366 getPosTan: function() {},
367 isClosed: function() {},
368 nextContour: function() {},
369 },
370
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400371 SkPicture: {
372 DEBUGONLY_serialize: function() {},
373 },
374
375 SkPictureRecorder: {
376 beginRecording: function() {},
377 finishRecordingAsPicture: function() {},
378 },
379
Kevin Lubick006a6f32018-10-19 14:34:34 -0400380 SkRect: {
381 fLeft: {},
382 fTop: {},
383 fRight: {},
384 fBottom: {},
385 },
386
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400387 SkRRect: {
388 rect: {},
Kevin Lubick7d644e12019-09-11 14:22:22 -0400389 rx1: {},
390 ry1: {},
391 rx2: {},
392 ry2: {},
393 rx3: {},
394 ry3: {},
395 rx4: {},
396 ry4: {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400397 },
398
Kevin Lubick006a6f32018-10-19 14:34:34 -0400399 SkSurface: {
400 // public API (from C++ bindings)
401 /** @return {CanvasKit.SkCanvas} */
402 getCanvas: function() {},
403 /** @return {CanvasKit.SkImage} */
404 makeImageSnapshot: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -0500405 makeSurface: function() {},
Kevin Lubickcd544662019-03-22 15:41:36 -0400406 grContext: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400407
408 // private API
409 _flush: function() {},
410 _getRasterN32PremulSurface: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400411 delete: function() {},
412 },
413
Kevin Lubickec4903d2019-01-14 08:36:08 -0500414 SkTextBlob: {
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400415 // public API (both C++ and JS bindings)
416 MakeFromRSXform: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500417 MakeFromText: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400418 MakeOnPath: function() {},
419 // private API (from C++ bindings)
420 _MakeFromRSXform: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500421 _MakeFromText: function() {},
422 },
423
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400424 SkVertices: {
425 // public API (from C++ bindings)
Kevin Lubick12c0e502018-11-28 12:51:56 -0500426 bounds: function() {},
427 mode: function() {},
428 uniqueID: function() {},
429 vertexCount: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400430
431 // private API
432 /** @return {CanvasKit.SkVertices} */
433 _applyBones: function() {},
434 },
435
Kevin Lubickd6ba7252019-06-03 14:38:05 -0400436 _SkVerticesBuilder: {
437 // public API (from C++ bindings)
438 boneIndices: function() {},
439 boneWeights: function() {},
440 colors: function() {},
441 detach: function() {},
442 indices: function() {},
443 positions: function() {},
444 texCoords: function() {},
445 },
446
Kevin Lubick369f6a52019-10-03 11:22:08 -0400447 TextStyle: function() {},
448
Kevin Lubick006a6f32018-10-19 14:34:34 -0400449 // Constants and Enums
450 gpu: {},
451 skottie: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400452
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500453 TRANSPARENT: {},
454 RED: {},
455 BLUE: {},
456 YELLOW: {},
457 CYAN: {},
458 BLACK: {},
Kevin Lubickea905ec2018-11-30 14:05:58 -0500459 WHITE: {},
460
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500461 MOVE_VERB: {},
462 LINE_VERB: {},
463 QUAD_VERB: {},
464 CONIC_VERB: {},
465 CUBIC_VERB: {},
466 CLOSE_VERB: {},
467
Kevin Lubick369f6a52019-10-03 11:22:08 -0400468 NoDecoration: {},
469 UnderlineDecoration: {},
470 OverlineDecoration: {},
471 LineThroughDecoration: {},
472
Kevin Lubick77d9b5c2019-10-29 10:48:26 -0400473 SaveLayerInitWithPrevious: {},
474 SaveLayerF16ColorType: {},
475
Kevin Lubick369f6a52019-10-03 11:22:08 -0400476 Affinity: {
477 Upstream: {},
478 Downstream: {},
479 },
480
Kevin Lubickea905ec2018-11-30 14:05:58 -0500481 AlphaType: {
482 Opaque: {},
483 Premul: {},
484 Unpremul: {},
485 },
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500486
487 BlendMode: {
488 Clear: {},
489 Src: {},
490 Dst: {},
491 SrcOver: {},
492 DstOver: {},
493 SrcIn: {},
494 DstIn: {},
495 SrcOut: {},
496 DstOut: {},
497 SrcATop: {},
498 DstATop: {},
499 Xor: {},
500 Plus: {},
501 Modulate: {},
502 Screen: {},
503 Overlay: {},
504 Darken: {},
505 Lighten: {},
506 ColorDodge: {},
507 ColorBurn: {},
508 HardLight: {},
509 SoftLight: {},
510 Difference: {},
511 Exclusion: {},
512 Multiply: {},
513 Hue: {},
514 Saturation: {},
515 Color: {},
516 Luminosity: {},
517 },
518
519 BlurStyle: {
520 Normal: {},
521 Solid: {},
522 Outer: {},
523 Inner: {},
524 },
525
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500526 ClipOp: {
527 Difference: {},
528 Intersect: {},
529 },
530
Kevin Lubickea905ec2018-11-30 14:05:58 -0500531 ColorType: {
532 Alpha_8: {},
533 RGB_565: {},
534 ARGB_4444: {},
535 RGBA_8888: {},
536 RGB_888x: {},
537 BGRA_8888: {},
538 RGBA_1010102: {},
539 RGB_101010x: {},
540 Gray_8: {},
541 RGBA_F16: {},
542 RGBA_F32: {},
543 },
544
Kevin Lubick006a6f32018-10-19 14:34:34 -0400545 FillType: {
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500546 Winding: {},
547 EvenOdd: {},
548 InverseWinding: {},
549 InverseEvenOdd: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400550 },
551
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500552 FilterQuality: {
553 None: {},
554 Low: {},
555 Medium: {},
556 High: {},
557 },
558
Kevin Lubickd3b1fe62019-10-21 10:50:26 -0400559 FontSlant: {
560 Upright: {},
561 Italic: {},
562 Oblique: {},
563 },
564
565 FontWeight: {
566 Invisible: {},
567 Thin: {},
568 ExtraLight: {},
569 Light: {},
570 Normal: {},
571 Medium: {},
572 SemiBold: {},
573 Bold: {},
574 ExtraBold: {},
575 Black: {},
576 ExtraBlack: {},
577 },
578
579 FontWidth: {
580 UltraCondensed: {},
581 ExtraCondensed: {},
582 Condensed: {},
583 SemiCondensed: {},
584 Normal: {},
585 SemiExpanded: {},
586 Expanded: {},
587 ExtraExpanded: {},
588 UltraExpanded: {},
589 },
590
Alexander Khovansky3e119332018-11-15 02:01:19 +0300591 ImageFormat: {
592 PNG: {},
593 JPEG: {},
594 },
595
Kevin Lubickb9db3902018-11-26 11:47:54 -0500596 PaintStyle: {
597 Fill: {},
598 Stroke: {},
599 StrokeAndFill: {},
600 },
601
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500602 PathOp: {
603 Difference: {},
604 Intersect: {},
605 Union: {},
606 XOR: {},
607 ReverseDifference: {},
608 },
609
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500610 PointMode: {
611 Points: {},
612 Lines: {},
613 Polygon: {},
614 },
615
Kevin Lubick369f6a52019-10-03 11:22:08 -0400616 RectHeightStyle: {
617 Tight: {},
618 Max: {},
Kevin Lubick4a5f4f22019-11-20 08:27:10 -0500619 IncludeLineSpacingMiddle: {},
620 IncludeLineSpacingTop: {},
621 IncludeLineSpacingBottom: {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400622 },
623
624 RectWidthStyle: {
625 Tight: {},
626 Max: {},
627 },
628
Kevin Lubickb9db3902018-11-26 11:47:54 -0500629 StrokeCap: {
630 Butt: {},
631 Round: {},
632 Square: {},
633 },
634
635 StrokeJoin: {
636 Miter: {},
637 Round: {},
638 Bevel: {},
639 },
640
Kevin Lubick369f6a52019-10-03 11:22:08 -0400641 TextAlign: {
642 Left: {},
643 Right: {},
644 Center: {},
645 Justify: {},
646 Start: {},
647 End: {},
648 },
649
Kevin Lubickd3b1fe62019-10-21 10:50:26 -0400650 TextDirection: {
651 LTR: {},
652 RTL: {},
653 },
654
Kevin Lubickec4903d2019-01-14 08:36:08 -0500655 TextEncoding: {
656 UTF8: {},
657 UTF16: {},
658 UTF32: {},
659 GlyphID: {},
660 },
661
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500662 TileMode: {
663 Clamp: {},
664 Repeat: {},
665 Mirror: {},
Kevin Lubickd29edd72018-12-07 08:29:52 -0500666 Decal: {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500667 },
668
669 VertexMode: {
670 Triangles: {},
671 TrianglesStrip: {},
672 TriangleFan: {},
673 },
674
Kevin Lubick006a6f32018-10-19 14:34:34 -0400675 // Things Enscriptem adds for us
676
Kevin Lubick53965c92018-10-11 08:51:55 -0400677 /**
678 * @type {Float32Array}
679 */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400680 HEAPF32: {},
Kevin Lubick53965c92018-10-11 08:51:55 -0400681 /**
Kevin Lubickfa5a1382019-10-09 10:46:14 -0400682 * @type {Float64Array}
683 */
684 HEAPF64: {},
685 /**
Kevin Lubick53965c92018-10-11 08:51:55 -0400686 * @type {Uint8Array}
687 */
688 HEAPU8: {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400689 /**
690 * @type {Uint16Array}
691 */
692 HEAPU16: {},
693 /**
Kevin Lubickf5ea37f2019-02-28 10:06:18 -0500694 * @type {Uint32Array}
695 */
696 HEAPU32: {},
Kevin Lubickfa5a1382019-10-09 10:46:14 -0400697 /**
698 * @type {Int8Array}
699 */
700 HEAP8: {},
701 /**
702 * @type {Int16Array}
703 */
704 HEAP16: {},
705 /**
706 * @type {Int32Array}
707 */
708 HEAP32: {},
709
Kevin Lubick006a6f32018-10-19 14:34:34 -0400710 _malloc: function() {},
711 _free: function() {},
712 onRuntimeInitialized: function() {},
713};
Kevin Lubick217056c2018-09-20 17:39:31 -0400714
Kevin Lubick006a6f32018-10-19 14:34:34 -0400715// Public API things that are newly declared in the JS should go here.
716// It's not enough to declare them above, because closure can still erase them
717// unless they go on the prototype.
Kevin Lubick369f6a52019-10-03 11:22:08 -0400718CanvasKit.Paragraph.prototype.getRectsForRange = function() {};
719
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500720CanvasKit.SkPath.prototype.addArc = function() {};
Kevin Lubicke384df42019-08-26 15:48:09 -0400721CanvasKit.SkPath.prototype.addOval = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400722CanvasKit.SkPath.prototype.addPath = function() {};
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500723CanvasKit.SkPath.prototype.addPoly = function() {};
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500724CanvasKit.SkPath.prototype.addRect = function() {};
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500725CanvasKit.SkPath.prototype.addRoundRect = function() {};
Alexander Khovansky3e119332018-11-15 02:01:19 +0300726CanvasKit.SkPath.prototype.arc = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400727CanvasKit.SkPath.prototype.arcTo = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400728CanvasKit.SkPath.prototype.close = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400729CanvasKit.SkPath.prototype.conicTo = function() {};
730CanvasKit.SkPath.prototype.cubicTo = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400731CanvasKit.SkPath.prototype.dash = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400732CanvasKit.SkPath.prototype.lineTo = function() {};
733CanvasKit.SkPath.prototype.moveTo = function() {};
Kevin Lubicke384df42019-08-26 15:48:09 -0400734CanvasKit.SkPath.prototype.offset = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400735CanvasKit.SkPath.prototype.op = function() {};
736CanvasKit.SkPath.prototype.quadTo = function() {};
Kevin Lubick79b71342019-11-01 14:36:52 -0400737CanvasKit.SkPath.prototype.rArcTo = function() {};
738CanvasKit.SkPath.prototype.rConicTo = function() {};
739CanvasKit.SkPath.prototype.rCubicTo = function() {};
740CanvasKit.SkPath.prototype.rLineTo = function() {};
741CanvasKit.SkPath.prototype.rMoveTo = function() {};
742CanvasKit.SkPath.prototype.rQuadTo = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400743CanvasKit.SkPath.prototype.rect = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400744CanvasKit.SkPath.prototype.simplify = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400745CanvasKit.SkPath.prototype.stroke = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400746CanvasKit.SkPath.prototype.transform = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400747CanvasKit.SkPath.prototype.trim = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400748
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400749CanvasKit.SkPicture.prototype.DEBUGONLY_saveAsFile = function() {};
750
Kevin Lubick5b90b842018-10-17 07:57:18 -0400751CanvasKit.SkSurface.prototype.dispose = function() {};
Kevin Lubick359a7e32019-03-19 09:34:37 -0400752CanvasKit.SkSurface.prototype.flush = function() {};
753CanvasKit.SkSurface.prototype.requestAnimationFrame = function() {};
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400754CanvasKit.SkSurface.prototype.captureFrameAsSkPicture = function() {};
Kevin Lubick53965c92018-10-11 08:51:55 -0400755
Kevin Lubick12c0e502018-11-28 12:51:56 -0500756/** @return {CanvasKit.SkVertices} */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400757CanvasKit.SkVertices.prototype.applyBones = function() {};
758
Alexander Khovansky3e119332018-11-15 02:01:19 +0300759CanvasKit.SkImage.prototype.encodeToData = function() {};
Kevin Lubicka064c282019-04-04 09:28:53 -0400760CanvasKit.SkImage.prototype.makeShader = function() {};
Alexander Khovansky3e119332018-11-15 02:01:19 +0300761
Kevin Lubickee91c072019-03-29 10:39:52 -0400762CanvasKit.SkCanvas.prototype.drawAtlas = function() {};
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500763CanvasKit.SkCanvas.prototype.drawPoints = function() {};
Kevin Lubickec4903d2019-01-14 08:36:08 -0500764CanvasKit.SkCanvas.prototype.drawText = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500765/** @return {Uint8Array} */
766CanvasKit.SkCanvas.prototype.readPixels = function() {};
767CanvasKit.SkCanvas.prototype.writePixels = function() {};
768
Kevin Lubickddd0a332018-12-12 10:35:13 -0500769CanvasKit.SkFontMgr.prototype.MakeTypefaceFromData = function() {};
770
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400771CanvasKit.SkFont.prototype.getWidths = function() {};
772
773CanvasKit.RSXFormBuilder.prototype.build = function() {};
774CanvasKit.RSXFormBuilder.prototype.delete = function() {};
775CanvasKit.RSXFormBuilder.prototype.push = function() {};
Kevin Lubickee91c072019-03-29 10:39:52 -0400776CanvasKit.RSXFormBuilder.prototype.set = function() {};
777
778CanvasKit.SkColorBuilder.prototype.build = function() {};
779CanvasKit.SkColorBuilder.prototype.delete = function() {};
780CanvasKit.SkColorBuilder.prototype.push = function() {};
781CanvasKit.SkColorBuilder.prototype.set = function() {};
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400782
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400783// Define StrokeOpts object
784var StrokeOpts = {};
785StrokeOpts.prototype.width;
786StrokeOpts.prototype.miter_limit;
787StrokeOpts.prototype.cap;
788StrokeOpts.prototype.join;
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500789StrokeOpts.prototype.precision;
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400790
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500791// Define everything created in the canvas2d spec here
Kevin Lubickb9db3902018-11-26 11:47:54 -0500792var HTMLCanvas = {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500793HTMLCanvas.prototype.decodeImage = function() {};
794HTMLCanvas.prototype.dispose = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500795HTMLCanvas.prototype.getContext = function() {};
Kevin Lubick8e4a3312018-12-14 15:03:41 -0500796HTMLCanvas.prototype.loadFont = function() {};
Kevin Lubicka40f8322018-12-17 16:01:36 -0500797HTMLCanvas.prototype.makePath2D = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500798HTMLCanvas.prototype.toDataURL = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500799
800var CanvasRenderingContext2D = {};
801CanvasRenderingContext2D.prototype.addHitRegion = function() {};
802CanvasRenderingContext2D.prototype.arc = function() {};
803CanvasRenderingContext2D.prototype.arcTo = function() {};
804CanvasRenderingContext2D.prototype.beginPath = function() {};
805CanvasRenderingContext2D.prototype.bezierCurveTo = function() {};
806CanvasRenderingContext2D.prototype.clearHitRegions = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500807CanvasRenderingContext2D.prototype.clearRect = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500808CanvasRenderingContext2D.prototype.clip = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500809CanvasRenderingContext2D.prototype.closePath = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500810CanvasRenderingContext2D.prototype.createImageData = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500811CanvasRenderingContext2D.prototype.createLinearGradient = function() {};
Kevin Lubickd29edd72018-12-07 08:29:52 -0500812CanvasRenderingContext2D.prototype.createPattern = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500813CanvasRenderingContext2D.prototype.createRadialGradient = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500814CanvasRenderingContext2D.prototype.drawFocusIfNeeded = function() {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500815CanvasRenderingContext2D.prototype.drawImage = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500816CanvasRenderingContext2D.prototype.ellipse = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500817CanvasRenderingContext2D.prototype.fill = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500818CanvasRenderingContext2D.prototype.fillRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500819CanvasRenderingContext2D.prototype.fillText = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500820CanvasRenderingContext2D.prototype.getImageData = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500821CanvasRenderingContext2D.prototype.getLineDash = function() {};
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500822CanvasRenderingContext2D.prototype.isPointInPath = function() {};
823CanvasRenderingContext2D.prototype.isPointInStroke = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500824CanvasRenderingContext2D.prototype.lineTo = function() {};
825CanvasRenderingContext2D.prototype.measureText = function() {};
826CanvasRenderingContext2D.prototype.moveTo = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500827CanvasRenderingContext2D.prototype.putImageData = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500828CanvasRenderingContext2D.prototype.quadraticCurveTo = function() {};
829CanvasRenderingContext2D.prototype.rect = function() {};
830CanvasRenderingContext2D.prototype.removeHitRegion = function() {};
831CanvasRenderingContext2D.prototype.resetTransform = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500832CanvasRenderingContext2D.prototype.restore = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500833CanvasRenderingContext2D.prototype.rotate = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500834CanvasRenderingContext2D.prototype.save = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500835CanvasRenderingContext2D.prototype.scale = function() {};
836CanvasRenderingContext2D.prototype.scrollPathIntoView = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500837CanvasRenderingContext2D.prototype.setLineDash = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500838CanvasRenderingContext2D.prototype.setTransform = function() {};
839CanvasRenderingContext2D.prototype.stroke = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500840CanvasRenderingContext2D.prototype.strokeRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500841CanvasRenderingContext2D.prototype.strokeText = function() {};
842CanvasRenderingContext2D.prototype.transform = function() {};
843CanvasRenderingContext2D.prototype.translate = function() {};
844
Kevin Lubicka40f8322018-12-17 16:01:36 -0500845var Path2D = {};
846Path2D.prototype.addPath = function() {};
847Path2D.prototype.arc = function() {};
848Path2D.prototype.arcTo = function() {};
849Path2D.prototype.bezierCurveTo = function() {};
850Path2D.prototype.closePath = function() {};
851Path2D.prototype.ellipse = function() {};
852Path2D.prototype.lineTo = function() {};
853Path2D.prototype.moveTo = function() {};
854Path2D.prototype.quadraticCurveTo = function() {};
855Path2D.prototype.rect = function() {};
856
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500857var LinearCanvasGradient = {};
858LinearCanvasGradient.prototype.addColorStop = function() {};
859var RadialCanvasGradient = {};
860RadialCanvasGradient.prototype.addColorStop = function() {};
Kevin Lubickd29edd72018-12-07 08:29:52 -0500861var CanvasPattern = {};
862CanvasPattern.prototype.setTransform = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500863
Kevin Lubick52b9f372018-12-04 13:57:36 -0500864var ImageData = {
865 /**
866 * @type {Uint8ClampedArray}
867 */
868 data: {},
869 height: {},
870 width: {},
871};
872
Kevin Lubickd29edd72018-12-07 08:29:52 -0500873var DOMMatrix = {
874 a: {},
875 b: {},
876 c: {},
877 d: {},
878 e: {},
879 f: {},
880};
881
Kevin Lubick217056c2018-09-20 17:39:31 -0400882// Not sure why this is needed - might be a bug in emsdk that this isn't properly declared.
Kevin Lubick6fccc9d2018-11-20 15:55:10 -0500883function loadWebAssemblyModule() {};