Kevin Lubick | f3d6c36 | 2020-01-06 08:11:52 -0500 | [diff] [blame^] | 1 | CanvasKit._extraInitializations = CanvasKit._extraInitializations || []; |
| 2 | CanvasKit._extraInitializations.push(function() { |
| 3 | CanvasKit.SkRuntimeEffect.prototype.makeShader = function(floats, isOpaque, matrix) { |
| 4 | var fptr = copy1dArray(floats, CanvasKit.HEAPF32); |
| 5 | // Our array has 4 bytes per float, so be sure to account for that before |
| 6 | // sending it over the wire. |
| 7 | if (!matrix) { |
| 8 | return this._makeShader(fptr, floats.length * 4, !!isOpaque); |
| 9 | } |
| 10 | return this._makeShader(fptr, floats.length * 4, !!isOpaque, matrix); |
| 11 | } |
| 12 | }); |