Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 1 | /* |
| 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 | |
| 25 | var CanvasKit = { |
| 26 | // public API (i.e. things we declare in the pre-js file) |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 27 | Color: function() {}, |
| 28 | /** @return {CanvasKit.SkRect} */ |
| 29 | LTRBRect: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 30 | MakeBlurMaskFilter: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 31 | MakeCanvas: function() {}, |
| 32 | MakeCanvasSurface: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 33 | MakeImageShader: function() {}, |
| 34 | MakeLinearGradientShader: function() {}, |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 35 | MakeNimaActor: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 36 | MakeRadialGradientShader: function() {}, |
| 37 | MakeSWCanvasSurface: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 38 | MakeSkDashPathEffect: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 39 | MakeSkVertices: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 40 | MakeSurface: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 41 | MakeWebGLCanvasSurface: function() {}, |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 42 | currentContext: function() {}, |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 43 | getSkDataBytes: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 44 | getColorComponents: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 45 | initFonts: function() {}, |
| 46 | setCurrentContext: function() {}, |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 47 | |
| 48 | // private API (i.e. things declared in the bindings that we use |
| 49 | // in the pre-js file) |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 50 | _MakeImageShader: function() {}, |
| 51 | _MakeLinearGradientShader: function() {}, |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 52 | _MakeNimaActor: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 53 | _MakeRadialGradientShader: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 54 | _MakeSkDashPathEffect: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 55 | _MakeSkVertices: function() {}, |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 56 | _getRasterN32PremulSurface: function() {}, |
| 57 | _getWebGLSurface: function() {}, |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 58 | |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 59 | // The testing object is meant to expose internal functions |
| 60 | // for more fine-grained testing, e.g. parseColor |
| 61 | _testing: {}, |
| 62 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 63 | // Objects and properties on CanvasKit |
| 64 | |
Kevin Lubick | 134be1d | 2018-10-30 15:05:04 -0400 | [diff] [blame] | 65 | NimaActor: { |
| 66 | // public API (from C++ bindings) |
| 67 | duration: function() {}, |
| 68 | getAnimationNames: function() {}, |
| 69 | render: function() {}, |
| 70 | seek: function() {}, |
| 71 | setAnimationByIndex: function() {}, |
| 72 | setAnimationByName: function() {}, |
| 73 | |
| 74 | // private API |
| 75 | }, |
| 76 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 77 | SkCanvas: { |
| 78 | // public API (from C++ bindings) |
| 79 | clear: function() {}, |
| 80 | drawPaint: function() {}, |
| 81 | drawPath: function() {}, |
| 82 | drawText: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 83 | drawShadow: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 84 | flush: function() {}, |
| 85 | rotate: function() {}, |
| 86 | save: function() {}, |
| 87 | scale: function() {}, |
| 88 | setMatrix: function() {}, |
| 89 | skew: function() {}, |
| 90 | translate: function() {}, |
| 91 | |
| 92 | // private API |
| 93 | delete: function() {}, |
| 94 | }, |
| 95 | |
| 96 | SkImage: { |
Alexander Khovansky | 3e11933 | 2018-11-15 02:01:19 +0300 | [diff] [blame] | 97 | // private API |
| 98 | _encodeToData: function() {}, |
| 99 | _encodeToDataWithFormat: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 100 | }, |
| 101 | |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 102 | SkMatrix: { |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 103 | identity: function() {}, |
| 104 | mapPoints: function() {}, |
| 105 | multiply: function() {}, |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 106 | rotated: function() {}, |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 107 | scaled: function() {}, |
| 108 | skewed: function() {}, |
| 109 | translated: function() {}, |
| 110 | }, |
| 111 | |
| 112 | SkPaint: { |
| 113 | // public API (from C++ bindings) |
| 114 | /** @return {CanvasKit.SkPaint} */ |
| 115 | copy: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 116 | getColor: function() {}, |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 117 | getStrokeCap: function() {}, |
| 118 | getStrokeJoin: function() {}, |
| 119 | getStrokeMiter: function() {}, |
| 120 | getStrokeWidth: function() {}, |
| 121 | getTextSize: function() {}, |
| 122 | measureText: function() {}, |
| 123 | setAntiAlias: function() {}, |
| 124 | setColor: function() {}, |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 125 | setMaskFilter: function() {}, |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 126 | setPathEffect: function() {}, |
| 127 | setShader: function() {}, |
| 128 | setStrokeCap: function() {}, |
| 129 | setStrokeJoin: function() {}, |
| 130 | setStrokeMiter: function() {}, |
| 131 | setStrokeWidth: function() {}, |
| 132 | setStyle: function() {}, |
| 133 | setTextSize: function() {}, |
| 134 | |
| 135 | //private API |
| 136 | delete: function() {}, |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 137 | }, |
| 138 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 139 | SkPath: { |
| 140 | // public API (from C++ bindings) |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 141 | computeTightBounds: function() {}, |
| 142 | /** @return {CanvasKit.SkPath} */ |
| 143 | copy: function() {}, |
| 144 | countPoints: function() {}, |
| 145 | equals: function() {}, |
| 146 | getBounds: function() {}, |
| 147 | getFillType: function() {}, |
| 148 | getPoint: function() {}, |
| 149 | setFillType: function() {}, |
| 150 | toSVGString: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 151 | |
| 152 | // private API |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 153 | _addArc: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 154 | _addPath: function() {}, |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 155 | _addRect: function() {}, |
Alexander Khovansky | 3e11933 | 2018-11-15 02:01:19 +0300 | [diff] [blame] | 156 | _arc: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 157 | _arcTo: function() {}, |
| 158 | _close: function() {}, |
| 159 | _conicTo: function() {}, |
| 160 | _cubicTo: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 161 | _dash: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 162 | _lineTo: function() {}, |
| 163 | _moveTo: function() {}, |
| 164 | _op: function() {}, |
| 165 | _quadTo: function() {}, |
| 166 | _rect: function() {}, |
| 167 | _simplify: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 168 | _stroke: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 169 | _transform: function() {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 170 | _trim: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 171 | delete: function() {}, |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 172 | dump: function() {}, |
| 173 | dumpHex: function() {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 174 | }, |
| 175 | |
| 176 | SkRect: { |
| 177 | fLeft: {}, |
| 178 | fTop: {}, |
| 179 | fRight: {}, |
| 180 | fBottom: {}, |
| 181 | }, |
| 182 | |
| 183 | SkSurface: { |
| 184 | // public API (from C++ bindings) |
| 185 | /** @return {CanvasKit.SkCanvas} */ |
| 186 | getCanvas: function() {}, |
| 187 | /** @return {CanvasKit.SkImage} */ |
| 188 | makeImageSnapshot: function() {}, |
| 189 | |
| 190 | // private API |
| 191 | _flush: function() {}, |
| 192 | _getRasterN32PremulSurface: function() {}, |
| 193 | _readPixels: function() {}, |
| 194 | delete: function() {}, |
| 195 | }, |
| 196 | |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 197 | SkVertices: { |
| 198 | // public API (from C++ bindings) |
| 199 | /** @return {CanvasKit.SkVertices} */ |
| 200 | applyBones: function() {}, |
| 201 | |
| 202 | // private API |
| 203 | /** @return {CanvasKit.SkVertices} */ |
| 204 | _applyBones: function() {}, |
| 205 | }, |
| 206 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 207 | // Constants and Enums |
| 208 | gpu: {}, |
| 209 | skottie: {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 210 | |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 211 | TRANSPARENT: {}, |
| 212 | RED: {}, |
| 213 | BLUE: {}, |
| 214 | YELLOW: {}, |
| 215 | CYAN: {}, |
| 216 | BLACK: {}, |
| 217 | |
| 218 | BlendMode: { |
| 219 | Clear: {}, |
| 220 | Src: {}, |
| 221 | Dst: {}, |
| 222 | SrcOver: {}, |
| 223 | DstOver: {}, |
| 224 | SrcIn: {}, |
| 225 | DstIn: {}, |
| 226 | SrcOut: {}, |
| 227 | DstOut: {}, |
| 228 | SrcATop: {}, |
| 229 | DstATop: {}, |
| 230 | Xor: {}, |
| 231 | Plus: {}, |
| 232 | Modulate: {}, |
| 233 | Screen: {}, |
| 234 | Overlay: {}, |
| 235 | Darken: {}, |
| 236 | Lighten: {}, |
| 237 | ColorDodge: {}, |
| 238 | ColorBurn: {}, |
| 239 | HardLight: {}, |
| 240 | SoftLight: {}, |
| 241 | Difference: {}, |
| 242 | Exclusion: {}, |
| 243 | Multiply: {}, |
| 244 | Hue: {}, |
| 245 | Saturation: {}, |
| 246 | Color: {}, |
| 247 | Luminosity: {}, |
| 248 | }, |
| 249 | |
| 250 | BlurStyle: { |
| 251 | Normal: {}, |
| 252 | Solid: {}, |
| 253 | Outer: {}, |
| 254 | Inner: {}, |
| 255 | }, |
| 256 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 257 | FillType: { |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 258 | Winding: {}, |
| 259 | EvenOdd: {}, |
| 260 | InverseWinding: {}, |
| 261 | InverseEvenOdd: {}, |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 262 | }, |
| 263 | |
Alexander Khovansky | 3e11933 | 2018-11-15 02:01:19 +0300 | [diff] [blame] | 264 | ImageFormat: { |
| 265 | PNG: {}, |
| 266 | JPEG: {}, |
| 267 | }, |
| 268 | |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 269 | PaintStyle: { |
| 270 | Fill: {}, |
| 271 | Stroke: {}, |
| 272 | StrokeAndFill: {}, |
| 273 | }, |
| 274 | |
| 275 | StrokeCap: { |
| 276 | Butt: {}, |
| 277 | Round: {}, |
| 278 | Square: {}, |
| 279 | }, |
| 280 | |
| 281 | StrokeJoin: { |
| 282 | Miter: {}, |
| 283 | Round: {}, |
| 284 | Bevel: {}, |
| 285 | }, |
| 286 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 287 | // Things Enscriptem adds for us |
| 288 | |
Kevin Lubick | 53965c9 | 2018-10-11 08:51:55 -0400 | [diff] [blame] | 289 | /** Represents the heap of the WASM code |
| 290 | * @type {ArrayBuffer} |
| 291 | */ |
| 292 | buffer: {}, |
| 293 | /** |
| 294 | * @type {Float32Array} |
| 295 | */ |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 296 | HEAPF32: {}, |
Kevin Lubick | 53965c9 | 2018-10-11 08:51:55 -0400 | [diff] [blame] | 297 | /** |
| 298 | * @type {Uint8Array} |
| 299 | */ |
| 300 | HEAPU8: {}, |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 301 | /** |
| 302 | * @type {Uint16Array} |
| 303 | */ |
| 304 | HEAPU16: {}, |
| 305 | /** |
| 306 | * @type {Int32Array} |
| 307 | */ |
| 308 | HEAP32: {}, |
Kevin Lubick | 53965c9 | 2018-10-11 08:51:55 -0400 | [diff] [blame] | 309 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 310 | _malloc: function() {}, |
| 311 | _free: function() {}, |
| 312 | onRuntimeInitialized: function() {}, |
| 313 | }; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 314 | |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 315 | // Public API things that are newly declared in the JS should go here. |
| 316 | // It's not enough to declare them above, because closure can still erase them |
| 317 | // unless they go on the prototype. |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 318 | CanvasKit.SkPath.prototype.addArc = function() {}; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 319 | CanvasKit.SkPath.prototype.addPath = function() {}; |
Kevin Lubick | 1a05fce | 2018-11-20 12:51:16 -0500 | [diff] [blame] | 320 | CanvasKit.SkPath.prototype.addRect = function() {}; |
Alexander Khovansky | 3e11933 | 2018-11-15 02:01:19 +0300 | [diff] [blame] | 321 | CanvasKit.SkPath.prototype.arc = function() {}; |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 322 | CanvasKit.SkPath.prototype.arcTo = function() {}; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 323 | CanvasKit.SkPath.prototype.close = function() {}; |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 324 | CanvasKit.SkPath.prototype.conicTo = function() {}; |
| 325 | CanvasKit.SkPath.prototype.cubicTo = function() {}; |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 326 | CanvasKit.SkPath.prototype.dash = function() {}; |
Kevin Lubick | 006a6f3 | 2018-10-19 14:34:34 -0400 | [diff] [blame] | 327 | CanvasKit.SkPath.prototype.lineTo = function() {}; |
| 328 | CanvasKit.SkPath.prototype.moveTo = function() {}; |
| 329 | CanvasKit.SkPath.prototype.op = function() {}; |
| 330 | CanvasKit.SkPath.prototype.quadTo = function() {}; |
| 331 | CanvasKit.SkPath.prototype.rect = function() {}; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 332 | CanvasKit.SkPath.prototype.simplify = function() {}; |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 333 | CanvasKit.SkPath.prototype.stroke = function() {}; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 334 | CanvasKit.SkPath.prototype.transform = function() {}; |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 335 | CanvasKit.SkPath.prototype.trim = function() {}; |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 336 | |
Kevin Lubick | 53965c9 | 2018-10-11 08:51:55 -0400 | [diff] [blame] | 337 | CanvasKit.SkSurface.prototype.flush = function() {}; |
Kevin Lubick | 5b90b84 | 2018-10-17 07:57:18 -0400 | [diff] [blame] | 338 | CanvasKit.SkSurface.prototype.dispose = function() {}; |
Kevin Lubick | 53965c9 | 2018-10-11 08:51:55 -0400 | [diff] [blame] | 339 | |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 340 | CanvasKit.SkVertices.prototype.applyBones = function() {}; |
| 341 | |
Alexander Khovansky | 3e11933 | 2018-11-15 02:01:19 +0300 | [diff] [blame] | 342 | CanvasKit.SkImage.prototype.encodeToData = function() {}; |
| 343 | |
Kevin Lubick | b5ae3b5 | 2018-11-03 07:51:19 -0400 | [diff] [blame] | 344 | // Define StrokeOpts object |
| 345 | var StrokeOpts = {}; |
| 346 | StrokeOpts.prototype.width; |
| 347 | StrokeOpts.prototype.miter_limit; |
| 348 | StrokeOpts.prototype.cap; |
| 349 | StrokeOpts.prototype.join; |
| 350 | |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 351 | var HTMLCanvas = {}; |
| 352 | HTMLCanvas.prototype.getContext = function() {}; |
| 353 | HTMLCanvas.prototype.toDataURL = function() {}; |
| 354 | HTMLCanvas.prototype.dispose = function() {}; |
| 355 | |
| 356 | var CanvasRenderingContext2D = {}; |
| 357 | CanvasRenderingContext2D.prototype.addHitRegion = function() {}; |
| 358 | CanvasRenderingContext2D.prototype.arc = function() {}; |
| 359 | CanvasRenderingContext2D.prototype.arcTo = function() {}; |
| 360 | CanvasRenderingContext2D.prototype.beginPath = function() {}; |
| 361 | CanvasRenderingContext2D.prototype.bezierCurveTo = function() {}; |
| 362 | CanvasRenderingContext2D.prototype.clearHitRegions = function() {}; |
| 363 | CanvasRenderingContext2D.prototype.closePath = function() {}; |
| 364 | CanvasRenderingContext2D.prototype.drawFocusIfNeeded = function() {}; |
| 365 | CanvasRenderingContext2D.prototype.ellipse = function() {}; |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 366 | CanvasRenderingContext2D.prototype.fill = function() {}; |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 367 | CanvasRenderingContext2D.prototype.fillText = function() {}; |
| 368 | CanvasRenderingContext2D.prototype.lineTo = function() {}; |
| 369 | CanvasRenderingContext2D.prototype.measureText = function() {}; |
| 370 | CanvasRenderingContext2D.prototype.moveTo = function() {}; |
| 371 | CanvasRenderingContext2D.prototype.quadraticCurveTo = function() {}; |
| 372 | CanvasRenderingContext2D.prototype.rect = function() {}; |
| 373 | CanvasRenderingContext2D.prototype.removeHitRegion = function() {}; |
| 374 | CanvasRenderingContext2D.prototype.resetTransform = function() {}; |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 375 | CanvasRenderingContext2D.prototype.restore = function() {}; |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 376 | CanvasRenderingContext2D.prototype.rotate = function() {}; |
Kevin Lubick | 61ef7b2 | 2018-11-27 13:26:59 -0500 | [diff] [blame^] | 377 | CanvasRenderingContext2D.prototype.save = function() {}; |
Kevin Lubick | b9db390 | 2018-11-26 11:47:54 -0500 | [diff] [blame] | 378 | CanvasRenderingContext2D.prototype.scale = function() {}; |
| 379 | CanvasRenderingContext2D.prototype.scrollPathIntoView = function() {}; |
| 380 | CanvasRenderingContext2D.prototype.setTransform = function() {}; |
| 381 | CanvasRenderingContext2D.prototype.stroke = function() {}; |
| 382 | CanvasRenderingContext2D.prototype.strokeText = function() {}; |
| 383 | CanvasRenderingContext2D.prototype.transform = function() {}; |
| 384 | CanvasRenderingContext2D.prototype.translate = function() {}; |
| 385 | |
| 386 | |
Kevin Lubick | 217056c | 2018-09-20 17:39:31 -0400 | [diff] [blame] | 387 | // Not sure why this is needed - might be a bug in emsdk that this isn't properly declared. |
Kevin Lubick | 6fccc9d | 2018-11-20 15:55:10 -0500 | [diff] [blame] | 388 | function loadWebAssemblyModule() {}; |