blob: c071df166fc7235936bad3364a7f38f9cbb33483 [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() {},
Brian Osman2a490bc2019-11-27 13:36:40 -050056 MakeParticles: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040057 MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040058 MakeSkVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040059 MakeSurface: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050060 /** @return {RadialCanvasGradient} */
61 MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050062 MakeWebGLCanvasSurface: function() {},
Kevin Lubicke25df6c2019-10-22 09:04:32 -040063 /** @return {TypedArray} */
64 Malloc: function() {},
Kevin Lubick50f377e2019-09-11 15:23:00 -040065 /** @return {TonalColors} */
66 computeTonalColors: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040067 currentContext: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -050068 getColorComponents: function() {},
Florin Malita0d603d82019-11-25 13:45:28 -050069 getDecodeCacheLimitBytes: function() {},
70 getDecodeCacheUsageBytes: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050071 getSkDataBytes: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -050072 multiplyByAlpha: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040073 setCurrentContext: function() {},
Florin Malita0d603d82019-11-25 13:45:28 -050074 setDecodeCacheLimitBytes: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040075
76 // private API (i.e. things declared in the bindings that we use
77 // in the pre-js file)
Kevin Lubick52b9f372018-12-04 13:57:36 -050078 _MakeImage: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040079 _MakeLinearGradientShader: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -050080 _MakePathFromCmds: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040081 _MakeRadialGradientShader: function() {},
Kevin Lubickf5ea37f2019-02-28 10:06:18 -050082 _MakeManagedAnimation: function() {},
Brian Osman2a490bc2019-11-27 13:36:40 -050083 _MakeParticles: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -040084 _MakeSkDashPathEffect: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -040085 _MakeSkVertices: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -050086 _MakeTwoPointConicalGradientShader: function() {},
Kevin Lubick6b921b72019-09-18 16:18:17 -040087 _decodeAnimatedImage: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -050088 _decodeImage: function() {},
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -050089 _drawShapedText: function() {},
Kevin Lubickea905ec2018-11-30 14:05:58 -050090 _getRasterDirectSurface: function() {},
Kevin Lubick134be1d2018-10-30 15:05:04 -040091 _getRasterN32PremulSurface: function() {},
Kevin Lubick217056c2018-09-20 17:39:31 -040092
Kevin Lubick1a05fce2018-11-20 12:51:16 -050093 // The testing object is meant to expose internal functions
94 // for more fine-grained testing, e.g. parseColor
95 _testing: {},
96
Kevin Lubick217056c2018-09-20 17:39:31 -040097 // Objects and properties on CanvasKit
98
Kevin Lubickcd544662019-03-22 15:41:36 -040099 GrContext: {
100 // public API (from C++ bindings)
101 getResourceCacheLimitBytes: function() {},
102 getResourceCacheUsageBytes: function() {},
103 setResourceCacheLimitBytes: function() {},
104 },
105
Kevin Lubick369f6a52019-10-03 11:22:08 -0400106 Paragraph: {
107 // public API (from C++ bindings)
Kevin Lubick04912672019-11-15 14:48:55 -0500108 didExceedMaxLines: function() {},
109 getAlphabeticBaseline: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400110 getGlyphPositionAtCoordinate: function() {},
Kevin Lubick04912672019-11-15 14:48:55 -0500111 getHeight: function() {},
112 getIdeographicBaseline: function() {},
113 getLongestLine: function() {},
114 getMaxIntrinsicWidth: function() {},
115 getMaxWidth: function() {},
116 getMinIntrinsicWidth: function() {},
117 getWordBoundary: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400118 layout: function() {},
119
120 // private API
121 /** @return {Float32Array} */
122 _getRectsForRange: function() {},
123 },
124
125 ParagraphStyle: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400126 RSXFormBuilder: function() {},
Kevin Lubickee91c072019-03-29 10:39:52 -0400127 SkColorBuilder: function() {},
128 SkRectBuilder: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400129
Kevin Lubick1ba9c4d2019-02-22 10:04:06 -0500130 ShapedText: {
131 // public API (from C++ bindings)
132 getBounds: function() {},
133 },
134
Kevin Lubick6b921b72019-09-18 16:18:17 -0400135 SkAnimatedImage: {
136 // public API (from C++ bindings)
Kevin Lubick6b921b72019-09-18 16:18:17 -0400137 decodeNextFrame: function() {},
Kevin Lubick47bd9f12019-11-08 06:55:15 -0800138 getFrameCount: function() {},
139 getRepetitionCount: function() {},
140 height: function() {},
141 reset: function() {},
142 width: function() {},
Kevin Lubick6b921b72019-09-18 16:18:17 -0400143 },
144
Kevin Lubick006a6f32018-10-19 14:34:34 -0400145 SkCanvas: {
146 // public API (from C++ bindings)
147 clear: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500148 clipPath: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400149 clipRRect: function() {},
Kevin Lubick5d5723c2018-12-07 10:09:11 -0500150 clipRect: function() {},
151 concat: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400152 drawAnimatedImage: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500153 drawArc: function() {},
Kevin Lubicke384df42019-08-26 15:48:09 -0400154 drawCircle: function() {},
Kevin Lubick6dbc4ed2019-10-22 09:43:34 -0400155 drawColor: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400156 drawDRRect: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500157 drawImage: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500158 drawImageNine: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500159 drawImageRect: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500160 drawLine: function() {},
161 drawOval: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400162 drawPaint: function() {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400163 drawParagraph: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400164 drawPath: function() {},
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400165 drawPicture: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400166 drawRRect: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500167 drawRect: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500168 drawRoundRect: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500169 drawShadow: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500170 drawText: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500171 drawTextBlob: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500172 drawVertices: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400173 flush: function() {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400174 getSaveCount: function() {},
Kevin Lubick5d5723c2018-12-07 10:09:11 -0500175 getTotalMatrix: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -0500176 makeSurface: function() {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500177 restore: function() {},
Kevin Lubickb3574c92019-03-06 08:25:36 -0500178 restoreToCount: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400179 rotate: function() {},
180 save: function() {},
Kevin Lubickb3574c92019-03-06 08:25:36 -0500181 saveLayer: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400182 scale: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400183 skew: function() {},
184 translate: function() {},
185
186 // private API
Kevin Lubickee91c072019-03-29 10:39:52 -0400187 _drawAtlas: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500188 _drawPoints: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500189 _drawSimpleText: function() {},
Kevin Lubick52b9f372018-12-04 13:57:36 -0500190 _readPixels: function() {},
191 _writePixels: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400192 delete: function() {},
193 },
194
Kevin Lubickd3729342019-09-12 11:11:25 -0400195 SkColorFilter: {
196 // public API (from C++ bindings and JS interface)
197 MakeBlend: function() {},
198 MakeCompose: function() {},
199 MakeLerp: function() {},
200 MakeLinearToSRGBGamma: function() {},
201 MakeMatrix: function() {},
202 MakeSRGBToLinearGamma: function() {},
203 // private API (from C++ bindings)
204 _makeMatrix: function() {},
205 },
206
207 SkColorMatrix: {
208 concat: function() {},
209 identity: function() {},
210 postTranslate: function() {},
211 rotated: function() {},
212 scaled: function() {},
213 },
214
Kevin Lubicke59c1672019-11-20 14:17:53 -0500215 SkContourMeasureIter: {
216 next: function() {},
217 },
218
219 SkContourMeasure: {
220 getPosTan: function() {},
221 getSegment: function() {},
222 isClosed: function() {},
223 length: function() {},
224 },
225
Kevin Lubick35ac0382019-01-02 15:13:57 -0500226 SkFont: {
227 // public API (from C++ bindings)
228 getScaleX: function() {},
229 getSize: function() {},
230 getSkewX: function() {},
231 getTypeface: function() {},
232 measureText: function() {},
233 setScaleX: function() {},
234 setSize: function() {},
235 setSkewX: function() {},
236 setTypeface: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400237 // private API (from C++ bindings)
238 _getWidths: function() {},
Kevin Lubick35ac0382019-01-02 15:13:57 -0500239 },
240
Kevin Lubickddd0a332018-12-12 10:35:13 -0500241 SkFontMgr: {
Kevin Lubick61887c72019-09-26 13:20:50 -0400242 // public API (from C++ and JS bindings)
243 FromData: function() {},
Kevin Lubickddd0a332018-12-12 10:35:13 -0500244 RefDefault: function() {},
245 countFamilies: function() {},
246
247 // private API
248 _makeTypefaceFromData: function() {},
Kevin Lubick61887c72019-09-26 13:20:50 -0400249 _fromData: function() {},
Kevin Lubickddd0a332018-12-12 10:35:13 -0500250 },
251
Kevin Lubick006a6f32018-10-19 14:34:34 -0400252 SkImage: {
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500253 // public API (from C++ bindings)
254 height: function() {},
255 width: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300256 // private API
257 _encodeToData: function() {},
258 _encodeToDataWithFormat: function() {},
Kevin Lubicka064c282019-04-04 09:28:53 -0400259 _makeShader: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400260 },
261
Kevin Lubick15b40232019-10-29 09:55:39 -0400262 SkImageFilter: {
263 MakeBlur: function() {},
264 MakeColorFilter: function() {},
265 MakeCompose: function() {},
Kevin Lubickd2677192019-11-15 14:13:20 -0500266 MakeMatrixTransform: function() {},
Kevin Lubick15b40232019-10-29 09:55:39 -0400267 },
268
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500269 SkMatrix: {
Kevin Lubickb9db3902018-11-26 11:47:54 -0500270 identity: function() {},
Kevin Lubickf3555182019-03-14 10:55:10 -0400271 invert: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500272 mapPoints: function() {},
273 multiply: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500274 rotated: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500275 scaled: function() {},
276 skewed: function() {},
277 translated: function() {},
278 },
279
Kevin Lubick15b40232019-10-29 09:55:39 -0400280 SkMaskFilter: {
281 MakeBlur: function() {},
282 },
283
Kevin Lubickb9db3902018-11-26 11:47:54 -0500284 SkPaint: {
285 // public API (from C++ bindings)
286 /** @return {CanvasKit.SkPaint} */
287 copy: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500288 getBlendMode: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500289 getColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500290 getFilterQuality: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500291 getStrokeCap: function() {},
292 getStrokeJoin: function() {},
293 getStrokeMiter: function() {},
294 getStrokeWidth: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500295 setAntiAlias: function() {},
Kevin Lubick12c0e502018-11-28 12:51:56 -0500296 setBlendMode: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500297 setColor: function() {},
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500298 setFilterQuality: function() {},
Kevin Lubick15b40232019-10-29 09:55:39 -0400299 setImageFilter: function() {},
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500300 setMaskFilter: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500301 setPathEffect: function() {},
302 setShader: function() {},
303 setStrokeCap: function() {},
304 setStrokeJoin: function() {},
305 setStrokeMiter: function() {},
306 setStrokeWidth: function() {},
307 setStyle: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500308
309 //private API
310 delete: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500311 },
312
Kevin Lubick006a6f32018-10-19 14:34:34 -0400313 SkPath: {
314 // public API (from C++ bindings)
Kevin Lubickb9db3902018-11-26 11:47:54 -0500315 computeTightBounds: function() {},
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500316 contains: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500317 /** @return {CanvasKit.SkPath} */
318 copy: function() {},
319 countPoints: function() {},
320 equals: function() {},
321 getBounds: function() {},
322 getFillType: function() {},
323 getPoint: function() {},
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500324 isEmpty: function() {},
Kevin Lubick2b79d1c2018-12-14 16:10:38 -0500325 isVolatile: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500326 reset: function() {},
327 rewind: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500328 setFillType: function() {},
Kevin Lubick2b79d1c2018-12-14 16:10:38 -0500329 setIsVolatile: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500330 toSVGString: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400331
332 // private API
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500333 _addArc: function() {},
Kevin Lubicke384df42019-08-26 15:48:09 -0400334 _addOval: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400335 _addPath: function() {},
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500336 _addRect: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500337 _addPoly: function() {},
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500338 _addRoundRect: function() {},
Alexander Khovansky3e119332018-11-15 02:01:19 +0300339 _arc: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400340 _arcTo: function() {},
341 _close: function() {},
342 _conicTo: function() {},
343 _cubicTo: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400344 _dash: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400345 _lineTo: function() {},
346 _moveTo: function() {},
347 _op: function() {},
348 _quadTo: function() {},
Kevin Lubick79b71342019-11-01 14:36:52 -0400349 _rArcTo: function() {},
350 _rConicTo: function() {},
351 _rCubicTo: function() {},
352 _rLineTo: function() {},
353 _rMoveTo: function() {},
354 _rQuadTo: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400355 _rect: function() {},
356 _simplify: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400357 _stroke: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400358 _transform: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400359 _trim: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400360 delete: function() {},
Kevin Lubickb9db3902018-11-26 11:47:54 -0500361 dump: function() {},
362 dumpHex: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400363 },
364
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400365 SkPathMeasure: {
366 getLength: function() {},
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500367 getSegment: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400368 getPosTan: function() {},
369 isClosed: function() {},
370 nextContour: function() {},
371 },
372
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400373 SkPicture: {
374 DEBUGONLY_serialize: function() {},
375 },
376
377 SkPictureRecorder: {
378 beginRecording: function() {},
379 finishRecordingAsPicture: function() {},
380 },
381
Kevin Lubick006a6f32018-10-19 14:34:34 -0400382 SkRect: {
383 fLeft: {},
384 fTop: {},
385 fRight: {},
386 fBottom: {},
387 },
388
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400389 SkRRect: {
390 rect: {},
Kevin Lubick7d644e12019-09-11 14:22:22 -0400391 rx1: {},
392 ry1: {},
393 rx2: {},
394 ry2: {},
395 rx3: {},
396 ry3: {},
397 rx4: {},
398 ry4: {},
Kevin Lubick2e5fe352019-09-03 12:59:06 -0400399 },
400
Kevin Lubick006a6f32018-10-19 14:34:34 -0400401 SkSurface: {
402 // public API (from C++ bindings)
403 /** @return {CanvasKit.SkCanvas} */
404 getCanvas: function() {},
405 /** @return {CanvasKit.SkImage} */
406 makeImageSnapshot: function() {},
Kevin Lubick543f3522019-03-08 10:04:28 -0500407 makeSurface: function() {},
Kevin Lubickcd544662019-03-22 15:41:36 -0400408 grContext: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400409
410 // private API
411 _flush: function() {},
412 _getRasterN32PremulSurface: function() {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400413 delete: function() {},
414 },
415
Kevin Lubickec4903d2019-01-14 08:36:08 -0500416 SkTextBlob: {
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400417 // public API (both C++ and JS bindings)
418 MakeFromRSXform: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500419 MakeFromText: function() {},
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400420 MakeOnPath: function() {},
421 // private API (from C++ bindings)
422 _MakeFromRSXform: function() {},
Kevin Lubickec4903d2019-01-14 08:36:08 -0500423 _MakeFromText: function() {},
424 },
425
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400426 SkVertices: {
427 // public API (from C++ bindings)
Kevin Lubick12c0e502018-11-28 12:51:56 -0500428 bounds: function() {},
429 mode: function() {},
430 uniqueID: function() {},
431 vertexCount: function() {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400432
433 // private API
434 /** @return {CanvasKit.SkVertices} */
435 _applyBones: function() {},
436 },
437
Kevin Lubickd6ba7252019-06-03 14:38:05 -0400438 _SkVerticesBuilder: {
439 // public API (from C++ bindings)
440 boneIndices: function() {},
441 boneWeights: function() {},
442 colors: function() {},
443 detach: function() {},
444 indices: function() {},
445 positions: function() {},
446 texCoords: function() {},
447 },
448
Kevin Lubick369f6a52019-10-03 11:22:08 -0400449 TextStyle: function() {},
450
Kevin Lubick006a6f32018-10-19 14:34:34 -0400451 // Constants and Enums
452 gpu: {},
453 skottie: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400454
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500455 TRANSPARENT: {},
456 RED: {},
457 BLUE: {},
458 YELLOW: {},
459 CYAN: {},
460 BLACK: {},
Kevin Lubickea905ec2018-11-30 14:05:58 -0500461 WHITE: {},
462
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500463 MOVE_VERB: {},
464 LINE_VERB: {},
465 QUAD_VERB: {},
466 CONIC_VERB: {},
467 CUBIC_VERB: {},
468 CLOSE_VERB: {},
469
Kevin Lubick369f6a52019-10-03 11:22:08 -0400470 NoDecoration: {},
471 UnderlineDecoration: {},
472 OverlineDecoration: {},
473 LineThroughDecoration: {},
474
Kevin Lubick77d9b5c2019-10-29 10:48:26 -0400475 SaveLayerInitWithPrevious: {},
476 SaveLayerF16ColorType: {},
477
Kevin Lubick369f6a52019-10-03 11:22:08 -0400478 Affinity: {
479 Upstream: {},
480 Downstream: {},
481 },
482
Kevin Lubickea905ec2018-11-30 14:05:58 -0500483 AlphaType: {
484 Opaque: {},
485 Premul: {},
486 Unpremul: {},
487 },
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500488
489 BlendMode: {
490 Clear: {},
491 Src: {},
492 Dst: {},
493 SrcOver: {},
494 DstOver: {},
495 SrcIn: {},
496 DstIn: {},
497 SrcOut: {},
498 DstOut: {},
499 SrcATop: {},
500 DstATop: {},
501 Xor: {},
502 Plus: {},
503 Modulate: {},
504 Screen: {},
505 Overlay: {},
506 Darken: {},
507 Lighten: {},
508 ColorDodge: {},
509 ColorBurn: {},
510 HardLight: {},
511 SoftLight: {},
512 Difference: {},
513 Exclusion: {},
514 Multiply: {},
515 Hue: {},
516 Saturation: {},
517 Color: {},
518 Luminosity: {},
519 },
520
521 BlurStyle: {
522 Normal: {},
523 Solid: {},
524 Outer: {},
525 Inner: {},
526 },
527
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500528 ClipOp: {
529 Difference: {},
530 Intersect: {},
531 },
532
Kevin Lubickea905ec2018-11-30 14:05:58 -0500533 ColorType: {
534 Alpha_8: {},
535 RGB_565: {},
536 ARGB_4444: {},
537 RGBA_8888: {},
538 RGB_888x: {},
539 BGRA_8888: {},
540 RGBA_1010102: {},
541 RGB_101010x: {},
542 Gray_8: {},
543 RGBA_F16: {},
544 RGBA_F32: {},
545 },
546
Kevin Lubick006a6f32018-10-19 14:34:34 -0400547 FillType: {
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500548 Winding: {},
549 EvenOdd: {},
550 InverseWinding: {},
551 InverseEvenOdd: {},
Kevin Lubick006a6f32018-10-19 14:34:34 -0400552 },
553
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500554 FilterQuality: {
555 None: {},
556 Low: {},
557 Medium: {},
558 High: {},
559 },
560
Kevin Lubickd3b1fe62019-10-21 10:50:26 -0400561 FontSlant: {
562 Upright: {},
563 Italic: {},
564 Oblique: {},
565 },
566
567 FontWeight: {
568 Invisible: {},
569 Thin: {},
570 ExtraLight: {},
571 Light: {},
572 Normal: {},
573 Medium: {},
574 SemiBold: {},
575 Bold: {},
576 ExtraBold: {},
577 Black: {},
578 ExtraBlack: {},
579 },
580
581 FontWidth: {
582 UltraCondensed: {},
583 ExtraCondensed: {},
584 Condensed: {},
585 SemiCondensed: {},
586 Normal: {},
587 SemiExpanded: {},
588 Expanded: {},
589 ExtraExpanded: {},
590 UltraExpanded: {},
591 },
592
Alexander Khovansky3e119332018-11-15 02:01:19 +0300593 ImageFormat: {
594 PNG: {},
595 JPEG: {},
596 },
597
Kevin Lubickb9db3902018-11-26 11:47:54 -0500598 PaintStyle: {
599 Fill: {},
600 Stroke: {},
601 StrokeAndFill: {},
602 },
603
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500604 PathOp: {
605 Difference: {},
606 Intersect: {},
607 Union: {},
608 XOR: {},
609 ReverseDifference: {},
610 },
611
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500612 PointMode: {
613 Points: {},
614 Lines: {},
615 Polygon: {},
616 },
617
Kevin Lubick369f6a52019-10-03 11:22:08 -0400618 RectHeightStyle: {
619 Tight: {},
620 Max: {},
Kevin Lubick4a5f4f22019-11-20 08:27:10 -0500621 IncludeLineSpacingMiddle: {},
622 IncludeLineSpacingTop: {},
623 IncludeLineSpacingBottom: {},
Kevin Lubick369f6a52019-10-03 11:22:08 -0400624 },
625
626 RectWidthStyle: {
627 Tight: {},
628 Max: {},
629 },
630
Kevin Lubickb9db3902018-11-26 11:47:54 -0500631 StrokeCap: {
632 Butt: {},
633 Round: {},
634 Square: {},
635 },
636
637 StrokeJoin: {
638 Miter: {},
639 Round: {},
640 Bevel: {},
641 },
642
Kevin Lubick369f6a52019-10-03 11:22:08 -0400643 TextAlign: {
644 Left: {},
645 Right: {},
646 Center: {},
647 Justify: {},
648 Start: {},
649 End: {},
650 },
651
Kevin Lubickd3b1fe62019-10-21 10:50:26 -0400652 TextDirection: {
653 LTR: {},
654 RTL: {},
655 },
656
Kevin Lubickec4903d2019-01-14 08:36:08 -0500657 TextEncoding: {
658 UTF8: {},
659 UTF16: {},
660 UTF32: {},
661 GlyphID: {},
662 },
663
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500664 TileMode: {
665 Clamp: {},
666 Repeat: {},
667 Mirror: {},
Kevin Lubickd29edd72018-12-07 08:29:52 -0500668 Decal: {},
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500669 },
670
671 VertexMode: {
672 Triangles: {},
673 TrianglesStrip: {},
674 TriangleFan: {},
675 },
676
Kevin Lubick006a6f32018-10-19 14:34:34 -0400677 // Things Enscriptem adds for us
678
Kevin Lubick53965c92018-10-11 08:51:55 -0400679 /**
680 * @type {Float32Array}
681 */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400682 HEAPF32: {},
Kevin Lubick53965c92018-10-11 08:51:55 -0400683 /**
Kevin Lubickfa5a1382019-10-09 10:46:14 -0400684 * @type {Float64Array}
685 */
686 HEAPF64: {},
687 /**
Kevin Lubick53965c92018-10-11 08:51:55 -0400688 * @type {Uint8Array}
689 */
690 HEAPU8: {},
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400691 /**
692 * @type {Uint16Array}
693 */
694 HEAPU16: {},
695 /**
Kevin Lubickf5ea37f2019-02-28 10:06:18 -0500696 * @type {Uint32Array}
697 */
698 HEAPU32: {},
Kevin Lubickfa5a1382019-10-09 10:46:14 -0400699 /**
700 * @type {Int8Array}
701 */
702 HEAP8: {},
703 /**
704 * @type {Int16Array}
705 */
706 HEAP16: {},
707 /**
708 * @type {Int32Array}
709 */
710 HEAP32: {},
711
Kevin Lubick006a6f32018-10-19 14:34:34 -0400712 _malloc: function() {},
713 _free: function() {},
714 onRuntimeInitialized: function() {},
715};
Kevin Lubick217056c2018-09-20 17:39:31 -0400716
Kevin Lubick006a6f32018-10-19 14:34:34 -0400717// Public API things that are newly declared in the JS should go here.
718// It's not enough to declare them above, because closure can still erase them
719// unless they go on the prototype.
Kevin Lubick369f6a52019-10-03 11:22:08 -0400720CanvasKit.Paragraph.prototype.getRectsForRange = function() {};
721
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500722CanvasKit.SkPath.prototype.addArc = function() {};
Kevin Lubicke384df42019-08-26 15:48:09 -0400723CanvasKit.SkPath.prototype.addOval = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400724CanvasKit.SkPath.prototype.addPath = function() {};
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500725CanvasKit.SkPath.prototype.addPoly = function() {};
Kevin Lubick1a05fce2018-11-20 12:51:16 -0500726CanvasKit.SkPath.prototype.addRect = function() {};
Kevin Lubickda3d8ac2019-01-07 11:08:55 -0500727CanvasKit.SkPath.prototype.addRoundRect = function() {};
Alexander Khovansky3e119332018-11-15 02:01:19 +0300728CanvasKit.SkPath.prototype.arc = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400729CanvasKit.SkPath.prototype.arcTo = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400730CanvasKit.SkPath.prototype.close = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400731CanvasKit.SkPath.prototype.conicTo = function() {};
732CanvasKit.SkPath.prototype.cubicTo = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400733CanvasKit.SkPath.prototype.dash = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400734CanvasKit.SkPath.prototype.lineTo = function() {};
735CanvasKit.SkPath.prototype.moveTo = function() {};
Kevin Lubicke384df42019-08-26 15:48:09 -0400736CanvasKit.SkPath.prototype.offset = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400737CanvasKit.SkPath.prototype.op = function() {};
738CanvasKit.SkPath.prototype.quadTo = function() {};
Kevin Lubick79b71342019-11-01 14:36:52 -0400739CanvasKit.SkPath.prototype.rArcTo = function() {};
740CanvasKit.SkPath.prototype.rConicTo = function() {};
741CanvasKit.SkPath.prototype.rCubicTo = function() {};
742CanvasKit.SkPath.prototype.rLineTo = function() {};
743CanvasKit.SkPath.prototype.rMoveTo = function() {};
744CanvasKit.SkPath.prototype.rQuadTo = function() {};
Kevin Lubick006a6f32018-10-19 14:34:34 -0400745CanvasKit.SkPath.prototype.rect = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400746CanvasKit.SkPath.prototype.simplify = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400747CanvasKit.SkPath.prototype.stroke = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400748CanvasKit.SkPath.prototype.transform = function() {};
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400749CanvasKit.SkPath.prototype.trim = function() {};
Kevin Lubick217056c2018-09-20 17:39:31 -0400750
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400751CanvasKit.SkPicture.prototype.DEBUGONLY_saveAsFile = function() {};
752
Kevin Lubick5b90b842018-10-17 07:57:18 -0400753CanvasKit.SkSurface.prototype.dispose = function() {};
Kevin Lubick359a7e32019-03-19 09:34:37 -0400754CanvasKit.SkSurface.prototype.flush = function() {};
755CanvasKit.SkSurface.prototype.requestAnimationFrame = function() {};
Kevin Lubickcc13fd32019-04-05 13:00:01 -0400756CanvasKit.SkSurface.prototype.captureFrameAsSkPicture = function() {};
Kevin Lubick53965c92018-10-11 08:51:55 -0400757
Kevin Lubick12c0e502018-11-28 12:51:56 -0500758/** @return {CanvasKit.SkVertices} */
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400759CanvasKit.SkVertices.prototype.applyBones = function() {};
760
Alexander Khovansky3e119332018-11-15 02:01:19 +0300761CanvasKit.SkImage.prototype.encodeToData = function() {};
Kevin Lubicka064c282019-04-04 09:28:53 -0400762CanvasKit.SkImage.prototype.makeShader = function() {};
Alexander Khovansky3e119332018-11-15 02:01:19 +0300763
Kevin Lubickee91c072019-03-29 10:39:52 -0400764CanvasKit.SkCanvas.prototype.drawAtlas = function() {};
Kevin Lubick37ab53e2019-11-11 10:06:08 -0500765CanvasKit.SkCanvas.prototype.drawPoints = function() {};
Kevin Lubickec4903d2019-01-14 08:36:08 -0500766CanvasKit.SkCanvas.prototype.drawText = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500767/** @return {Uint8Array} */
768CanvasKit.SkCanvas.prototype.readPixels = function() {};
769CanvasKit.SkCanvas.prototype.writePixels = function() {};
770
Kevin Lubickddd0a332018-12-12 10:35:13 -0500771CanvasKit.SkFontMgr.prototype.MakeTypefaceFromData = function() {};
772
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400773CanvasKit.SkFont.prototype.getWidths = function() {};
774
775CanvasKit.RSXFormBuilder.prototype.build = function() {};
776CanvasKit.RSXFormBuilder.prototype.delete = function() {};
777CanvasKit.RSXFormBuilder.prototype.push = function() {};
Kevin Lubickee91c072019-03-29 10:39:52 -0400778CanvasKit.RSXFormBuilder.prototype.set = function() {};
779
780CanvasKit.SkColorBuilder.prototype.build = function() {};
781CanvasKit.SkColorBuilder.prototype.delete = function() {};
782CanvasKit.SkColorBuilder.prototype.push = function() {};
783CanvasKit.SkColorBuilder.prototype.set = function() {};
Kevin Lubickd3cfbca2019-03-15 15:36:29 -0400784
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400785// Define StrokeOpts object
786var StrokeOpts = {};
787StrokeOpts.prototype.width;
788StrokeOpts.prototype.miter_limit;
789StrokeOpts.prototype.cap;
790StrokeOpts.prototype.join;
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500791StrokeOpts.prototype.precision;
Kevin Lubickb5ae3b52018-11-03 07:51:19 -0400792
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500793// Define everything created in the canvas2d spec here
Kevin Lubickb9db3902018-11-26 11:47:54 -0500794var HTMLCanvas = {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500795HTMLCanvas.prototype.decodeImage = function() {};
796HTMLCanvas.prototype.dispose = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500797HTMLCanvas.prototype.getContext = function() {};
Kevin Lubick8e4a3312018-12-14 15:03:41 -0500798HTMLCanvas.prototype.loadFont = function() {};
Kevin Lubicka40f8322018-12-17 16:01:36 -0500799HTMLCanvas.prototype.makePath2D = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500800HTMLCanvas.prototype.toDataURL = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500801
802var CanvasRenderingContext2D = {};
803CanvasRenderingContext2D.prototype.addHitRegion = function() {};
804CanvasRenderingContext2D.prototype.arc = function() {};
805CanvasRenderingContext2D.prototype.arcTo = function() {};
806CanvasRenderingContext2D.prototype.beginPath = function() {};
807CanvasRenderingContext2D.prototype.bezierCurveTo = function() {};
808CanvasRenderingContext2D.prototype.clearHitRegions = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500809CanvasRenderingContext2D.prototype.clearRect = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500810CanvasRenderingContext2D.prototype.clip = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500811CanvasRenderingContext2D.prototype.closePath = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500812CanvasRenderingContext2D.prototype.createImageData = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500813CanvasRenderingContext2D.prototype.createLinearGradient = function() {};
Kevin Lubickd29edd72018-12-07 08:29:52 -0500814CanvasRenderingContext2D.prototype.createPattern = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500815CanvasRenderingContext2D.prototype.createRadialGradient = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500816CanvasRenderingContext2D.prototype.drawFocusIfNeeded = function() {};
Kevin Lubick0a1293c2018-12-03 12:31:04 -0500817CanvasRenderingContext2D.prototype.drawImage = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500818CanvasRenderingContext2D.prototype.ellipse = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500819CanvasRenderingContext2D.prototype.fill = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500820CanvasRenderingContext2D.prototype.fillRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500821CanvasRenderingContext2D.prototype.fillText = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500822CanvasRenderingContext2D.prototype.getImageData = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500823CanvasRenderingContext2D.prototype.getLineDash = function() {};
Kevin Lubick1646e7d2018-12-07 13:03:08 -0500824CanvasRenderingContext2D.prototype.isPointInPath = function() {};
825CanvasRenderingContext2D.prototype.isPointInStroke = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500826CanvasRenderingContext2D.prototype.lineTo = function() {};
827CanvasRenderingContext2D.prototype.measureText = function() {};
828CanvasRenderingContext2D.prototype.moveTo = function() {};
Kevin Lubick52b9f372018-12-04 13:57:36 -0500829CanvasRenderingContext2D.prototype.putImageData = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500830CanvasRenderingContext2D.prototype.quadraticCurveTo = function() {};
831CanvasRenderingContext2D.prototype.rect = function() {};
832CanvasRenderingContext2D.prototype.removeHitRegion = function() {};
833CanvasRenderingContext2D.prototype.resetTransform = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500834CanvasRenderingContext2D.prototype.restore = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500835CanvasRenderingContext2D.prototype.rotate = function() {};
Kevin Lubick61ef7b22018-11-27 13:26:59 -0500836CanvasRenderingContext2D.prototype.save = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500837CanvasRenderingContext2D.prototype.scale = function() {};
838CanvasRenderingContext2D.prototype.scrollPathIntoView = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500839CanvasRenderingContext2D.prototype.setLineDash = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500840CanvasRenderingContext2D.prototype.setTransform = function() {};
841CanvasRenderingContext2D.prototype.stroke = function() {};
Kevin Lubick12c0e502018-11-28 12:51:56 -0500842CanvasRenderingContext2D.prototype.strokeRect = function() {};
Kevin Lubickb9db3902018-11-26 11:47:54 -0500843CanvasRenderingContext2D.prototype.strokeText = function() {};
844CanvasRenderingContext2D.prototype.transform = function() {};
845CanvasRenderingContext2D.prototype.translate = function() {};
846
Kevin Lubicka40f8322018-12-17 16:01:36 -0500847var Path2D = {};
848Path2D.prototype.addPath = function() {};
849Path2D.prototype.arc = function() {};
850Path2D.prototype.arcTo = function() {};
851Path2D.prototype.bezierCurveTo = function() {};
852Path2D.prototype.closePath = function() {};
853Path2D.prototype.ellipse = function() {};
854Path2D.prototype.lineTo = function() {};
855Path2D.prototype.moveTo = function() {};
856Path2D.prototype.quadraticCurveTo = function() {};
857Path2D.prototype.rect = function() {};
858
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500859var LinearCanvasGradient = {};
860LinearCanvasGradient.prototype.addColorStop = function() {};
861var RadialCanvasGradient = {};
862RadialCanvasGradient.prototype.addColorStop = function() {};
Kevin Lubickd29edd72018-12-07 08:29:52 -0500863var CanvasPattern = {};
864CanvasPattern.prototype.setTransform = function() {};
Kevin Lubickeb2f6b02018-11-29 15:07:02 -0500865
Kevin Lubick52b9f372018-12-04 13:57:36 -0500866var ImageData = {
867 /**
868 * @type {Uint8ClampedArray}
869 */
870 data: {},
871 height: {},
872 width: {},
873};
874
Kevin Lubickd29edd72018-12-07 08:29:52 -0500875var DOMMatrix = {
876 a: {},
877 b: {},
878 c: {},
879 d: {},
880 e: {},
881 f: {},
882};
883
Kevin Lubick217056c2018-09-20 17:39:31 -0400884// 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 -0500885function loadWebAssemblyModule() {};