Lines Matching refs:CanvasKit
5 (function(CanvasKit){ argument
6 CanvasKit._extraInitializations = CanvasKit._extraInitializations || [];
7 CanvasKit._extraInitializations.push(function() {
9 CanvasKit.MakeSWCanvasSurface = function(idOrElement) {
20 var surface = CanvasKit.MakeSurface(canvas.width, canvas.height);
28 if (!CanvasKit.MakeCanvasSurface) {
29 CanvasKit.MakeCanvasSurface = CanvasKit.MakeSWCanvasSurface;
36 CanvasKit.MakeSurface = function(width, height) {
40 'colorType': CanvasKit.ColorType.RGBA_8888,
43 'alphaType': CanvasKit.AlphaType.Unpremul,
44 'colorSpace': CanvasKit.ColorSpace.SRGB,
48 var pixelPtr = CanvasKit._malloc(pixelLen);
54 var surface = CanvasKit.Surface._makeRasterDirect(imageInfo, pixelPtr, width*4);
64 surface.getCanvas().clear(CanvasKit.TRANSPARENT);
69 CanvasKit.MakeRasterDirectSurface = function(imageInfo, mallocObj, bytesPerRow) {
70 return CanvasKit.Surface._makeRasterDirect(imageInfo, mallocObj['byteOffset'], bytesPerRow);
75 CanvasKit.Surface.prototype.flush = function(dirtyRect) {
80 var pixels = new Uint8ClampedArray(CanvasKit.HEAPU8.buffer, this._pixelPtr, this._pixelLen);
96 CanvasKit.Surface.prototype.dispose = function() {
98 CanvasKit._free(this._pixelPtr);
103 CanvasKit.currentContext = CanvasKit.currentContext || function() {
107 CanvasKit.setCurrentContext = CanvasKit.setCurrentContext || function() {