Lines Matching defs:CanvasKit

12  * Any memory allocated by CanvasKit.Malloc needs to be released with CanvasKit.Free.
14 * const mObj = CanvasKit.Malloc(Float32Array, 20);
18 * const cf = CanvasKit.ColorFilter.MakeMatrix(ta); // mObj could also be used.
21 * CanvasKit.Free(mObj);
26 CanvasKit.Malloc = function(typedArray, len) {
28 var ptr = CanvasKit._malloc(byteLen);
46 this.typedArray = new typedArray(CanvasKit.HEAPU8.buffer, ptr, len);
56 * Any memory allocated by CanvasKit.Malloc needs to be released with CanvasKit.Free.
58 CanvasKit.Free = function(mallocObj) {
59 CanvasKit._free(mallocObj['byteOffset']);
67 // that was returned by CanvasKit.Malloc.
70 CanvasKit._free(ptr);
85 var _scratch3x3Matrix; // the result from CanvasKit.Malloc
125 // This was created with CanvasKit.Malloc, so it's already been copied.
129 var bytesPerElement = CanvasKit[dest].BYTES_PER_ELEMENT;
131 ptr = CanvasKit._malloc(arr.length * bytesPerElement);
136 // CanvasKit exposes some different views to make it easier to work with
145 CanvasKit[dest].set(arr, ptr / bytesPerElement);
152 // If color is an object that was allocated with CanvasKit.Malloc, its pointer is
159 colorType: CanvasKit.ColorType.RGBA_F32,
167 result.colorType = CanvasKit.ColorType.RGBA_8888;
182 var ptr = CanvasKit._malloc(arr.length * 4 * 4);
188 CanvasKit.HEAPF32[adjustedPtr + idx] = arr[r][c];
197 // Copies the given DOMMatrix/Array/TypedArray to the CanvasKit heap and
214 CanvasKit.HEAPF32.set(defaultPerspective, 6 + _scratch3x3MatrixPtr / 4);
252 // Copies the given DOMMatrix/Array/TypedArray to the CanvasKit heap and
330 rv[i] = CanvasKit.HEAPF32[matrPtr/4 + i]; // divide by 4 to cast to float.
361 rv[i] = CanvasKit.HEAPF32[colorPtr/4 + i]; // divide by 4 to cast to float.