f3d6c36de3
Moves RTShader to be built behind a flag (and not shipped to npm [yet]) Bug: skia:9733 Change-Id: Ibdf965bbf3c0191ab7d9689168b1a099488c2ca3 Reviewed-on: https://skia-review.googlesource.com/c/skia/+/262142 Reviewed-by: Florin Malita <fmalita@chromium.org> Reviewed-by: Brian Osman <brianosman@google.com>
12 lines
551 B
JavaScript
12 lines
551 B
JavaScript
CanvasKit._extraInitializations = CanvasKit._extraInitializations || [];
|
|
CanvasKit._extraInitializations.push(function() {
|
|
CanvasKit.SkRuntimeEffect.prototype.makeShader = function(floats, isOpaque, matrix) {
|
|
var fptr = copy1dArray(floats, CanvasKit.HEAPF32);
|
|
// Our array has 4 bytes per float, so be sure to account for that before
|
|
// sending it over the wire.
|
|
if (!matrix) {
|
|
return this._makeShader(fptr, floats.length * 4, !!isOpaque);
|
|
}
|
|
return this._makeShader(fptr, floats.length * 4, !!isOpaque, matrix);
|
|
}
|
|
}); |