blob: b4e30a9de9eaaa6202f3d4674693be59015dd3e9 [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 Lubick61ef7b22018-11-27 13:26:59 -050032 MakeBlurMaskFilter: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040033 MakeCanvas: function() {},
34 MakeCanvasSurface: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040035 MakeImageShader: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050036 /** @return {CanvasKit.SkImage} */
37 MakeImageFromEncoded: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050038 /** @return {LinearCanvasGradient} */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040039 MakeLinearGradientShader: function() {},
Kevin Lubick134be1d2018-10-30 15:05:04 -040040 MakeNimaActor: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050041 MakeRadialGradientShader: function() {},
42 MakeSWCanvasSurface: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040043 MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040044 MakeSkVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040045 MakeSurface: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050046 /** @return {RadialCanvasGradient} */
47 MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050048 MakeWebGLCanvasSurface: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040049 currentContext: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050050 getColorComponents: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050051 getSkDataBytes: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040052 initFonts: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050053 multiplyByAlpha: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040054 setCurrentContext: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040055
56 // private API (i.e. things declared in the bindings that we use
57 // in the pre-js file)
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040058 _MakeImageShader: function() {},
59 _MakeLinearGradientShader: function() {},
Kevin Lubick134be1d2018-10-30 15:05:04 -040060 _MakeNimaActor: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040061 _MakeRadialGradientShader: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040062 _MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040063 _MakeSkVertices: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050064 _MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050065 _decodeImage: function() {},
Kevin Lubickea905ec2018-11-30 14:05:58 -050066 _getRasterDirectSurface: function() {},
Kevin Lubick134be1d2018-10-30 15:05:04 -040067 _getRasterN32PremulSurface: function() {},
68 _getWebGLSurface: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040069
Kevin Lubick1a05fce2018-11-20 12:51:16 -050070 // The testing object is meant to expose internal functions
71 // for more fine-grained testing, e.g. parseColor
72 _testing: {},
73
Kevin Lubick217056c2018-09-20 17:39:31 -040074 // Objects and properties on CanvasKit
75
Kevin Lubick134be1d2018-10-30 15:05:04 -040076 NimaActor: {
77 // public API (from C++ bindings)
78 duration: function() {},
79 getAnimationNames: function() {},
80 render: function() {},
81 seek: function() {},
82 setAnimationByIndex: function() {},
83 setAnimationByName: function() {},
84
85 // private API
86 },
87
Kevin Lubick006a6f32018-10-19 14:34:34 -040088 SkCanvas: {
89 // public API (from C++ bindings)
90 clear: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050091 clipPath: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050092 drawImage: function() {},
93 drawImageRect: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040094 drawPaint: function() {},
95 drawPath: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050096 drawRect: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050097 drawShadow: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050098 drawText: function() {},
99 drawVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400100 flush: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500101 restore: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400102 rotate: function() {},
103 save: function() {},
104 scale: function() {},
105 setMatrix: function() {},
106 skew: function() {},
107 translate: function() {},
108
109 // private API
110 delete: function() {},
111 },
112
113 SkImage: {
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500114 // public API (from C++ bindings)
115 height: function() {},
116 width: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300117 // private API
118 _encodeToData: function() {},
119 _encodeToDataWithFormat: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400120 },
121
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500122 SkMatrix: {
Kevin Lubickb9db3902018-11-26 11:47:54 -0500123 identity: function() {},
124 mapPoints: function() {},
125 multiply: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500126 rotated: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500127 scaled: function() {},
128 skewed: function() {},
129 translated: function() {},
130 },
131
132 SkPaint: {
133 // public API (from C++ bindings)
134 /** @return {CanvasKit.SkPaint} */
135 copy: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500136 getBlendMode: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500137 getColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500138 getFilterQuality: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500139 getStrokeCap: function() {},
140 getStrokeJoin: function() {},
141 getStrokeMiter: function() {},
142 getStrokeWidth: function() {},
143 getTextSize: function() {},
144 measureText: function() {},
145 setAntiAlias: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500146 setBlendMode: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500147 setColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500148 setFilterQuality: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500149 setMaskFilter: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500150 setPathEffect: function() {},
151 setShader: function() {},
152 setStrokeCap: function() {},
153 setStrokeJoin: function() {},
154 setStrokeMiter: function() {},
155 setStrokeWidth: function() {},
156 setStyle: function() {},
157 setTextSize: function() {},
158
159 //private API
160 delete: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500161 },
162
Kevin Lubick006a6f32018-10-19 14:34:34 -0400163 SkPath: {
164 // public API (from C++ bindings)
Kevin Lubickb9db3902018-11-26 11:47:54 -0500165 computeTightBounds: function() {},
166 /** @return {CanvasKit.SkPath} */
167 copy: function() {},
168 countPoints: function() {},
169 equals: function() {},
170 getBounds: function() {},
171 getFillType: function() {},
172 getPoint: function() {},
173 setFillType: function() {},
174 toSVGString: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400175
176 // private API
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500177 _addArc: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400178 _addPath: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500179 _addRect: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300180 _arc: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400181 _arcTo: function() {},
182 _close: function() {},
183 _conicTo: function() {},
184 _cubicTo: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400185 _dash: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400186 _lineTo: function() {},
187 _moveTo: function() {},
188 _op: function() {},
189 _quadTo: function() {},
190 _rect: function() {},
191 _simplify: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400192 _stroke: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400193 _transform: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400194 _trim: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400195 delete: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500196 dump: function() {},
197 dumpHex: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400198 },
199
200 SkRect: {
201 fLeft: {},
202 fTop: {},
203 fRight: {},
204 fBottom: {},
205 },
206
207 SkSurface: {
208 // public API (from C++ bindings)
209 /** @return {CanvasKit.SkCanvas} */
210 getCanvas: function() {},
211 /** @return {CanvasKit.SkImage} */
212 makeImageSnapshot: function() {},
213
214 // private API
215 _flush: function() {},
216 _getRasterN32PremulSurface: function() {},
217 _readPixels: function() {},
218 delete: function() {},
219 },
220
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400221 SkVertices: {
222 // public API (from C++ bindings)
Kevin Lubick12c0e502018-11-28 12:51:56 -0500223 bounds: function() {},
224 mode: function() {},
225 uniqueID: function() {},
226 vertexCount: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400227
228 // private API
229 /** @return {CanvasKit.SkVertices} */
230 _applyBones: function() {},
231 },
232
Kevin Lubick006a6f32018-10-19 14:34:34 -0400233 // Constants and Enums
234 gpu: {},
235 skottie: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400236
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500237 TRANSPARENT: {},
238 RED: {},
239 BLUE: {},
240 YELLOW: {},
241 CYAN: {},
242 BLACK: {},
Kevin Lubickea905ec2018-11-30 14:05:58 -0500243 WHITE: {},
244
245 AlphaType: {
246 Opaque: {},
247 Premul: {},
248 Unpremul: {},
249 },
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500250
251 BlendMode: {
252 Clear: {},
253 Src: {},
254 Dst: {},
255 SrcOver: {},
256 DstOver: {},
257 SrcIn: {},
258 DstIn: {},
259 SrcOut: {},
260 DstOut: {},
261 SrcATop: {},
262 DstATop: {},
263 Xor: {},
264 Plus: {},
265 Modulate: {},
266 Screen: {},
267 Overlay: {},
268 Darken: {},
269 Lighten: {},
270 ColorDodge: {},
271 ColorBurn: {},
272 HardLight: {},
273 SoftLight: {},
274 Difference: {},
275 Exclusion: {},
276 Multiply: {},
277 Hue: {},
278 Saturation: {},
279 Color: {},
280 Luminosity: {},
281 },
282
283 BlurStyle: {
284 Normal: {},
285 Solid: {},
286 Outer: {},
287 Inner: {},
288 },
289
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500290 ClipOp: {
291 Difference: {},
292 Intersect: {},
293 },
294
Kevin Lubickea905ec2018-11-30 14:05:58 -0500295 ColorType: {
296 Alpha_8: {},
297 RGB_565: {},
298 ARGB_4444: {},
299 RGBA_8888: {},
300 RGB_888x: {},
301 BGRA_8888: {},
302 RGBA_1010102: {},
303 RGB_101010x: {},
304 Gray_8: {},
305 RGBA_F16: {},
306 RGBA_F32: {},
307 },
308
Kevin Lubick006a6f32018-10-19 14:34:34 -0400309 FillType: {
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500310 Winding: {},
311 EvenOdd: {},
312 InverseWinding: {},
313 InverseEvenOdd: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400314 },
315
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500316 FilterQuality: {
317 None: {},
318 Low: {},
319 Medium: {},
320 High: {},
321 },
322
Alexander Khovansky3e119332018-11-15 02:01:19 +0300323 ImageFormat: {
324 PNG: {},
325 JPEG: {},
326 },
327
Kevin Lubickb9db3902018-11-26 11:47:54 -0500328 PaintStyle: {
329 Fill: {},
330 Stroke: {},
331 StrokeAndFill: {},
332 },
333
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500334 PathOp: {
335 Difference: {},
336 Intersect: {},
337 Union: {},
338 XOR: {},
339 ReverseDifference: {},
340 },
341
Kevin Lubickb9db3902018-11-26 11:47:54 -0500342 StrokeCap: {
343 Butt: {},
344 Round: {},
345 Square: {},
346 },
347
348 StrokeJoin: {
349 Miter: {},
350 Round: {},
351 Bevel: {},
352 },
353
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500354 TileMode: {
355 Clamp: {},
356 Repeat: {},
357 Mirror: {},
358 },
359
360 VertexMode: {
361 Triangles: {},
362 TrianglesStrip: {},
363 TriangleFan: {},
364 },
365
Kevin Lubick006a6f32018-10-19 14:34:34 -0400366 // Things Enscriptem adds for us
367
Kevin Lubick53965c92018-10-11 08:51:55 -0400368 /** Represents the heap of the WASM code
369 * @type {ArrayBuffer}
370 */
371 buffer: {},
372 /**
373 * @type {Float32Array}
374 */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400375 HEAPF32: {},
Kevin Lubick53965c92018-10-11 08:51:55 -0400376 /**
377 * @type {Uint8Array}
378 */
379 HEAPU8: {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400380 /**
381 * @type {Uint16Array}
382 */
383 HEAPU16: {},
384 /**
385 * @type {Int32Array}
386 */
387 HEAP32: {},
Kevin Lubick53965c92018-10-11 08:51:55 -0400388
Kevin Lubick006a6f32018-10-19 14:34:34 -0400389 _malloc: function() {},
390 _free: function() {},
391 onRuntimeInitialized: function() {},
392};
Kevin Lubick217056c2018-09-20 17:39:31 -0400393
Kevin Lubick006a6f32018-10-19 14:34:34 -0400394// Public API things that are newly declared in the JS should go here.
395// It's not enough to declare them above, because closure can still erase them
396// unless they go on the prototype.
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500397CanvasKit.SkPath.prototype.addArc = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400398CanvasKit.SkPath.prototype.addPath = function() {};
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500399CanvasKit.SkPath.prototype.addRect = function() {};
Alexander Khovansky3e119332018-11-15 02:01:19 +0300400CanvasKit.SkPath.prototype.arc = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400401CanvasKit.SkPath.prototype.arcTo = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400402CanvasKit.SkPath.prototype.close = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400403CanvasKit.SkPath.prototype.conicTo = function() {};
404CanvasKit.SkPath.prototype.cubicTo = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400405CanvasKit.SkPath.prototype.dash = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400406CanvasKit.SkPath.prototype.lineTo = function() {};
407CanvasKit.SkPath.prototype.moveTo = function() {};
408CanvasKit.SkPath.prototype.op = function() {};
409CanvasKit.SkPath.prototype.quadTo = function() {};
410CanvasKit.SkPath.prototype.rect = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400411CanvasKit.SkPath.prototype.simplify = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400412CanvasKit.SkPath.prototype.stroke = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400413CanvasKit.SkPath.prototype.transform = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400414CanvasKit.SkPath.prototype.trim = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400415
Kevin Lubick53965c92018-10-11 08:51:55 -0400416CanvasKit.SkSurface.prototype.flush = function() {};
Kevin Lubick5b90b842018-10-17 07:57:18 -0400417CanvasKit.SkSurface.prototype.dispose = function() {};
Kevin Lubick53965c92018-10-11 08:51:55 -0400418
Kevin Lubick12c0e502018-11-28 12:51:56 -0500419/** @return {CanvasKit.SkVertices} */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400420CanvasKit.SkVertices.prototype.applyBones = function() {};
421
Alexander Khovansky3e119332018-11-15 02:01:19 +0300422CanvasKit.SkImage.prototype.encodeToData = function() {};
423
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400424// Define StrokeOpts object
425var StrokeOpts = {};
426StrokeOpts.prototype.width;
427StrokeOpts.prototype.miter_limit;
428StrokeOpts.prototype.cap;
429StrokeOpts.prototype.join;
430
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500431// Define everything created in the canvas2d spec here
Kevin Lubickb9db3902018-11-26 11:47:54 -0500432var HTMLCanvas = {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500433HTMLCanvas.prototype.decodeImage = function() {};
434HTMLCanvas.prototype.dispose = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500435HTMLCanvas.prototype.getContext = function() {};
436HTMLCanvas.prototype.toDataURL = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500437
438var CanvasRenderingContext2D = {};
439CanvasRenderingContext2D.prototype.addHitRegion = function() {};
440CanvasRenderingContext2D.prototype.arc = function() {};
441CanvasRenderingContext2D.prototype.arcTo = function() {};
442CanvasRenderingContext2D.prototype.beginPath = function() {};
443CanvasRenderingContext2D.prototype.bezierCurveTo = function() {};
444CanvasRenderingContext2D.prototype.clearHitRegions = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500445CanvasRenderingContext2D.prototype.clearRect = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500446CanvasRenderingContext2D.prototype.clip = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500447CanvasRenderingContext2D.prototype.closePath = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500448CanvasRenderingContext2D.prototype.createLinearGradient = function() {};
449CanvasRenderingContext2D.prototype.createRadialGradient = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500450CanvasRenderingContext2D.prototype.drawFocusIfNeeded = function() {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500451CanvasRenderingContext2D.prototype.drawImage = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500452CanvasRenderingContext2D.prototype.ellipse = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500453CanvasRenderingContext2D.prototype.fill = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500454CanvasRenderingContext2D.prototype.fillRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500455CanvasRenderingContext2D.prototype.fillText = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500456CanvasRenderingContext2D.prototype.getLineDash = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500457CanvasRenderingContext2D.prototype.lineTo = function() {};
458CanvasRenderingContext2D.prototype.measureText = function() {};
459CanvasRenderingContext2D.prototype.moveTo = function() {};
460CanvasRenderingContext2D.prototype.quadraticCurveTo = function() {};
461CanvasRenderingContext2D.prototype.rect = function() {};
462CanvasRenderingContext2D.prototype.removeHitRegion = function() {};
463CanvasRenderingContext2D.prototype.resetTransform = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500464CanvasRenderingContext2D.prototype.restore = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500465CanvasRenderingContext2D.prototype.rotate = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500466CanvasRenderingContext2D.prototype.save = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500467CanvasRenderingContext2D.prototype.scale = function() {};
468CanvasRenderingContext2D.prototype.scrollPathIntoView = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500469CanvasRenderingContext2D.prototype.setLineDash = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500470CanvasRenderingContext2D.prototype.setTransform = function() {};
471CanvasRenderingContext2D.prototype.stroke = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500472CanvasRenderingContext2D.prototype.strokeRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500473CanvasRenderingContext2D.prototype.strokeText = function() {};
474CanvasRenderingContext2D.prototype.transform = function() {};
475CanvasRenderingContext2D.prototype.translate = function() {};
476
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500477var LinearCanvasGradient = {};
478LinearCanvasGradient.prototype.addColorStop = function() {};
479var RadialCanvasGradient = {};
480RadialCanvasGradient.prototype.addColorStop = function() {};
481
Kevin Lubick217056c2018-09-20 17:39:31 -0400482// 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 -0500483function loadWebAssemblyModule() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500484
485var DOMMatrix = {};