diff --git a/apps/demo/src/app.ts b/apps/demo/src/app.ts index 90a8724c0..aee83bbf5 100644 --- a/apps/demo/src/app.ts +++ b/apps/demo/src/app.ts @@ -68,15 +68,25 @@ const age = parseInt(params.get("age") as any); // is the number 18 // other url: 648.170ms -console.time('url'); -for (let i = 0; i < 1_000_000; i++) { - const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18'); -} -console.timeEnd('url'); +// try loading our custom font -const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18'); -console.log('canParse', URL.canParse('asdasd'), URL.canParse('https://example.com/?name=Jonathan%20Smith&age=18')); +const font = nsPath.join(knownFolders.currentApp().path, 'fonts/Creepster-Regular.ttf'); + +global.CanvasModule.__addFontFamily('creepster', [font]); + + + + +// console.time('url'); +// for (let i = 0; i < 1_000_000; i++) { +// const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18'); +// } +// console.timeEnd('url'); + +// const url = new URL('https://example.com/?name=Jonathan%20Smith&age=18'); + +// console.log('canParse', URL.canParse('asdasd'), URL.canParse('https://example.com/?name=Jonathan%20Smith&age=18')); Application.on('uncaughtError', (args) => { console.log('uncaughtError: error', args.error); diff --git a/apps/demo/src/fonts/Creepster-Regular.ttf b/apps/demo/src/fonts/Creepster-Regular.ttf new file mode 100644 index 000000000..668c59cf4 Binary files /dev/null and b/apps/demo/src/fonts/Creepster-Regular.ttf differ diff --git a/packages/canvas-babylon/package.json b/packages/canvas-babylon/package.json index 927c12e2f..8d340cdbf 100644 --- a/packages/canvas-babylon/package.json +++ b/packages/canvas-babylon/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-babylon", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-chartjs/package.json b/packages/canvas-chartjs/package.json index 9ed6bd944..217a428f9 100644 --- a/packages/canvas-chartjs/package.json +++ b/packages/canvas-chartjs/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-chartjs", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "ChartJS", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-media/package.json b/packages/canvas-media/package.json index a02df36a1..8839076bd 100644 --- a/packages/canvas-media/package.json +++ b/packages/canvas-media/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-media", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Canvas media", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-media/video/index.ios.ts b/packages/canvas-media/video/index.ios.ts index 16be80185..1abdf9da7 100644 --- a/packages/canvas-media/video/index.ios.ts +++ b/packages/canvas-media/video/index.ios.ts @@ -265,7 +265,6 @@ export class Video extends VideoBase { this._asset = AVURLAsset.assetWithURL(url); const keys = ['tracks', 'duration']; this._asset.loadValuesAsynchronouslyForKeysCompletionHandler(keys, () => { - console.dir(this._asset.tracksWithMediaType(AVMediaTypeVideo)); this._videoSize = this._asset.tracksWithMediaType(AVMediaTypeVideo)?.objectAtIndex(0).naturalSize ?? undefined; const fps = this._asset.tracks.firstObject?.nominalFrameRate ?? 30; diff --git a/packages/canvas-phaser-ce/package.json b/packages/canvas-phaser-ce/package.json index 6f8e18d11..8b276f6f7 100644 --- a/packages/canvas-phaser-ce/package.json +++ b/packages/canvas-phaser-ce/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-phaser-ce", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Tools for using Phaser-ce to build native 2D games in NativeScript 👾", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-phaser/package.json b/packages/canvas-phaser/package.json index f1329b1cc..bb454deb4 100644 --- a/packages/canvas-phaser/package.json +++ b/packages/canvas-phaser/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-phaser", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Build awesome 2D games with Phaser.js and NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-pixi/package.json b/packages/canvas-pixi/package.json index 024b63080..94fb67dd4 100644 --- a/packages/canvas-pixi/package.json +++ b/packages/canvas-pixi/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-pixi", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Plugin for using pixi.js in NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-polyfill/package.json b/packages/canvas-polyfill/package.json index b13103913..25f0a3a84 100644 --- a/packages/canvas-polyfill/package.json +++ b/packages/canvas-polyfill/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-polyfill", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Polyfill for making NativeScript compatible with web libs like pixi.js, three.js, phaser.js, babylon.js, etc....", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-three/package.json b/packages/canvas-three/package.json index 4ae5847c5..264348b10 100644 --- a/packages/canvas-three/package.json +++ b/packages/canvas-three/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas-three", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "Utilities for using THREE.js on NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas/Canvas/common.ts b/packages/canvas/Canvas/common.ts index 285262fa2..e0f4197ce 100644 --- a/packages/canvas/Canvas/common.ts +++ b/packages/canvas/Canvas/common.ts @@ -138,8 +138,8 @@ export class MouseEvent extends UIEvent { readonly pageY: number; constructor(type: 'dblclick' | 'mousedown' | 'mouseenter' | 'mouseleave' | 'mousemove' | 'mouseout' | 'mouseover' | 'mouseup', options?: MouseEventOptions) { super(type as any, options); - this.screenX = options.screenX ?? 0; - this.screenY = options.screenY ?? 0; + this.screenX = options?.screenX ?? 0; + this.screenY = options?.screenY ?? 0; this.clientX = options?.clientX ?? 0; this.clientY = options?.clientY ?? 0; this.ctrlKey = options?.ctrlKey ?? false; @@ -372,22 +372,22 @@ export abstract class CanvasBase extends View implements ICanvasBase { _isCustom: boolean = false; _classList: Set; - _pointerMoveCallbacks = new Set(); - _pointerUpCallbacks = new Set(); - _pointerDownCallbacks = new Set(); - _pointerCancelCallbacks = new Set(); + _pointerMoveCallbacks = []; + _pointerUpCallbacks = []; + _pointerDownCallbacks = []; + _pointerCancelCallbacks = []; // For mouse compat because wtf - _mouseMoveCallbacks = new Set(); - _mouseUpCallbacks = new Set(); - _mouseDownCallbacks = new Set(); - _mouseCancelCallbacks = new Set(); - _mouseWheelCallbacks = new Set(); + _mouseMoveCallbacks = []; + _mouseUpCallbacks = []; + _mouseDownCallbacks = []; + _mouseCancelCallbacks = []; + _mouseWheelCallbacks = []; - _touchStartCallbacks = new Set<(TouchEvent) => void>(); - _touchEndCallbacks = new Set<(TouchEvent) => void>(); - _touchMoveCallbacks = new Set<(TouchEvent) => void>(); - _touchCancelCallbacks = new Set<(TouchEvent) => void>(); + _touchStartCallbacks = new Array<(TouchEvent) => void>(); + _touchEndCallbacks = new Array<(TouchEvent) => void>(); + _touchMoveCallbacks = new Array<(TouchEvent) => void>(); + _touchCancelCallbacks = new Array<(TouchEvent) => void>(); _touches: Touch[] = []; _touchesById: Touch[] = []; @@ -410,50 +410,57 @@ export abstract class CanvasBase extends View implements ICanvasBase { switch (eventtype) { case 'mousemove': - this._mouseMoveCallbacks.add(callback); + this._mouseMoveCallbacks.push(callback); break; case 'pointermove': - this._pointerMoveCallbacks.add(callback); + this._pointerMoveCallbacks.push(callback); break; case 'mousedown': - this._mouseDownCallbacks.add(callback); + this._mouseDownCallbacks.push(callback); break; case 'pointerdown': - this._pointerDownCallbacks.add(callback); + this._pointerDownCallbacks.push(callback); break; case 'mouseup': - this._mouseUpCallbacks.add(callback); + this._mouseUpCallbacks.push(callback); break; case 'pointerup': - this._pointerUpCallbacks.add(callback); + this._pointerUpCallbacks.push(callback); break; case 'moveout': case 'mousecancel': - this._mouseCancelCallbacks.add(callback); + this._mouseCancelCallbacks.push(callback); break; case 'pointercancel': - this._pointerCancelCallbacks.add(callback); + this._pointerCancelCallbacks.push(callback); break; case 'touchstart': - this._touchStartCallbacks.add(callback); + this._touchStartCallbacks.push(callback); break; case 'touchend': - this._touchEndCallbacks.add(callback); + this._touchEndCallbacks.push(callback); break; case 'touchmove': - this._touchMoveCallbacks.add(callback); + this._touchMoveCallbacks.push(callback); break; case 'touchcancel': - this._touchCancelCallbacks.add(callback); + this._touchCancelCallbacks.push(callback); break; case 'wheel': case 'mousewheel': case 'dommousescroll': - this._mouseWheelCallbacks.add(callback); + this._mouseWheelCallbacks.push(callback); break; } } + private _removeItemFromArray(array: any[], item) { + const index = array.indexOf(item); + if (index !== -1) { + array.splice(index, 1); + } + } + public removeEventListener(arg: string, callback: any, thisArg?: any) { super.removeEventListener(arg, callback, thisArg); // if (WEB_GESTURE_EVENTS.indexOf(arg) !== -1) { @@ -467,58 +474,57 @@ export abstract class CanvasBase extends View implements ICanvasBase { switch (eventtype) { case 'mousemove': - this._mouseMoveCallbacks.delete(callback); + this._removeItemFromArray(this._mouseMoveCallbacks, callback); break; case 'pointermove': - this._pointerMoveCallbacks.delete(callback); + this._removeItemFromArray(this._pointerMoveCallbacks, callback); break; case 'mousedown': - this._mouseDownCallbacks.delete(callback); + this._removeItemFromArray(this._mouseDownCallbacks, callback); break; case 'pointerdown': - this._pointerDownCallbacks.delete(callback); + this._removeItemFromArray(this._pointerDownCallbacks, callback); break; case 'mouseup': - this._mouseUpCallbacks.delete(callback); + this._removeItemFromArray(this._mouseUpCallbacks, callback); break; case 'pointerup': - this._pointerUpCallbacks.delete(callback); + this._removeItemFromArray(this._pointerUpCallbacks, callback); break; case 'moveout': case 'mousecancel': - this._mouseCancelCallbacks.delete(callback); + this._removeItemFromArray(this._mouseCancelCallbacks, callback); break; case 'pointercancel': - this._pointerCancelCallbacks.delete(callback); + this._removeItemFromArray(this._pointerCancelCallbacks, callback); break; case 'touchstart': - this._touchStartCallbacks.delete(callback); + this._removeItemFromArray(this._touchStartCallbacks, callback); break; case 'touchend': - this._touchEndCallbacks.delete(callback); + this._removeItemFromArray(this._touchEndCallbacks, callback); break; case 'touchmove': - this._touchMoveCallbacks.delete(callback); + this._removeItemFromArray(this._touchMoveCallbacks, callback); break; case 'touchcancel': - this._touchCancelCallbacks.delete(callback); + this._removeItemFromArray(this._touchCancelCallbacks, callback); break; case 'wheel': case 'mousewheel': case 'dommousescroll': - this._mouseWheelCallbacks.delete(callback); + this._removeItemFromArray(this._mouseWheelCallbacks, callback); break; } } private _moveCallback(pointers: { ptrId: number; x: number; y: number }[]) { - const hasPointerCallbacks = this._pointerMoveCallbacks.size > 0; - const hasMouseCallbacks = this._mouseMoveCallbacks.size > 0; + const hasPointerCallbacks = this._pointerMoveCallbacks.length > 0; + const hasMouseCallbacks = this._mouseMoveCallbacks.length > 0; if (hasPointerCallbacks || hasMouseCallbacks) { for (const pointer of pointers) { const pointerId = pointer.ptrId; const previousEvent = this._lastPointerEventById[pointerId]; - if (hasPointerCallbacks) { const event = new PointerEvent('pointermove', { pointerType: 'touch', @@ -532,6 +538,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { movementX: pointer.x - previousEvent.x, movementY: pointer.y - previousEvent.y, isPrimary: pointerId === 0, + button: -1, }); for (const callback of this._pointerMoveCallbacks) { @@ -549,6 +556,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { pageY: pointer.y, movementX: pointer.x - previousEvent.x, movementY: pointer.y - previousEvent.y, + button: -1, }); for (const callback of this._mouseMoveCallbacks) { @@ -560,7 +568,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { } } - if (this._touchMoveCallbacks.size > 0) { + if (this._touchMoveCallbacks.length > 0) { const changedTouches = []; for (const pointer of pointers) { @@ -593,8 +601,8 @@ export abstract class CanvasBase extends View implements ICanvasBase { } private _upCallback(ptrId, x, y) { - const hasPointerCallbacks = this._pointerUpCallbacks.size > 0; - const hasMouseCallbacks = this._mouseUpCallbacks.size > 0; + const hasPointerCallbacks = this._pointerUpCallbacks.length > 0; + const hasMouseCallbacks = this._mouseUpCallbacks.length > 0; if (hasPointerCallbacks || hasMouseCallbacks) { const pointerId = ptrId; @@ -642,7 +650,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { } } - if (this._touchEndCallbacks.size > 0) { + if (this._touchEndCallbacks.length > 0) { const touches = TouchList.fromList(this._touches); const changedTouches = [ @@ -671,8 +679,8 @@ export abstract class CanvasBase extends View implements ICanvasBase { } private _downCallback(ptrId, x, y) { - const hasPointerCallbacks = this._pointerDownCallbacks.size > 0; - const hasMouseCallbacks = this._mouseDownCallbacks.size > 0; + const hasPointerCallbacks = this._pointerDownCallbacks.length > 0; + const hasMouseCallbacks = this._mouseDownCallbacks.length > 0; if (hasPointerCallbacks || hasMouseCallbacks) { const pointerId = ptrId; @@ -712,7 +720,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { this._lastPointerEventById[pointerId] = { pointerId, x, y }; } - if (this._touchStartCallbacks.size > 0) { + if (this._touchStartCallbacks.length > 0) { const touch = new Touch({ identifier: ptrId, target: this, @@ -740,8 +748,8 @@ export abstract class CanvasBase extends View implements ICanvasBase { } private _cancelCallback(ptrid, x, y) { - const hasPointerCallbacks = this._pointerCancelCallbacks.size > 0; - const hasMouseCallbacks = this._mouseCancelCallbacks.size > 0; + const hasPointerCallbacks = this._pointerCancelCallbacks.length > 0; + const hasMouseCallbacks = this._mouseCancelCallbacks.length > 0; if (hasPointerCallbacks || hasMouseCallbacks) { const pointerId = ptrid; if (hasPointerCallbacks) { @@ -777,7 +785,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { } } - if (this._touchCancelCallbacks.size > 0) { + if (this._touchCancelCallbacks.length > 0) { const touch = new Touch({ identifier: ptrid, target: this, @@ -807,9 +815,9 @@ export abstract class CanvasBase extends View implements ICanvasBase { private _pinchCallback(data: { event: string; deltaX: number; deltaY: number; deltaMode: number; pointers: { ptrId: number; x: number; y: number }[]; isInProgress: boolean }) { // move callback - const hasPointerCallbacks = this._pointerMoveCallbacks.size > 0; - const hasMouseCallbacks = this._mouseMoveCallbacks.size > 0; - const hasMouseWheel = this._mouseWheelCallbacks.size > 0; + const hasPointerCallbacks = this._pointerMoveCallbacks.length > 0; + const hasMouseCallbacks = this._mouseMoveCallbacks.length > 0; + const hasMouseWheel = this._mouseWheelCallbacks.length > 0; if (hasPointerCallbacks || hasMouseCallbacks || hasMouseWheel) { for (const pointer of data.pointers) { @@ -828,6 +836,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { pageY: pointer.y, movementX: pointer.x - previousEvent.x, movementY: pointer.y - previousEvent.y, + button: -1, }); for (const callback of this._pointerMoveCallbacks) { @@ -845,6 +854,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { pageY: pointer.y, movementX: pointer.x - previousEvent.x, movementY: pointer.y - previousEvent.y, + button: -1, }); for (const callback of this._mouseMoveCallbacks) { @@ -869,7 +879,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { } } - if (this._touchMoveCallbacks.size > 0) { + if (this._touchMoveCallbacks.length > 0) { const changedTouches = []; for (const pointer of data.pointers) { @@ -901,6 +911,40 @@ export abstract class CanvasBase extends View implements ICanvasBase { } } + /* + switched on second move + + { + "event": "down", + "ptrId": 0, + "x": 970.5, + "y": 688.5 + } + { + "event": "down", + "ptrId": 1, + "x": 395.5, + "y": 187.5 + } + { + "event": "move", + "pointers": [ + { + "ptrId": 0, + "x": 396, + "y": 187.5 + }, + { + "ptrId": 1, + "x": 971, + "y": 688.5 + } + ] + } + + + */ + _handleEvents(event) { try { const data = JSON.parse(event); @@ -1046,13 +1090,7 @@ export abstract class CanvasBase extends View implements ICanvasBase { } return value.value || 0; } else if (value.unit === '%') { - const orientation = Application.orientation(); - if (orientation === 'portrait' || orientation === 'landscape') { - if (global.isAndroid) { - return (measuredSize ?? (type === 'width' ? Screen.mainScreen.widthPixels : Screen.mainScreen.heightPixels)) * value.value ?? 0; - } - return (measuredSize ?? (type === 'width' ? Screen.mainScreen.widthDIPs : Screen.mainScreen.heightDIPs)) * value.value ?? 0; - } + return Utils.layout.toDeviceIndependentPixels(measuredSize * value.value ?? 0); } } diff --git a/packages/canvas/Canvas/index.android.ts b/packages/canvas/Canvas/index.android.ts index 158638fcb..217e0564e 100644 --- a/packages/canvas/Canvas/index.android.ts +++ b/packages/canvas/Canvas/index.android.ts @@ -40,7 +40,7 @@ export class Canvas extends CanvasBase { private _contextType = ContextType.None; private _is2D = false; - + private _isBatch = false; constructor() { super(); const activity = Application.android.foregroundActivity || Application.android.startActivity || Utils.android.getApplicationContext(); @@ -115,6 +115,8 @@ export class Canvas extends CanvasBase { } } return width / Screen.mainScreen.scale; + + //return this._realSize.width; } set width(value) { @@ -136,6 +138,7 @@ export class Canvas extends CanvasBase { } } return height / Screen.mainScreen.scale; + //return this._realSize.height; } set height(value) { @@ -146,9 +149,11 @@ export class Canvas extends CanvasBase { static createCustomView() { const canvas = new Canvas(); + canvas._isBatch = true; canvas.width = 300; canvas.height = 150; canvas._isCustom = true; + canvas._isBatch = false; canvas._layoutNative(); return canvas; } @@ -267,6 +272,9 @@ export class Canvas extends CanvasBase { } _layoutNative() { + if (this._isBatch) { + return; + } if (!this._isCustom) { return; } diff --git a/packages/canvas/Canvas/index.d.ts b/packages/canvas/Canvas/index.d.ts index cf5ad49ff..502d90077 100644 --- a/packages/canvas/Canvas/index.d.ts +++ b/packages/canvas/Canvas/index.d.ts @@ -25,6 +25,7 @@ export declare class Canvas extends CanvasBase { readonly clientHeight: number; private _2dContext; private canvas; + native: any; constructor(); diff --git a/packages/canvas/Canvas/index.ios.ts b/packages/canvas/Canvas/index.ios.ts index 78946b952..a6a7e7a28 100644 --- a/packages/canvas/Canvas/index.ios.ts +++ b/packages/canvas/Canvas/index.ios.ts @@ -43,7 +43,7 @@ export class Canvas extends CanvasBase { private _contextType = ContextType.None; private _is2D = false; - + private _isBatch = false; _didLayout = false; constructor() { @@ -111,32 +111,33 @@ export class Canvas extends CanvasBase { //@ts-ignore get width() { - const measuredWidth = this.getMeasuredWidth(); - if (measuredWidth !== 0) { - return measuredWidth / Screen.mainScreen.scale; - } + // const measuredWidth = this.getMeasuredWidth(); + // console.log(measuredWidth); + // if (measuredWidth !== 0) { + // return measuredWidth / Screen.mainScreen.scale; + // } return this._realSize.width; } set width(value) { this.style.width = value; this._didLayout = false; - this._layoutNative(); + this._layoutNative(true); } //@ts-ignore get height() { - const measuredHeight = this.getMeasuredHeight(); - if (measuredHeight !== 0) { - return measuredHeight / Screen.mainScreen.scale; - } + // const measuredHeight = this.getMeasuredHeight(); + // if (measuredHeight !== 0) { + // return measuredHeight / Screen.mainScreen.scale; + // } return this._realSize.height; } set height(value) { this.style.height = value; this._didLayout = false; - this._layoutNative(); + this._layoutNative(true); } private _iosOverflowSafeArea = false; @@ -159,9 +160,11 @@ export class Canvas extends CanvasBase { static createCustomView() { const canvas = new Canvas(); - canvas.width = 300; - canvas.height = 150; + canvas._isBatch = true; canvas._isCustom = true; + canvas.style.width = 300; + canvas.style.height = 150; + canvas._isBatch = false; canvas._layoutNative(); return canvas; } @@ -241,27 +244,37 @@ export class Canvas extends CanvasBase { super.disposeNativeView(); } - _layoutNative() { - if (!this._isCustom) { + _layoutNative(force: boolean = false) { + if (this._isBatch) { + return; + } + + if (!this._isCustom && !force) { return; } - if (this._didLayout) { + if (this._didLayout && !force) { return; } - if (!this.parent) { - if ((typeof this.style.width === 'string' && this.style.width.indexOf('%')) || (typeof this.style.height === 'string' && this.style.height.indexOf('%'))) { + if (!this.parent || force) { + if (!force || (typeof this.style.width === 'string' && this.style.width.indexOf('%')) || (typeof this.style.height === 'string' && this.style.height.indexOf('%'))) { return; } const size = this._realSize; - /*const width = Utils.layout.toDeviceIndependentPixels(size.width || 1); - const height = Utils.layout.toDeviceIndependentPixels(size.height || 1);*/ + // todo revisit + + const width = Utils.layout.toDevicePixels(size.width || 1); + const height = Utils.layout.toDevicePixels(size.height || 1); this._canvas.forceLayout(size.width, size.height); + if (this._is2D) { + this._2dContext.native.__resize(width, height); + } + this._didLayout = true; } } @@ -280,6 +293,7 @@ export class Canvas extends CanvasBase { this._layoutNative(); const opts = { ...defaultOpts, ...this._handleContextOptions(type, options), fontColor: this.parent?.style?.color?.android || -16777216 }; + const ctx = this._canvas.create2DContext(opts.alpha, opts.antialias, opts.depth, opts.failIfMajorPerformanceCaveat, opts.powerPreference, opts.premultipliedAlpha, opts.preserveDrawingBuffer, opts.stencil, opts.desynchronized, opts.xrCompatible, opts.fontColor); this._2dContext = new (CanvasRenderingContext2D as any)(ctx); @@ -290,6 +304,7 @@ export class Canvas extends CanvasBase { this._contextType = ContextType.Canvas; // @ts-ignore this._2dContext._type = '2d'; + this._is2D = true; } return this._2dContext; @@ -384,16 +399,7 @@ export class Canvas extends CanvasBase { NSCCanvas.getBoundingClientRect(this._canvas, this._boundingClientRect); - const ret = new DOMRect( - this._boundingClientRect[6], - this._boundingClientRect[7], - this._boundingClientRect[4], - this._boundingClientRect[5], - this._boundingClientRect[0], - this._boundingClientRect[1], - this._boundingClientRect[2], - this._boundingClientRect[3], - ); + const ret = new DOMRect(this._boundingClientRect[6], this._boundingClientRect[7], this._boundingClientRect[4], this._boundingClientRect[5], this._boundingClientRect[0], this._boundingClientRect[1], this._boundingClientRect[2], this._boundingClientRect[3]); // const ret = { // bottom: this._boundingClientRect[2], diff --git a/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts b/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts index 95d500704..083bd0353 100644 --- a/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts +++ b/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts @@ -107,6 +107,14 @@ export class CanvasRenderingContext2D { this.context.lineDashOffset = offset; } + get letterSpacing() { + return this.context.letterSpacing; + } + + set letterSpacing(spacing: string) { + this.context.letterSpacing = spacing; + } + get lineJoin() { return this.context.lineJoin; } @@ -160,7 +168,15 @@ export class CanvasRenderingContext2D { } set textAlign(alignment: string) { - this.context.setTextAlign = alignment; + this.context.textAlign = alignment; + } + + get textBaseline() { + return this.context.textBaseline; + } + + set textBaseline(baseline: string) { + this.context.textBaseline = baseline; } get globalCompositeOperation() { @@ -217,6 +233,14 @@ export class CanvasRenderingContext2D { this.context.lineWidth = width; } + get wordSpacing() { + return this.context.wordSpacing; + } + + set wordSpacing(spacing: string) { + this.context.wordSpacing = spacing; + } + __toDataURL(type: string = 'image/jpg', quality: number = 92) { return this.context.__toDataURL(type, quality); } diff --git a/packages/canvas/WebGL/WebGLRenderingContext/common.ts b/packages/canvas/WebGL/WebGLRenderingContext/common.ts index eaadc1387..944d00a85 100644 --- a/packages/canvas/WebGL/WebGLRenderingContext/common.ts +++ b/packages/canvas/WebGL/WebGLRenderingContext/common.ts @@ -8,7 +8,7 @@ import { WebGLActiveInfo } from '../WebGLActiveInfo'; import { WebGLRenderbuffer } from '../WebGLRenderbuffer'; import { WebGLShaderPrecisionFormat } from '../WebGLShaderPrecisionFormat'; -export abstract class WebGLRenderingContextBase implements CanvasRenderingContext { +export abstract class WebGLRenderingCommon implements CanvasRenderingContext { abstract readonly drawingBufferHeight: number; abstract readonly drawingBufferWidth: number; public static isDebug = false; diff --git a/packages/canvas/WebGL/WebGLRenderingContext/index.ts b/packages/canvas/WebGL/WebGLRenderingContext/index.ts index 3ee162986..61ab5ab38 100644 --- a/packages/canvas/WebGL/WebGLRenderingContext/index.ts +++ b/packages/canvas/WebGL/WebGLRenderingContext/index.ts @@ -1,4 +1,4 @@ -import { WebGLRenderingContextBase } from './common'; +import { WebGLRenderingCommon } from './common'; import { WebGLShader } from '../WebGLShader'; import { WebGLFramebuffer } from '../WebGLFramebuffer'; @@ -44,7 +44,7 @@ import { Helpers } from '../../helpers'; let ctor; -export class WebGLRenderingContext extends WebGLRenderingContextBase { +export class WebGLRenderingContextBase extends WebGLRenderingCommon { public static isDebug = false; public static filter: 'both' | 'error' | 'args' = 'both'; _context; @@ -337,8 +337,6 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { @profile detachShader(program: WebGLProgram, shader: WebGLShader): void { - this._glCheckError('detachShader'); - this._checkArgs('detachShader', arguments); const value = program.native; const value2 = shader.native; this.native.detachShader(value, value2); @@ -822,9 +820,10 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { @profile texImage2D(target: any, level: any, internalformat: any, width: any, height: any, border: any, format?: any, type?: any, pixels?: any) { - if (arguments.length === 9) { + const length = arguments.length; + if (length === 9) { this.native.texImage2D(target, level, internalformat, width, height, border, format, type ?? internalformat, pixels); - } else if (arguments.length === 6) { + } else if (length === 6) { if (border && typeof border.tagName === 'string' && (border.tagName === 'VID' || border.tagName === 'VIDEO') && border._video && typeof border._video.getCurrentFrame === 'function') { border._video.getCurrentFrame(this.native, this, target, level, internalformat, width, height); } else if (border && typeof border.getCurrentFrame === 'function') { @@ -833,11 +832,15 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { this.native.texImage2D(target, level, internalformat, width, height, border.native); } else if (border instanceof ImageBitmap) { this.native.texImage2D(target, level, internalformat, width, height, border.native); + } else if (border instanceof Canvas) { + this.native.texImage2D(target, level, internalformat, width, height, border.native); } else if (global.isAndroid && border instanceof android.graphics.Bitmap) { // todo ios this.native.texImage2D(target, level, internalformat, width, height, border); } else if (border instanceof ImageSource) { - this.native.texImage2D(target, level, internalformat, width, height, border.android); + if (global.isAndroid) { + this.native.texImage2D(target, level, internalformat, width, height, border.android); + } } else if (border && typeof border.tagName === 'string' && (border.tagName === 'IMG' || border.tagName === 'IMAGE')) { if (border._asset instanceof ImageAsset) { this.native.texImage2D(target, level, internalformat, width, height, border._asset.native); @@ -847,7 +850,9 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { //todo ios this.native.texImage2D(target, level, internalformat, width, height, border._image); } else if (typeof border.src === 'string') { - this.native.texImage2D(target, level, internalformat, width, height, ImageSource.fromFileSync(border.src).android); + if (global.isAndroid) { + this.native.texImage2D(target, level, internalformat, width, height, ImageSource.fromFileSync(border.src).android); + } } } else if (border && typeof border.tagName === 'string' && border.tagName === 'CANVAS' && border._canvas instanceof Canvas) { this.native.texImage2D(target, level, internalformat, width, height, border._canvas.native); @@ -871,21 +876,28 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { @profile texSubImage2D(target: any, level: any, xoffset: any, yoffset: any, width: any, height: any, format: any, type?: any, pixels?: any) { - if (arguments.length === 9) { + const length = arguments.length; + if (length === 9) { this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format, type, pixels); - } else if (arguments.length === 7) { + } else if (length === 7) { if (global.isAndroid && format instanceof android.graphics.Bitmap) { // todo this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format); } else if (format instanceof ImageSource) { - this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.android); + if (global.isAndroid) { + this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.android); + } } else if (format instanceof ImageAsset) { this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.native); + } else if (format instanceof Canvas) { + this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.native); } else if (format instanceof ImageBitmap) { this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format.native); } else if (format && typeof format.tagName === 'string' && (format.tagName === 'IMG' || format.tagName === 'IMAGE')) { if (format._imageSource instanceof ImageSource) { - this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._imageSource.android); + if (global.isAndroid) { + this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._imageSource.android); + } } else if (global.isAndroid && format._image instanceof android.graphics.Bitmap) { // todo this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._image); @@ -893,7 +905,13 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._asset.native); } else if (typeof format.src === 'string') { const result = ImageSource.fromFileSync(format.src); - this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, result ? result.android : null); + if (global.isAndroid && result.android) { + this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, result.android); + } + + if (global.isIOS && result.ios) { + this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, result.ios); + } } } else if (format && typeof format.tagName === 'string' && format.tagName === 'CANVAS' && format._canvas instanceof Canvas) { this.native.texSubImage2D(target, level, xoffset, yoffset, width, height, format._canvas.native); @@ -1097,3 +1115,5 @@ export class WebGLRenderingContext extends WebGLRenderingContextBase { } } } + +export class WebGLRenderingContext extends WebGLRenderingContextBase {} \ No newline at end of file diff --git a/packages/canvas/WebGL2/WebGL2RenderingContext/common.ts b/packages/canvas/WebGL2/WebGL2RenderingContext/common.ts index 76abb2b9a..451bfc203 100644 --- a/packages/canvas/WebGL2/WebGL2RenderingContext/common.ts +++ b/packages/canvas/WebGL2/WebGL2RenderingContext/common.ts @@ -1,6 +1,6 @@ -import { WebGLRenderingContext } from '../../WebGL/WebGLRenderingContext'; +import { WebGLRenderingContextBase } from '../../WebGL/WebGLRenderingContext'; -export class WebGL2RenderingContextBase extends WebGLRenderingContext { +export class WebGL2RenderingContextBase extends WebGLRenderingContextBase { constructor(context, contextOptions?) { super(context, contextOptions); } diff --git a/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts b/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts index 227e6d6c1..9d613486b 100644 --- a/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts +++ b/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts @@ -396,6 +396,8 @@ export class WebGL2RenderingContext extends WebGL2RenderingContextBase { this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.android); } else if (source instanceof ImageAsset) { this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.native); + } else if (source instanceof Canvas) { + this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.native); } else if (source instanceof ImageBitmap) { this.native.texImage3D(target, level, internalformat, width, height, depth, border, format, type, source.native); } else if (source && typeof source.tagName === 'string' && (source.tagName === 'IMG' || source.tagName === 'IMAGE')) { @@ -437,6 +439,8 @@ export class WebGL2RenderingContext extends WebGL2RenderingContextBase { this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.android); } else if (srcData instanceof ImageAsset) { this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.native); + } else if (srcData instanceof Canvas) { + this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.native); } else if (srcData instanceof ImageBitmap) { this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData.native); } else if (srcData && typeof srcData.tagName === 'string' && (srcData.tagName === 'IMG' || srcData.tagName === 'IMAGE')) { @@ -450,7 +454,7 @@ export class WebGL2RenderingContext extends WebGL2RenderingContextBase { const result = ImageSource.fromFileSync(srcData.src); this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, result ? result.android : null); } - } else if (srcData && typeof srcData.tagName === 'string' && srcData.tagName === 'CANVAS' && srcData._canvas instanceof TNSCanvas) { + } else if (srcData && typeof srcData.tagName === 'string' && srcData.tagName === 'CANVAS' && srcData._canvas instanceof Canvas) { this.native.texSubImage3D(target, level, xoffset, yoffset, zoffset, width, height, depth, format, type, srcData._canvas.native); } } diff --git a/packages/canvas/package.json b/packages/canvas/package.json index 17b05c4cb..3cd3a3710 100644 --- a/packages/canvas/package.json +++ b/packages/canvas/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas", - "version": "2.0.0-alpha.31", + "version": "2.0.0-alpha.38", "description": "DOM Canvas API for NativeScript", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas/platforms/android/canvas-release.aar b/packages/canvas/platforms/android/canvas-release.aar index eb404590d..a4058ca85 100644 Binary files a/packages/canvas/platforms/android/canvas-release.aar and b/packages/canvas/platforms/android/canvas-release.aar differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative index 91c7480a0..80dc89ba0 100755 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h index e42cc5e8f..9c1eed8fa 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -308,6 +308,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -356,8 +358,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -424,8 +425,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -450,8 +452,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h index 5cafc1060..982bd5b7a 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h @@ -94,6 +94,8 @@ void canvas_native_release_gl_pointer(int64_t gl_context); void canvas_native_context_2d_test(int64_t context); +void canvas_native_gl_make_current(int64_t gl_context); + char *canvas_native_context_2d_test_to_data_url(int64_t context); void canvas_native_context_2d_destroy_string(char *string); diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h index 7e86d752f..f799a4a91 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h @@ -203,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -660,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -772,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist index d32b2e086..1b31de346 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo index 5c31bf759..9b46c200a 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface index a4c456297..22cb61565 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc index f88080d08..9226f7d57 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface index a4c456297..22cb61565 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative index b4ca2435b..fffe3ecd6 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative index 7d3049a3a..aa1559946 100755 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h index 9d0d26be6..7b72b0127 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -308,6 +308,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -356,8 +358,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -424,8 +425,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -450,8 +452,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end @@ -774,6 +776,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -822,8 +826,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -890,8 +893,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -916,8 +920,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h index 5cafc1060..982bd5b7a 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h @@ -94,6 +94,8 @@ void canvas_native_release_gl_pointer(int64_t gl_context); void canvas_native_context_2d_test(int64_t context); +void canvas_native_gl_make_current(int64_t gl_context); + char *canvas_native_context_2d_test_to_data_url(int64_t context); void canvas_native_context_2d_destroy_string(char *string); diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h index 7e86d752f..f799a4a91 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h @@ -203,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -660,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -772,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist index a09f02b83..da60e37b7 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo index b823560ce..1e2e354b3 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo index e58a36b0e..33c5548bc 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface index 9ad2d4856..e18c47eb5 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc index 6f13e0e75..bcd931402 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 9ad2d4856..e18c47eb5 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface index 9ffb9b51a..e2afffa42 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc index 95d27b3dc..56404d60f 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 9ffb9b51a..e2afffa42 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources index c8d25c199..702692229 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Headers/CanvasNative-Swift.h - +VCFMd8HrKLciD+OwsTVcdS0fAA= + hkAiS/OaLARvaFQb0DHwxYCAHNo= Headers/CanvasNative.h @@ -14,63 +14,63 @@ Headers/canvas_ios.h - KTxEWGEXbMkpqkl1jFw9IrlUXNk= + LPanBXKcbVunr8F1KyVxJgAshlg= Headers/canvas_native.h - IGuEROm9kdptZf3262S3gVStmBg= + pRAw58hbawyHmNg47MpPInfGUXE= Info.plist - U1i9btMZtOpHf9qhXwKYLDvVNdo= + EM/hl4VHfqrUWG5WhwjIgBQydpw= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo - HCnnpXSRLMEZUawVYP7bjIrykvY= + 3PGfu+DpWs74e2/jectBCkoPFkE= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo - NBQwCzT566EVuifc3CGTABJArIg= + AB2ULkbsV/tnfqLTj8xebAByTMg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json - ZMfwT5PJatFgh1+CMyoU3Wv8PIw= + rFeSh8JKQPfJKcbUjik683Pavbk= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + inBGczQvUjm9lsHxlr42D7v1U04= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc - CMMmee6VmdZfdJ0Wkbazb7dDXdQ= + 3k4ihv2rEGRfxk2bofe8XCNgmOU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + inBGczQvUjm9lsHxlr42D7v1U04= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule - xwUL0+sPWQOnLRbmCRAaufNhlQg= + B2YAI7Jk/GkcR0hx/P4EyZK13MM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json - ZMfwT5PJatFgh1+CMyoU3Wv8PIw= + rFeSh8JKQPfJKcbUjik683Pavbk= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + yTqFfRNAsSrbxJ3fEcILTeeMEPc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - qIf+V6LPokPDapYCnIkzGPNTQBQ= + LhXFUgL45ajNWjn9PjgN0RRMMRI= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + yTqFfRNAsSrbxJ3fEcILTeeMEPc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - a6dK/jYfYD3OMc+7AAdKioPdSzM= + Pr1Krr/11x7o2pc+XAGhTm0ZJj8= Modules/module.modulemap @@ -87,7 +87,7 @@ hash2 - fXm+b+Qm+nCs5qVchcJ5cPoIgOfKloO3YiRF6o4KNRg= + NgdeIBmztWUdD5mFMZ3+6AuGJtG14SrQYJD64J/vSpg= Headers/CanvasNative.h @@ -101,98 +101,98 @@ hash2 - TiO6d1r0FpNodOiAuX3VSvZMqWAXTOTOJOr7ntjAfW0= + D4WQBTe9g4ZWCu0OZfSbjUBcaqYn7WDpfEaYGK/aMqQ= Headers/canvas_native.h hash2 - 0L3I06bMeoK4UNoafHEw7AGoDeCi4B1w6G3Ms6CT26A= + +uJrcducrhwiNwtZ6wBUM2xpn2cfp1O2gq8/4NtuBVU= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo hash2 - 47O+ZoX5+8n5GWFdbt4LCXjSURv2AO1i+hSh7J7xyB0= + I2vQ77pc0KsbHL/IZ12xyWXLUnLqPKPtP6ovn8ocz5M= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo hash2 - WiDcXU4QuScyp6Lnic8gkcbMnIznccTZHGi35c1pR+g= + 8oN/iiMOEWKZyn+VYAy5OchsZ1wNXjfzjIQ6OgBPhFY= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json hash2 - E/7n06UUQIxz7Bkm2stxRet0YW5fO/ZBPTzdDtTgKrQ= + s7wRxIkfcWnQw1jCFrtr8hXFiK7atp9hr7ZiFk+ScDs= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + IgoY8nnXBXHGBbuwtmgkwCoVPabGtCPt2hPzjoFWD94= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc hash2 - XEwqbBhZEdrykIJcHcrifRLpaclowS2e/807PqxiO3c= + hfByW1Q/oKQfs+YO18TpacW07cK0OcnuziqQqzi0jjg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + IgoY8nnXBXHGBbuwtmgkwCoVPabGtCPt2hPzjoFWD94= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule hash2 - pTosagdcfbOSk+kqEUxvwO8uiO0kDuxEPJAEzFGZvNw= + lTwunV/yvYWKFiAhLqSymZsSWJwe/e/LsF6bFfisqFw= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json hash2 - E/7n06UUQIxz7Bkm2stxRet0YW5fO/ZBPTzdDtTgKrQ= + s7wRxIkfcWnQw1jCFrtr8hXFiK7atp9hr7ZiFk+ScDs= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + OXsFDkfWFhzN0IAaF4qXZjPWZYuJfnbjQheRjEZW2zM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc hash2 - 4Vrv9xfds4FwI/1nDrreY1HfYl1r31bJkIMvsfoEf54= + 0DLlMsH/LfZQEHFMASjz0T2DkSd63Uboie1M0O5WBmc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + OXsFDkfWFhzN0IAaF4qXZjPWZYuJfnbjQheRjEZW2zM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule hash2 - RzFPk/lsBdJedrAgG+Vzkgv6bq2WCg3BdPLGfDgwZtM= + EYv30S7uOq5oYA+vgzHwfGa8rS7Tgcd/7MZClAyVz+4= Modules/module.modulemap diff --git a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative index a32e468ca..717e15c29 100644 Binary files a/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp index 6140fb5b2..e1c3dc865 100644 --- a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp +++ b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.cpp @@ -34,7 +34,7 @@ void CanvasJSIModule::install(v8::Isolate *isolate) { CanvasPattern::Init(canvasMod, isolate); MatrixImpl::Init(canvasMod, isolate); TextMetricsImpl::Init(canvasMod, isolate); - URLImpl::Init(canvasMod, isolate); + URLImpl::Init(canvasMod, isolate); v8Global->Set(context, ConvertToV8String(isolate, "CanvasModule"), canvasMod); canvasMod->Set(context, ConvertToV8String(isolate, "create2DContext"), v8::FunctionTemplate::New(isolate, &Create2DContext)->GetFunction( @@ -57,6 +57,11 @@ void CanvasJSIModule::install(v8::Isolate *isolate) { v8::FunctionTemplate::New(isolate, &CreateWebGL2Context)->GetFunction( context).ToLocalChecked()); + + canvasMod->Set(context, ConvertToV8String(isolate, "__addFontFamily"), + v8::FunctionTemplate::New(isolate, &AddFontFamily)->GetFunction( + context).ToLocalChecked()); + global->Set(context, ConvertToV8String(isolate, "CanvasModule"), canvasMod); @@ -64,6 +69,37 @@ void CanvasJSIModule::install(v8::Isolate *isolate) { } +void CanvasJSIModule::AddFontFamily(const v8::FunctionCallbackInfo &args) { + auto isolate = args.GetIsolate(); + auto context = isolate->GetCurrentContext(); + auto aliasValue = args[0]; + auto familyValue = args[1]; + + // todo improve + if (familyValue->IsArray()) { + auto family = familyValue.As(); + auto len = family->Length(); + std::vector buf; + std::vector buffer; + buf.reserve(len); + + for (uint32_t i = 0; i < len; i++) { + buf.emplace_back( + ConvertFromV8String(isolate, family->Get(context, i).ToLocalChecked())); + buffer.emplace_back(buf[0].c_str()); + } + + if (aliasValue->IsString()) { + auto alias = ConvertFromV8String(isolate, aliasValue); + canvas_native_font_add_family(alias.c_str(), buffer.data(), buffer.size()); + } else { + canvas_native_font_add_family(nullptr, buffer.data(), buffer.size()); + } + + } + +} + void CanvasJSIModule::Create2DContext(const v8::FunctionCallbackInfo &args) { auto isolate = args.GetIsolate(); auto context = isolate->GetCurrentContext(); diff --git a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.h b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.h index aebe6aa25..45bb453f8 100644 --- a/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.h +++ b/packages/canvas/platforms/ios/src/cpp/CanvasJSIModule.h @@ -23,12 +23,20 @@ class CanvasJSIModule { public: - static void install(v8::Isolate * isolate); + static void install(v8::Isolate *isolate); + static void CreateImageBitmap(const v8::FunctionCallbackInfo &args); + static void Create2DContext(const v8::FunctionCallbackInfo &args); + static void Create2DContextWithPointer(const v8::FunctionCallbackInfo &args); + static void ReadFile(const v8::FunctionCallbackInfo &args); + static void CreateWebGLContext(const v8::FunctionCallbackInfo &args); + static void CreateWebGL2Context(const v8::FunctionCallbackInfo &args); + + static void AddFontFamily(const v8::FunctionCallbackInfo &args); }; diff --git a/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp b/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp index ddac93dd7..6f03d8e97 100644 --- a/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +++ b/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp @@ -76,6 +76,11 @@ v8::Local CanvasRenderingContext2DImpl::GetCtor(v8::Isolat tmpl->SetAccessor(ConvertToV8String(isolate, "filter"), GetFilter, SetFilter); tmpl->SetAccessor(ConvertToV8String(isolate, "font"), GetFont, SetFont); + tmpl->SetAccessor(ConvertToV8String(isolate, "letterSpacing"), GetLetterSpacing, + SetLetterSpacing); + tmpl->SetAccessor(ConvertToV8String(isolate, "wordSpacing"), GetWordSpacing, SetWordSpacing); + + tmpl->SetAccessor(ConvertToV8String(isolate, "globalAlpha"), GetGlobalAlpha, SetGlobalAlpha); tmpl->SetAccessor(ConvertToV8String(isolate, "imageSmoothingEnabled"), GetImageSmoothingEnabled, SetImageSmoothingEnabled); @@ -383,6 +388,61 @@ void CanvasRenderingContext2DImpl::SetFont(v8::Local property, canvas_native_context_set_font(ptr->GetContext(), val.c_str()); } + +void CanvasRenderingContext2DImpl::GetLetterSpacing(v8::Local property, + const v8::PropertyCallbackInfo &info) { + CanvasRenderingContext2DImpl *ptr = GetPointer(info.This()); + if (ptr == nullptr) { + info.GetReturnValue().SetEmptyString(); + return; + } + auto isolate = info.GetIsolate(); + auto font = canvas_native_context_get_letter_spacing(ptr->GetContext()); + info.GetReturnValue().Set(ConvertToV8String(isolate, font)); + + canvas_native_string_destroy((char *) font); +} + +void CanvasRenderingContext2DImpl::SetLetterSpacing(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo &info) { + CanvasRenderingContext2DImpl *ptr = GetPointer(info.This()); + if (ptr == nullptr) { + return; + } + auto isolate = info.GetIsolate(); + auto val = ConvertFromV8String(isolate, value); + canvas_native_context_set_letter_spacing(ptr->GetContext(), val.c_str()); +} + + +void CanvasRenderingContext2DImpl::GetWordSpacing(v8::Local property, + const v8::PropertyCallbackInfo &info) { + CanvasRenderingContext2DImpl *ptr = GetPointer(info.This()); + if (ptr == nullptr) { + info.GetReturnValue().SetEmptyString(); + return; + } + auto isolate = info.GetIsolate(); + auto font = canvas_native_context_get_word_spacing(ptr->GetContext()); + info.GetReturnValue().Set(ConvertToV8String(isolate, font)); + + canvas_native_string_destroy((char *) font); +} + +void CanvasRenderingContext2DImpl::SetWordSpacing(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo &info) { + CanvasRenderingContext2DImpl *ptr = GetPointer(info.This()); + if (ptr == nullptr) { + return; + } + auto isolate = info.GetIsolate(); + auto val = ConvertFromV8String(isolate, value); + canvas_native_context_set_word_spacing(ptr->GetContext(), val.c_str()); +} + + void CanvasRenderingContext2DImpl::GetGlobalAlpha(v8::Local property, const v8::PropertyCallbackInfo &info) { CanvasRenderingContext2DImpl *ptr = GetPointer(info.This()); @@ -1729,13 +1789,18 @@ CanvasRenderingContext2DImpl::FillText(const v8::FunctionCallbackInfo auto x = static_cast(args[1]->NumberValue(context).ToChecked()); auto y = static_cast(args[2]->NumberValue(context).ToChecked()); - float width = -1; + if (args[3]->IsNumber()) { - width = static_cast(args[3]->NumberValue(context).ToChecked()); + float width = static_cast(args[3]->NumberValue(context).ToChecked()); + canvas_native_context_fill_text_width( + ptr->GetContext(), text.c_str(), x, + y, width); + } else { + canvas_native_context_fill_text( + ptr->GetContext(), text.c_str(), x, + y); } - canvas_native_context_fill_text( - ptr->GetContext(), text.c_str(), x, - y, width); + ptr->UpdateInvalidateState(); } @@ -2299,15 +2364,18 @@ CanvasRenderingContext2DImpl::StrokeText(const v8::FunctionCallbackInfo(args[1]->NumberValue(context).ToChecked()); auto y = static_cast(args[2]->NumberValue(context).ToChecked()); - float maxWidth = -1; - if (count > 3) { - maxWidth = static_cast(args[3]->NumberValue(context).ToChecked()); + float maxWidth = static_cast(args[3]->NumberValue(context).ToChecked()); + canvas_native_context_stroke_text_width( + ptr->GetContext(), text.c_str(), + x, y, maxWidth); + } else { + canvas_native_context_stroke_text( + ptr->GetContext(), text.c_str(), + x, y); } - canvas_native_context_stroke_text( - ptr->GetContext(), text.c_str(), - x, y, maxWidth); + ptr->UpdateInvalidateState(); } } diff --git a/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h b/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h index 0c9123531..b51f547da 100644 --- a/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +++ b/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h @@ -72,6 +72,21 @@ class CanvasRenderingContext2DImpl { v8::Local value, const v8::PropertyCallbackInfo &info); + + static void GetLetterSpacing(v8::Local property, + const v8::PropertyCallbackInfo &info); + + static void SetLetterSpacing(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo &info); + + static void GetWordSpacing(v8::Local property, + const v8::PropertyCallbackInfo &info); + + static void SetWordSpacing(v8::Local property, + v8::Local value, + const v8::PropertyCallbackInfo &info); + static void SetGlobalAlpha(v8::Local property, v8::Local value, const v8::PropertyCallbackInfo &info); diff --git a/packages/canvas/src-native/canvas-android/.idea/gradle.xml b/packages/canvas/src-native/canvas-android/.idea/gradle.xml index 05fb892b1..eefc02552 100644 --- a/packages/canvas/src-native/canvas-android/.idea/gradle.xml +++ b/packages/canvas/src-native/canvas-android/.idea/gradle.xml @@ -4,10 +4,8 @@ diff --git a/packages/canvas/src-native/canvas-android/.idea/migrations.xml b/packages/canvas/src-native/canvas-android/.idea/migrations.xml new file mode 100644 index 000000000..f8051a6f9 --- /dev/null +++ b/packages/canvas/src-native/canvas-android/.idea/migrations.xml @@ -0,0 +1,10 @@ + + + + + + \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/cpp/include/canvas_native.h b/packages/canvas/src-native/canvas-android/canvas/src/main/cpp/include/canvas_native.h index 7e86d752f..d615bf1d7 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/cpp/include/canvas_native.h +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/cpp/include/canvas_native.h @@ -244,6 +244,10 @@ void canvas_native_raf_stop(struct Raf *raf); bool canvas_native_raf_get_started(const struct Raf *raf); #endif +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + struct CanvasRenderingContext2D *canvas_native_context_create_with_wrapper(int64_t context, int64_t gl_context); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -658,6 +672,11 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, float height); void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, const char *text, float x, float y, @@ -770,6 +789,11 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, float height); void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, const char *text, float x, float y, diff --git a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/NSCCanvas.kt b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/NSCCanvas.kt index 9df743ffd..ba2d64180 100644 --- a/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/NSCCanvas.kt +++ b/packages/canvas/src-native/canvas-android/canvas/src/main/java/org/nativescript/canvas/NSCCanvas.kt @@ -399,7 +399,11 @@ class NSCCanvas : FrameLayout { xrCompatible ) - val density = resources.displayMetrics.density + val density = if (ignorePixelScaling) { + 1F + } else { + resources.displayMetrics.density + } val samples = if (antialias) { 4 @@ -407,8 +411,6 @@ class NSCCanvas : FrameLayout { 0 } - val start = System.currentTimeMillis() - native2DContext = nativeCreate2DContext( nativeGL, this.drawingBufferWidth, @@ -420,9 +422,6 @@ class NSCCanvas : FrameLayout { (resources.displayMetrics.densityDpi * 160).toFloat(), direction ) - - Log.d("com.test", "ts ${System.currentTimeMillis() - start}") - return native2DContext } diff --git a/packages/canvas/src-native/canvas-ios/CanvasDemo/CanvasDemo.xcodeproj/project.pbxproj b/packages/canvas/src-native/canvas-ios/CanvasDemo/CanvasDemo.xcodeproj/project.pbxproj index 35ccb20cf..6b8fcc2a3 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasDemo/CanvasDemo.xcodeproj/project.pbxproj +++ b/packages/canvas/src-native/canvas-ios/CanvasDemo/CanvasDemo.xcodeproj/project.pbxproj @@ -486,7 +486,7 @@ FRAMEWORK_SEARCH_PATHS = "$(inherited)"; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = CanvasDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", @@ -523,7 +523,7 @@ FRAMEWORK_SEARCH_PATHS = "$(inherited)"; HEADER_SEARCH_PATHS = "$(inherited)"; INFOPLIST_FILE = CanvasDemo/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; LD_RUNPATH_SEARCH_PATHS = ( "$(inherited)", diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj index 93d7b8551..b8b9a3fa6 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj +++ b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.pbxproj @@ -532,10 +532,10 @@ ); INFOPLIST_FILE = CanvasNative/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*][arch=arm64]" = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=arm64]" = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=x86_64]" = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*][arch=arm64]" = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=arm64]" = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=x86_64]" = 12.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; KEEP_PRIVATE_EXTERNS = NO; LD_RUNPATH_SEARCH_PATHS = ( @@ -618,10 +618,10 @@ ); INFOPLIST_FILE = CanvasNative/Info.plist; INSTALL_PATH = "$(LOCAL_LIBRARY_DIR)/Frameworks"; - IPHONEOS_DEPLOYMENT_TARGET = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*][arch=arm64]" = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=arm64]" = 11.0; - "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=x86_64]" = 11.0; + IPHONEOS_DEPLOYMENT_TARGET = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphoneos*][arch=arm64]" = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=arm64]" = 12.0; + "IPHONEOS_DEPLOYMENT_TARGET[sdk=iphonesimulator*][arch=x86_64]" = 12.0; "IPHONEOS_DEPLOYMENT_TARGET[sdk=macosx*]" = 14.2; KEEP_PRIVATE_EXTERNS = NO; LD_RUNPATH_SEARCH_PATHS = ( diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate index 0528c776d..cc160fb74 100644 Binary files a/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate and b/packages/canvas/src-native/canvas-ios/CanvasNative.xcodeproj/project.xcworkspace/xcuserdata/triniwiz.xcuserdatad/UserInterfaceState.xcuserstate differ diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/GLRenderer.swift b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/GLRenderer.swift index 272bce24d..8ea3ecae2 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/GLRenderer.swift +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/GLRenderer.swift @@ -13,6 +13,8 @@ import UIKit @objc(CanvasGLKView) public class CanvasGLKView: GLKView { var isDirty: Bool = false + private (set) var fbo: UInt32 = 0 + public init() { super.init(frame: .zero) } @@ -33,6 +35,17 @@ public class CanvasGLKView: GLKView { super.setNeedsDisplay(rect) // isDirty = true } + public override func bindDrawable() { + super.bindDrawable() + var fbo: UInt32 = 0 + glGetIntegerv(GLenum(GL_FRAMEBUFFER_BINDING), &fbo) + self.fbo = fbo + } + + public override func deleteDrawable() { + super.deleteDrawable() + self.fbo = 0 + } } diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/NSCCanvas.swift b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/NSCCanvas.swift index a9a24bf4e..437bcc652 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/Source/NSCCanvas.swift +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/Source/NSCCanvas.swift @@ -12,11 +12,8 @@ import WebKit @objcMembers @objc(NSCCanvas) -public class NSCCanvas: UIView, GLKViewDelegate { +public class NSCCanvas: UIView { - public func glkView(_ view: GLKView, drawIn rect: CGRect) { - view.enableSetNeedsDisplay = false - } private static let shared_context_view = GLKView(frame: .init(x: 0, y: 0, width: 1, height: 1)) @@ -70,11 +67,20 @@ public class NSCCanvas: UIView, GLKViewDelegate { return ptr! } - public var ignorePixelScaling = false + public var ignorePixelScaling: Bool = false { + didSet { + if(ignorePixelScaling){ + glkView.contentScaleFactor = 1 + }else { + glkView.contentScaleFactor = UIScreen.main.scale + } + } + } + private(set) public var nativeGL: Int64 = 0 private(set) public var nativeContext: Int64 = 0 - private var native2DContext: Int64 = 0 + private(set) var native2DContext: Int64 = 0 internal var glkView: CanvasGLKView private var is2D = false @@ -175,11 +181,13 @@ public class NSCCanvas: UIView, GLKViewDelegate { if(alpha){ properties[kEAGLDrawablePropertyColorFormat] = kEAGLColorFormatRGBA8 isOpaque = false + glkView.isOpaque = false (glkView.layer as! CAEAGLLayer).isOpaque = false }else { properties[kEAGLDrawablePropertyColorFormat] = kEAGLColorFormatRGB565 isOpaque = true (glkView.layer as! CAEAGLLayer).isOpaque = true + glkView.isOpaque = true } @@ -207,19 +215,15 @@ public class NSCCanvas: UIView, GLKViewDelegate { let viewPtr = Int64(Int(bitPattern: getViewPtr())) + let shared_context = NSCCanvas.shared_context nativeGL = CanvasHelpers.initSharedGLWithView(viewPtr,alpha, antialias, depth, failIfMajorPerformanceCaveat, type, premultipliedAlpha, preserveDrawingBuffer, stencil, desynchronized, xrCompatible, Int32(version), isCanvas, shared_context) + + // get new fbo nativeContext = CanvasHelpers.getGLPointer(nativeGL) - - - if(useWebGL){ - // fixes initial whitescreen - glkView.deleteDrawable() - } - } @objc public func create2DContext( @@ -259,7 +263,13 @@ public class NSCCanvas: UIView, GLKViewDelegate { glViewport(0, 0, GLsizei(drawingBufferWidth), GLsizei(drawingBufferHeight)) - let density = Float(UIScreen.main.scale) + var density = Float(UIScreen.main.scale) + + + if (ignorePixelScaling) { + density = 1 + } + native2DContext = CanvasHelpers.create2DContext( nativeGL, Int32(drawingBufferWidth), Int32(drawingBufferHeight), alpha, density, samples, fontColor, density * 160, 0 @@ -275,11 +285,10 @@ public class NSCCanvas: UIView, GLKViewDelegate { return } -// if (width == lastSize.width && height == lastSize.height) { -// return; -// } - frame = CGRect(x: frame.origin.x, y: frame.origin.y, width: width, height: height) + glkView.frame = bounds + + setNeedsLayout() layoutIfNeeded() } @@ -299,6 +308,8 @@ public class NSCCanvas: UIView, GLKViewDelegate { return snapshot } + + var renderer: NSCRender? = nil @discardableResult public func render() -> Bool{ return CanvasHelpers.flushGL(nativeGL) } @@ -336,11 +347,11 @@ public class NSCCanvas: UIView, GLKViewDelegate { handler = NSCTouchHandler(canvas: self) backgroundColor = .clear glkView.enableSetNeedsDisplay = false - glkView.contentScaleFactor = UIScreen.main.nativeScale + glkView.contentScaleFactor = UIScreen.main.scale addSubview(glkView) self.isOpaque = false addGestureRecognizer(handler!.gestureRecognizer!) - addGestureRecognizer(handler!.pinchRecognizer!) + // addGestureRecognizer(handler!.pinchRecognizer!) } public override init(frame: CGRect) { @@ -349,21 +360,21 @@ public class NSCCanvas: UIView, GLKViewDelegate { handler = NSCTouchHandler(canvas: self) backgroundColor = .clear glkView.enableSetNeedsDisplay = false - glkView.contentScaleFactor = UIScreen.main.nativeScale + glkView.contentScaleFactor = UIScreen.main.scale addSubview(glkView) self.isOpaque = false addGestureRecognizer(handler!.gestureRecognizer!) - addGestureRecognizer(handler!.pinchRecognizer!) + // addGestureRecognizer(handler!.pinchRecognizer!) } var ignoreTouchEvents = false { didSet { if(ignoreTouchEvents){ removeGestureRecognizer(handler!.gestureRecognizer!) - removeGestureRecognizer(handler!.pinchRecognizer!) + // removeGestureRecognizer(handler!.pinchRecognizer!) }else { addGestureRecognizer(handler!.gestureRecognizer!) - addGestureRecognizer(handler!.pinchRecognizer!) + // addGestureRecognizer(handler!.pinchRecognizer!) } } } @@ -381,11 +392,8 @@ public class NSCCanvas: UIView, GLKViewDelegate { private func resize(){ if(nativeGL == 0){return} EAGLContext.setCurrent(glkView.context) - glkView.deleteDrawable() - if(is2D){ - glkView.bindDrawable() - glViewport(0, 0, GLsizei(glkView.frame.width), GLsizei(glkView.frame.height)) + glViewport(0, 0, GLsizei(drawingBufferWidth), GLsizei(drawingBufferHeight)) CanvasHelpers.resize2DContext(native2DContext, Float(drawingBufferWidth), Float(drawingBufferHeight)) } } diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_ios.h b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_ios.h index 5cafc1060..982bd5b7a 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_ios.h +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_ios.h @@ -94,6 +94,8 @@ void canvas_native_release_gl_pointer(int64_t gl_context); void canvas_native_context_2d_test(int64_t context); +void canvas_native_gl_make_current(int64_t gl_context); + char *canvas_native_context_2d_test_to_data_url(int64_t context); void canvas_native_context_2d_destroy_string(char *string); diff --git a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h index 7e86d752f..f799a4a91 100644 --- a/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h +++ b/packages/canvas/src-native/canvas-ios/CanvasNative/include/canvas_native.h @@ -203,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -660,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -772,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, diff --git a/packages/canvas/src-native/canvas-ios/NSCRender.swift b/packages/canvas/src-native/canvas-ios/NSCRender.swift index e64858aa1..d948b1b22 100644 --- a/packages/canvas/src-native/canvas-ios/NSCRender.swift +++ b/packages/canvas/src-native/canvas-ios/NSCRender.swift @@ -8,20 +8,23 @@ import Foundation import OpenGLES import CoreVideo +import UIKit + + @objcMembers -@objc(TNSRender) +@objc(NSCRender) public class NSCRender: NSObject { - private var mProgram = UInt32() - private var rbo = UInt32() - private var fbo = UInt32() - private var width: Int = -1 - private var height: Int = -1 - private var ab = UInt32() - private var pos = Int32(-1) - private var samplerPos = Int32() - private var vextexBuf: [Float32] - private static let SIZE_OF_FLOAT = 4 - private static let VERTEX_SHADER = """ + var mProgram = UInt32() + var rbo = UInt32() + var fbo = UInt32() + var width: Int = -1 + var height: Int = -1 + var ab = UInt32() + var pos = Int32(-1) + var samplerPos = Int32() + var vextexBuf: [Float32] + static let SIZE_OF_FLOAT = 4 + static let VERTEX_SHADER = """ precision highp float; attribute vec4 aPosition; uniform mat4 uTextureMatrix; @@ -42,8 +45,11 @@ public class NSCRender: NSObject { } """ - private var videoTexture: CVOpenGLESTexture? = nil - private var videoTextureCache: CVOpenGLESTextureCache? = nil + var surface: IOSurface? = nil + var videoTexture: CVOpenGLESTexture? = nil + var videoTextureCache: CVOpenGLESTextureCache? = nil + + var pixelBuf: Unmanaged? public override init() { vextexBuf = [ 0, 0, @@ -66,7 +72,185 @@ public class NSCRender: NSObject { pos = -1 } - func drawFrame(buffer:CVPixelBuffer,width: Int,height: Int, internalFormat: Int32, + + static func getPixelFormat(_ cgImage: CGImage) -> CGBitmapInfo? { + return cgImage.bitmapInfo.intersection(.byteOrderMask) + } + + + + public func texImage2D(_ target: Int32 , _ level: Int32, _ internalFormat: Int32, _ format: Int32, _ type: Int32, _ source: NSCCanvas, _ dest: NSCCanvas,_ flipYWebGL: Bool){ + canvas_native_gl_make_current(source.nativeGL) + + + // Check for the OES_mapbuffer extension + let extensions = String(cString: glGetString(GLenum(GL_EXTENSIONS))) + + if extensions.contains("GL_OES_mapbuffer") { + // OES_mapbuffer extension is supported, you can use glMapBufferOES + print("OES_mapbuffer is supported.") + } else { + // OES_mapbuffer extension is not supported + print("OES_mapbuffer is not supported.") + } + + + let sourceWidth = source.drawingBufferWidth + let sourceHeight = source.drawingBufferHeight + + + var start = CFAbsoluteTimeGetCurrent() + + var previous_framebuffer: GLint = 0 + + + glGetIntegerv( + GLenum(GL_FRAMEBUFFER_BINDING), + &previous_framebuffer + ) + + + var previous_texture: GLint = 0 + + glGetIntegerv( + GLenum(GL_TEXTURE_BINDING_2D), + &previous_texture + ) + + + var previous_pixel_pack_buffer: GLint = 0 + + glGetIntegerv( + GLenum(GL_PIXEL_PACK_BUFFER_BINDING), + &previous_pixel_pack_buffer + ) + + + + // Create a framebuffer + var framebuffer: GLuint = 0 + glGenFramebuffers(1, &framebuffer) + glBindFramebuffer(GLenum(GL_FRAMEBUFFER), framebuffer) + + // Create a texture to render into + var texture: GLuint = 0 + glGenTextures(1, &texture) + glBindTexture(GLenum(GL_TEXTURE_2D), texture) + glTexImage2D(GLenum(GL_TEXTURE_2D), 0, GL_RGBA, GLsizei(sourceWidth), GLsizei(sourceHeight), 0, GLenum(GL_RGBA), GLenum(GL_UNSIGNED_BYTE), nil) + glFramebufferTexture2D(GLenum(GL_FRAMEBUFFER), GLenum(GL_COLOR_ATTACHMENT0), GLenum(GL_TEXTURE_2D), texture, 0) + + // Check framebuffer status (optional) + if glCheckFramebufferStatus(GLenum(GL_FRAMEBUFFER)) != GLenum(GL_FRAMEBUFFER_COMPLETE) { + print("Framebuffer is not complete.") + } + + // Unbind framebuffer + glBindFramebuffer(GLenum(GL_FRAMEBUFFER), GLuint(previous_framebuffer)) + + // Create PBOs + var pbos: [GLuint] = Array(repeating: 0, count: 2 + ) + glGenBuffers(GLsizei(pbos.count), &pbos) + + + // Allocate storage for PBOs + let bufferSize: GLsizei = GLsizei(sourceWidth * sourceHeight * 4) + for pbo in pbos { + glBindBuffer(GLenum(GL_PIXEL_PACK_BUFFER), pbo) + glBufferData(GLenum(GL_PIXEL_PACK_BUFFER), GLsizeiptr(bufferSize), nil, GLenum(GL_STREAM_READ)) + } + + // Bind the framebuffer + glBindFramebuffer(GLenum(GL_FRAMEBUFFER), framebuffer) + + // Use PBOs with glReadPixels for asynchronous pixel transfers + for pbo in pbos { + glBindBuffer(GLenum(GL_PIXEL_PACK_BUFFER), pbo) + glReadPixels(0, 0, GLsizei(sourceWidth), GLsizei(sourceHeight), GLenum(GL_RGBA), GLenum(GL_UNSIGNED_BYTE), nil) + } + + // Unbind the framebuffer + glBindFramebuffer(GLenum(GL_FRAMEBUFFER), GLuint(previous_framebuffer)) + + + var combinedData = UnsafeMutableRawPointer.allocate(byteCount: Int(bufferSize) * pbos.count, alignment: 1) + + // Map the PBOs for reading (asynchronously) + var count = 0 + for pbo in pbos { + glBindBuffer(GLenum(GL_PIXEL_PACK_BUFFER), pbo) + // let mappedData = glMapBufferOES(GLenum(GL_PIXEL_PACK_BUFFER), GLenum(GL_MAP_READ_BIT_EXT)) + let mappedData = glMapBufferRange(GLenum(GL_PIXEL_PACK_BUFFER), 0, GLsizeiptr(bufferSize), GLenum(GL_MAP_READ_BIT)) + + + if mappedData != nil { + if(count == 0){ + memcpy(combinedData, mappedData, Int(bufferSize)) + }else { + memcpy(combinedData.advanced(by: Int(bufferSize)), mappedData, Int(bufferSize)) + } + glUnmapBuffer(GLenum(GL_PIXEL_PACK_BUFFER)) + } else { + print("Failed to map buffer.") + } + + let error = glGetError() + if error != GLenum(GL_NO_ERROR) { + print("OpenGL error: \(error)") + } + + count += 1 + } + + + + glBindBuffer(GLenum(GL_PIXEL_PACK_BUFFER), GLuint(previous_pixel_pack_buffer)) + glBindBuffer(GLenum(GL_FRAMEBUFFER), GLuint(previous_framebuffer)) + glBindBuffer(GLenum(GL_TEXTURE_2D), GLuint(previous_texture)) + + + glDeleteFramebuffers(1, &framebuffer) + glDeleteTextures(1, &texture) + glDeleteBuffers(GLsizei(pbos.count), &pbos) + + print("glMapBufferOES", CFAbsoluteTimeGetCurrent() - start) + + start = CFAbsoluteTimeGetCurrent() + canvas_native_gl_make_current(dest.nativeGL) + + + +// var unpack: GLint = 0 +// var pack: GLint = 0 +// glGetIntegerv(GLenum(GL_UNPACK_ALIGNMENT), &unpack) +// glGetIntegerv(GLenum(GL_PACK_ALIGNMENT), &pack) +// +// print(unpack, pack) +// glPixelStorei(GLenum(GL_UNPACK_ALIGNMENT), 1) +// glPixelStorei(GLenum(GL_PACK_ALIGNMENT), 1) + + + + + + glTexImage2D(GLenum(target), level, internalFormat, GLsizei(sourceWidth) , GLsizei(sourceHeight), 0, GLenum(format), GLenum(type), combinedData) + + + combinedData.deallocate() + +// glPixelStorei(GLenum(GL_UNPACK_ALIGNMENT), unpack) +// glPixelStorei(GLenum(GL_PACK_ALIGNMENT), pack) + + print("glTexImage2D \(CFAbsoluteTimeGetCurrent() - start)") + + let error = glGetError() + if error != GLenum(GL_NO_ERROR) { + print("OpenGL error: \(error)") + } + + } + + func drawFrame(buffer:CVPixelBuffer, width: Int, height: Int, internalFormat: Int32, format: Int32, flipYWebGL: Bool) { @@ -233,7 +417,6 @@ public class NSCRender: NSObject { return } - var textureID: GLuint = GLuint() textureID = CVOpenGLESTextureGetName(videoTexture!) glBindTexture(GLenum(GL_TEXTURE_2D), textureID) diff --git a/packages/canvas/src-native/canvas-ios/NSCTouchHandler.swift b/packages/canvas/src-native/canvas-ios/NSCTouchHandler.swift index 3679f7fed..019d2b4e3 100644 --- a/packages/canvas/src-native/canvas-ios/NSCTouchHandler.swift +++ b/packages/canvas/src-native/canvas-ios/NSCTouchHandler.swift @@ -24,6 +24,7 @@ class NSCTouchHandler: NSObject { } var pointers: [CGPoint] = Array(repeating: CGPointZero, count: 10) + var touches: [UITouch?] = Array(repeating: nil, count: 10) var lastPointerPosition: [CGPoint] = Array(repeating: CGPointZero, count: 10) class TouchGestureRecognizer: UIGestureRecognizer { @@ -32,6 +33,7 @@ class NSCTouchHandler: NSObject { for (ptridx, touch) in touches.enumerated() { + let location = touch.location(in: view) @@ -41,6 +43,7 @@ class NSCTouchHandler: NSObject { } handler.pointers[ptridx] = location + handler.touches[ptridx] = touch handler.onPress(ptridx, location.x, location.y, self) view?.touchesBegan(touches, with: event) @@ -49,7 +52,7 @@ class NSCTouchHandler: NSObject { } override func touchesMoved(_ touches: Set, with event: UIEvent) { - handler?.onMove(self) + handler?.onMove(self, touches) view?.touchesMoved(touches, with: event) } @@ -67,6 +70,7 @@ class NSCTouchHandler: NSObject { handler.onRelease(ptridx, location.x, location.y, self) handler.pointers[ptridx] = CGPointZero + handler.touches[ptridx] = nil view?.touchesEnded(touches, with: event) @@ -84,13 +88,12 @@ class NSCTouchHandler: NSObject { } handler.onCancel(ptridx, location.x, location.y, self) handler.pointers[ptridx] = CGPointZero + handler.touches[ptridx] = nil view?.touchesCancelled(touches, with: event) } - - } } @@ -105,8 +108,6 @@ class NSCTouchHandler: NSObject { let move = press || action == .changed let release = (action == .ended) let cancelled = action == .cancelled || action == .failed - - let location = numberOfTouches > 1 ? gestureRecognizer.location(in: gestureRecognizer.view) : gestureRecognizer.location(ofTouch: ptridx, in: gestureRecognizer.view) @@ -114,33 +115,59 @@ class NSCTouchHandler: NSObject { let y = location.y guard let me = gestureRecognizer as? UIPinchGestureRecognizer else { + + // pan if(press){ pointers[ptridx] = location onPress(ptridx, x, y, gestureRecognizer) } - + if(release){ onRelease(ptridx, x, y, gestureRecognizer) } - + if(move){ onMove(gestureRecognizer) } - + if(cancelled){ onCancel(ptridx, x, y, gestureRecognizer) } - + if(release || cancelled){ pointers[ptridx] = CGPointZero } return } + + if(release || cancelled){ + if(release){ + onRelease(ptridx, x, y, gestureRecognizer) + } + + + if(cancelled){ + onCancel(ptridx, x, y, gestureRecognizer) + } + + if(release || cancelled){ + pointers[ptridx] = CGPointZero + } + + return + } + + + let start = pointers[ptridx] + + let deltaX = x - start.x + let deltaY = y - start.y + - let deltaX = pinchRecognizer?.view?.transform.tx ?? 0 - let deltaY = pinchRecognizer?.view?.transform.ty ?? 0 +// let deltaX = pinchRecognizer?.view?.transform.tx ?? 0 +// let deltaY = pinchRecognizer?.view?.transform.ty ?? 0 let pointerCount = me.numberOfTouches var sb = "{" append("event", "scale", &sb) @@ -222,9 +249,59 @@ class NSCTouchHandler: NSObject { } private func onMove( - _ gestureRecognizer: UIGestureRecognizer + _ gestureRecognizer: UIGestureRecognizer, + _ touches: Set? = nil ) { + if(touches != nil){ + /* for (ptridx, touch) in touches!.enumerated() { + + let location = touch.location(in: view) + + handler?.onMove(ptridx, location.x, location.y, self) + + + + } + */ + + var sb = "{" + append("event", "move", &sb) + + let last = touches!.count - 1 + sb.append("\"pointers\": [") + + + for (ptridx, touch) in self.touches.enumerated() { + if(touch == nil){ + continue + } + + let location = touch!.location(in: view) + + sb += "{" + append("ptrId", ptridx, &sb) + append("x", location.x, &sb) + append("y", location.y, &sb, true) + + if ptridx != last { + sb += "}," + } else { + sb += "}" + } + + } + + + sb += "]" + + sb += "}" + view.touchEventListener?(sb, gestureRecognizer) + + + return + } + let pointerCount = gestureRecognizer.numberOfTouches diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative index 91c7480a0..80dc89ba0 100755 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h index e42cc5e8f..9c1eed8fa 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -308,6 +308,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -356,8 +358,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -424,8 +425,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -450,8 +452,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h index 5cafc1060..982bd5b7a 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h @@ -94,6 +94,8 @@ void canvas_native_release_gl_pointer(int64_t gl_context); void canvas_native_context_2d_test(int64_t context); +void canvas_native_gl_make_current(int64_t gl_context); + char *canvas_native_context_2d_test_to_data_url(int64_t context); void canvas_native_context_2d_destroy_string(char *string); diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h index 7e86d752f..f799a4a91 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h @@ -203,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -660,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -772,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist index d32b2e086..1b31de346 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo index 5c31bf759..9b46c200a 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface index a4c456297..22cb61565 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc index f88080d08..9226f7d57 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface index a4c456297..22cb61565 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0 -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative index b4ca2435b..fffe3ecd6 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative index 7d3049a3a..aa1559946 100755 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h index 9d0d26be6..7b72b0127 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h @@ -308,6 +308,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -356,8 +358,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -424,8 +425,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -450,8 +452,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end @@ -774,6 +776,8 @@ SWIFT_CLASS_NAMED("CanvasGLKView") - (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE; - (void)setNeedsDisplay; - (void)setNeedsDisplayInRect:(CGRect)rect; +- (void)bindDrawable; +- (void)deleteDrawable; - (nonnull instancetype)initWithFrame:(CGRect)frame context:(EAGLContext * _Nonnull)context SWIFT_UNAVAILABLE; @end @@ -822,8 +826,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers") @protocol NSCCanvasListener; SWIFT_CLASS_NAMED("NSCCanvas") -@interface NSCCanvas : UIView -- (void)glkView:(GLKView * _Nonnull)view drawInRect:(CGRect)rect; +@interface NSCCanvas : UIView SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;) + (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT; + (NSMapTable * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT; @@ -890,8 +893,9 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que SWIFT_CLASS_NAMED("NSCRender") -@interface TNSRender : NSObject +@interface NSCRender : NSObject - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; +- (void)texImage2D:(int32_t)target :(int32_t)level :(int32_t)internalFormat :(int32_t)format :(int32_t)type :(NSCCanvas * _Nonnull)source :(NSCCanvas * _Nonnull)dest :(BOOL)flipYWebGL; - (void)createSurface; @end @@ -916,8 +920,8 @@ SWIFT_CLASS_NAMED("Utils") @interface Utils : NSObject + (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT; + (CVOpenGLESTextureRef _Nullable)createImage:(CVOpenGLESTextureCacheRef _Nonnull)texturecache :(CVImageBufferRef _Nonnull)buffer :(CFDictionaryRef _Nullable)textureAttributes :(GLenum)target :(GLint)internalFormat :(GLsizei)width :(GLsizei)height :(GLenum)format :(GLenum)type :(NSInteger)planeIndex SWIFT_WARN_UNUSED_RESULT; -+ (TNSRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; -+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(TNSRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; ++ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT; ++ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(NSCRender * _Nonnull)render :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL; + (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error; - (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER; @end diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h index 5cafc1060..982bd5b7a 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h @@ -94,6 +94,8 @@ void canvas_native_release_gl_pointer(int64_t gl_context); void canvas_native_context_2d_test(int64_t context); +void canvas_native_gl_make_current(int64_t gl_context); + char *canvas_native_context_2d_test_to_data_url(int64_t context); void canvas_native_context_2d_destroy_string(char *string); diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h index 7e86d752f..f799a4a91 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h @@ -203,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -287,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -660,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -772,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist index a09f02b83..da60e37b7 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo index b823560ce..1e2e354b3 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo index e58a36b0e..33c5548bc 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface index 9ad2d4856..e18c47eb5 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc index 6f13e0e75..bcd931402 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface index 9ad2d4856..e18c47eb5 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target arm64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target arm64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json index 1306e13cc..862a4473c 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json @@ -1623,41 +1623,6 @@ "name": "NSCCanvas", "printedName": "NSCCanvas", "children": [ - { - "kind": "Function", - "name": "glkView", - "printedName": "glkView(_:drawIn:)", - "children": [ - { - "kind": "TypeNominal", - "name": "Void", - "printedName": "()" - }, - { - "kind": "TypeNominal", - "name": "GLKView", - "printedName": "GLKit.GLKView", - "usr": "c:objc(cs)GLKView" - }, - { - "kind": "TypeNominal", - "name": "CGRect", - "printedName": "CoreFoundation.CGRect", - "usr": "c:@S@CGRect" - } - ], - "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas(im)glkView:drawInRect:", - "mangledName": "$s12CanvasNative9NSCCanvasC7glkView_6drawInySo7GLKViewC_So6CGRectVtF", - "moduleName": "CanvasNative", - "objc_name": "glkView:drawInRect:", - "declAttributes": [ - "ObjC", - "Custom", - "AccessControl" - ], - "funcSelfKind": "NonMutating" - }, { "kind": "Var", "name": "store", @@ -2931,6 +2896,13 @@ "declKind": "Import", "moduleName": "CanvasNative" }, + { + "kind": "Import", + "name": "UIKit", + "printedName": "UIKit", + "declKind": "Import", + "moduleName": "CanvasNative" + }, { "kind": "TypeDecl", "name": "NSCRender", @@ -2945,11 +2917,11 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Constructor", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)init", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)init", "mangledName": "$s12CanvasNative9NSCRenderCACycfc", "moduleName": "CanvasNative", "overriding": true, @@ -2962,6 +2934,75 @@ ], "init_kind": "Designated" }, + { + "kind": "Function", + "name": "texImage2D", + "printedName": "texImage2D(_:_:_:_:_:_:_:_:)", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "Int32", + "printedName": "Swift.Int32", + "usr": "s:s5Int32V" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "NSCCanvas", + "printedName": "CanvasNative.NSCCanvas", + "usr": "c:@M@CanvasNative@objc(cs)NSCCanvas" + }, + { + "kind": "TypeNominal", + "name": "Bool", + "printedName": "Swift.Bool", + "usr": "s:Sb" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)texImage2D::::::::", + "mangledName": "$s12CanvasNative9NSCRenderC10texImage2Dyys5Int32V_A4fA9NSCCanvasCAHSbtF", + "moduleName": "CanvasNative", + "declAttributes": [ + "AccessControl", + "ObjC" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Function", "name": "createSurface", @@ -2974,7 +3015,7 @@ } ], "declKind": "Func", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender(im)createSurface", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender(im)createSurface", "mangledName": "$s12CanvasNative9NSCRenderC13createSurfaceyyF", "moduleName": "CanvasNative", "declAttributes": [ @@ -2985,10 +3026,10 @@ } ], "declKind": "Class", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender", + "usr": "c:@M@CanvasNative@objc(cs)NSCRender", "mangledName": "$s12CanvasNative9NSCRenderC", "moduleName": "CanvasNative", - "objc_name": "TNSRender", + "objc_name": "NSCRender", "declAttributes": [ "AccessControl", "ObjC", @@ -4005,7 +4046,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" } ], "declKind": "Func", @@ -4052,7 +4093,7 @@ "kind": "TypeNominal", "name": "NSCRender", "printedName": "CanvasNative.NSCRender", - "usr": "c:@M@CanvasNative@objc(cs)TNSRender" + "usr": "c:@M@CanvasNative@objc(cs)NSCRender" }, { "kind": "TypeNominal", @@ -4708,6 +4749,58 @@ ], "funcSelfKind": "NonMutating" }, + { + "kind": "Function", + "name": "bindDrawable", + "printedName": "bindDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)bindDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC12bindDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "bindDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, + { + "kind": "Function", + "name": "deleteDrawable", + "printedName": "deleteDrawable()", + "children": [ + { + "kind": "TypeNominal", + "name": "Void", + "printedName": "()" + } + ], + "declKind": "Func", + "usr": "c:@M@CanvasNative@objc(cs)CanvasGLKView(im)deleteDrawable", + "mangledName": "$s12CanvasNative0A7GLKViewC14deleteDrawableyyF", + "moduleName": "CanvasNative", + "overriding": true, + "objc_name": "deleteDrawable", + "declAttributes": [ + "Dynamic", + "ObjC", + "Custom", + "Override", + "AccessControl" + ], + "funcSelfKind": "NonMutating" + }, { "kind": "Constructor", "name": "init", @@ -5658,640 +5751,661 @@ "length": 18, "value": "\"Failed to decode\"" }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", - "kind": "BooleanLiteral", - "offset": 372, - "length": 5, - "value": "false" - }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 458, + "offset": 328, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 464, + "offset": 334, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 474, + "offset": 344, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 485, + "offset": 355, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 542, + "offset": 412, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 652, + "offset": 522, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 766, + "offset": 636, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 907, + "offset": 777, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 980, + "offset": 850, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1451, + "offset": 1321, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1457, + "offset": 1327, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1463, + "offset": 1333, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1469, + "offset": 1339, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 1476, + "offset": 1346, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1487, + "offset": 1357, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1493, + "offset": 1363, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1500, + "offset": 1370, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1507, + "offset": 1377, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1514, + "offset": 1384, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 1521, + "offset": 1391, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 1524, + "offset": 1394, "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 2163, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2181, + "offset": 2057, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2238, + "offset": 2336, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2291, + "offset": 2389, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 2334, + "offset": 2437, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2404, + "offset": 2507, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2897, + "offset": 3000, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2931, + "offset": 3034, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 2961, + "offset": 3064, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3014, + "offset": 3117, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 3057, + "offset": 3160, "length": 9, "value": "\"default\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3105, + "offset": 3208, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3151, + "offset": 3254, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3184, + "offset": 3287, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3224, + "offset": 3327, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 3262, + "offset": 3365, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4062, + "offset": 4165, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4118, + "offset": 4221, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4144, + "offset": 4247, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4187, + "offset": 4290, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4215, + "offset": 4318, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4240, + "offset": 4343, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4304, + "offset": 4407, "length": 20, "value": "\"experimental-webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4326, + "offset": 4429, "length": 7, "value": "\"webgl\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4357, + "offset": 4460, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 4390, + "offset": 4493, "length": 8, "value": "\"webgl2\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4422, + "offset": 4525, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 4519, + "offset": 4622, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "Dictionary", - "offset": 4612, + "offset": 4715, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 5043, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5080, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5001, + "offset": 5141, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5128, + "offset": 5268, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5328, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 5188, + "offset": 5364, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 6967, + "offset": 7043, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "StringLiteral", - "offset": 7062, + "offset": 7138, "length": 4, "value": "\"2d\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7470, + "offset": 7546, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7474, + "offset": 7550, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7503, + "offset": 7579, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7506, + "offset": 7582, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7827, + "offset": 7794, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "IntegerLiteral", + "offset": 8016, "length": 3, "value": "160" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 7832, + "offset": 8021, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8495, + "offset": 8636, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10126, + "offset": 10307, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10247, + "offset": 10422, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10620, + "offset": 10798, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10741, + "offset": 10913, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10900, + "offset": 11074, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11512, + "offset": 11690, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11573, + "offset": 11751, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11750, + "offset": 11851, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11753, + "offset": 11854, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12136, + "offset": 12235, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12163, + "offset": 12262, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12195, + "offset": 12294, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12299, + "offset": 12398, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12327, + "offset": 12426, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12447, + "offset": 12546, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12558, + "offset": 12657, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12691, + "offset": 12790, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12781, + "offset": 12880, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12816, + "offset": 12915, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12889, + "offset": 12988, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13727, + "offset": 13826, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13784, + "offset": 13883, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13842, + "offset": 13941, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13891, + "offset": 13990, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13944, + "offset": 14043, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13998, + "offset": 14097, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14047, + "offset": 14146, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14209, + "offset": 14308, "length": 1, "value": "0" }, @@ -6319,413 +6433,658 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 333, + "offset": 316, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 366, + "offset": 341, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 427, + "offset": 386, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 544, + "offset": 479, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 585, + "offset": 512, "length": 274, "value": "\"precision highp float;\nattribute vec4 aPosition;\nuniform mat4 uTextureMatrix;\nvarying vec2 TexCoord;\nvoid main(){\nvec2 clipSpace = (1.0 - 2.0 * aPosition.xy);\nTexCoord = aPosition.xy;\ngl_Position = vec4(clipSpace, 0.0, 1.0);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 906, + "offset": 833, "length": 170, "value": "\"precision highp float;\nvarying vec2 TexCoord;\nuniform sampler2D uSampler;\nvoid main(){\ngl_FragColor = texture2D(uSampler, TexCoord);\n}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "Array", - "offset": 1251, + "offset": 1245, "length": 83, "value": "[0, 0, 1, 0, 0, 1, 1, 1]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1425, + "offset": 1419, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1463, + "offset": 1457, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1496, + "offset": 1490, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1517, + "offset": 1511, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1538, + "offset": 1532, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1554, + "offset": 1548, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1570, + "offset": 1564, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1588, + "offset": 1582, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1608, + "offset": 1602, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1625, + "offset": 1619, "length": 2, "value": "-1" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2196, + "length": 18, + "value": "\"GL_OES_mapbuffer\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2316, + "length": 29, + "value": "\"OES_mapbuffer is supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 2438, + "length": 33, + "value": "\"OES_mapbuffer is not supported.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2722, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 2905, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3088, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3315, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3343, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3497, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3521, + "length": 1, + "value": "1" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 1989, + "offset": 3632, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 3689, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 3857, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 4023, + "length": 30, + "value": "\"Framebuffer is not complete.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4246, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4256, + "length": 1, + "value": "2" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4431, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 4917, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 4920, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 5271, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5356, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5625, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 5754, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6073, + "length": 23, + "value": "\"Failed to map buffer.\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6230, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6253, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6304, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6597, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 6639, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 6727, + "length": 16, + "value": "\"glMapBufferOES\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 7372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "offset": 7621, + "length": 52, + "value": "\"glTexImage2D \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7672, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7777, + "length": 24, + "value": "\"OpenGL error: \"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 7800, + "length": 2, + "value": "\"\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8185, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8264, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 8274, + "length": 1, + "value": "4" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9882, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 9998, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 11018, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "StringLiteral", + "offset": 11196, "length": 52, "value": "\"TextureRender Error: Could not setup frame buffer.\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5198, + "offset": 11394, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5201, + "offset": 11397, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5204, + "offset": 11400, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5207, + "offset": 11403, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5457, + "offset": 11653, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5502, + "offset": 11698, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5525, + "offset": 11721, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5689, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5692, + "offset": 11888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 5814, + "offset": 12010, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6176, + "offset": 12372, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6492, + "offset": 12688, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6529, + "offset": 12725, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6566, + "offset": 12762, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 6603, + "offset": 12799, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7627, + "offset": 13814, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7672, + "offset": 13859, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7687, + "offset": 13874, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7813, + "offset": 14000, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 7816, + "offset": 14003, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8077, + "offset": 14264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8110, + "offset": 14297, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8143, + "offset": 14330, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8176, + "offset": 14363, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 8856, + "offset": 15043, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9085, + "offset": 15272, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9321, + "offset": 15508, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9356, + "offset": 15543, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9391, + "offset": 15578, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 9440, + "offset": 15627, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11140, + "offset": 17327, "length": 10, "value": "\"uSampler\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 11196, + "offset": 17383, "length": 11, "value": "\"aPosition\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11261, + "offset": 17448, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11292, + "offset": 17479, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 11304, + "offset": 17491, "length": 1, "value": "2" }, @@ -6739,721 +7098,812 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 897, + "offset": 878, "length": 2, "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3448, - "length": 1, - "value": "0" - }, - { - "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", - "kind": "IntegerLiteral", - "offset": 3470, - "length": 1, - "value": "1" + "offset": 960, + "length": 2, + "value": "10" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3474, + "offset": 3651, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 3738, + "offset": 3673, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4700, + "offset": 3677, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 4762, + "offset": 3927, "length": 1, - "value": "0" + "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4827, + "offset": 5548, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4846, + "offset": 5567, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4855, + "offset": 5576, "length": 7, "value": "\"scale\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4887, + "offset": 5608, "length": 8, "value": "\"deltaX\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4925, + "offset": 5646, "length": 8, "value": "\"deltaY\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 4991, + "offset": 5712, "length": 8, "value": "\"deltaZ\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5001, + "offset": 5722, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5024, + "offset": 5745, "length": 11, "value": "\"deltaMode\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5037, + "offset": 5758, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5060, + "offset": 5781, "length": 14, "value": "\"isInProgress\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5131, + "offset": 5852, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5151, + "offset": 5872, "length": 17, "value": "\"\"pointers\": [\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 5187, + "offset": 5908, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5248, + "offset": 5969, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5271, + "offset": 5992, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5406, + "offset": 6127, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5450, + "offset": 6171, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 5475, + "offset": 6196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5531, + "offset": 6252, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5579, + "offset": 6300, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5621, + "offset": 6342, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5648, + "offset": 6369, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5878, + "offset": 6599, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5897, + "offset": 6618, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5906, + "offset": 6627, "length": 6, "value": "\"down\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5934, + "offset": 6655, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5970, + "offset": 6691, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 5998, + "offset": 6719, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6011, + "offset": 6732, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6032, + "offset": 6753, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6257, + "offset": 6978, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6276, + "offset": 6997, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6285, + "offset": 7006, "length": 4, "value": "\"up\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6311, + "offset": 7032, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6347, + "offset": 7068, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6375, + "offset": 7096, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6388, + "offset": 7109, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6409, + "offset": 7130, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6628, + "offset": 7349, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6647, + "offset": 7368, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6656, + "offset": 7377, "length": 8, "value": "\"cancel\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6686, + "offset": 7407, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6722, + "offset": 7443, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6750, + "offset": 7471, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 6763, + "offset": 7484, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 6783, + "offset": 7504, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7054, + "offset": 8129, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7077, + "offset": 8156, "length": 7, "value": "\"event\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7086, + "offset": 8165, "length": 6, "value": "\"move\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7138, + "offset": 8223, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7162, + "offset": 8251, "length": 17, "value": "\"\"pointers\": [\"" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8592, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8623, + "length": 7, + "value": "\"ptrId\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8672, + "length": 3, + "value": "\"x\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8721, + "length": 3, + "value": "\"y\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "BooleanLiteral", + "offset": 8743, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8820, + "length": 4, + "value": "\"},\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 8884, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9005, + "length": 3, + "value": "\"]\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9048, + "length": 3, + "value": "\"}\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9300, + "length": 3, + "value": "\"{\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9323, + "length": 7, + "value": "\"event\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9332, + "length": 6, + "value": "\"move\"" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "IntegerLiteral", - "offset": 7202, + "offset": 9384, + "length": 1, + "value": "1" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "StringLiteral", + "offset": 9408, + "length": 17, + "value": "\"\"pointers\": [\"" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", + "kind": "IntegerLiteral", + "offset": 9448, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7271, + "offset": 9517, "length": 3, "value": "\"{\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7298, + "offset": 9544, "length": 7, "value": "\"ptrId\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7441, + "offset": 9687, "length": 3, "value": "\"x\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7489, + "offset": 9735, "length": 3, "value": "\"y\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7514, + "offset": 9760, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7578, + "offset": 9824, "length": 4, "value": "\"},\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7634, + "offset": 9880, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7688, + "offset": 9934, "length": 3, "value": "\"]\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7723, + "offset": 9969, "length": 3, "value": "\"}\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 7896, + "offset": 10142, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7919, + "offset": 10165, "length": 46, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7928, + "offset": 10174, "length": 1, "value": "\"\": \"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7942, + "offset": 10188, "length": 1, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7955, + "offset": 10201, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7960, + "offset": 10206, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 7964, + "offset": 10210, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8063, + "offset": 10309, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8086, + "offset": 10332, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8095, + "offset": 10341, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8107, + "offset": 10353, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8119, + "offset": 10365, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8124, + "offset": 10370, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8129, + "offset": 10375, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8232, + "offset": 10478, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8255, + "offset": 10501, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8264, + "offset": 10510, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8276, + "offset": 10522, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8288, + "offset": 10534, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8293, + "offset": 10539, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8298, + "offset": 10544, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8403, + "offset": 10649, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8426, + "offset": 10672, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8435, + "offset": 10681, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8447, + "offset": 10693, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8459, + "offset": 10705, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8464, + "offset": 10710, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8469, + "offset": 10715, "length": 1, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "BooleanLiteral", - "offset": 8573, + "offset": 10819, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8596, + "offset": 10842, "length": 44, "value": "\"\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8605, + "offset": 10851, "length": 1, "value": "\"\": \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8617, + "offset": 10863, "length": 1, "value": "\" \"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8629, + "offset": 10875, "length": 2, "value": "\"\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8634, + "offset": 10880, "length": 3, "value": "\",\"" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCTouchHandler.swift", "kind": "StringLiteral", - "offset": 8639, + "offset": 10885, "length": 1, "value": "\"\"" }, @@ -7639,6 +8089,27 @@ "length": 5, "value": "false" }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 271, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 841, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", + "kind": "IntegerLiteral", + "offset": 1031, + "length": 1, + "value": "0" + }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "StringLiteral", @@ -7649,105 +8120,105 @@ { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1382, + "offset": 1720, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1609, + "offset": 1947, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1802, + "offset": 2140, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 1808, + "offset": 2146, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 1965, + "offset": 2303, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 2041, + "offset": 2379, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2483, + "offset": 2821, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2627, + "offset": 2965, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 2823, + "offset": 3161, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3068, + "offset": 3406, "length": 1, "value": "8" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3092, + "offset": 3430, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3550, + "offset": 3888, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3623, + "offset": 3961, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "IntegerLiteral", - "offset": 3629, + "offset": 3967, "length": 2, "value": "-1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/GLRenderer.swift", "kind": "BooleanLiteral", - "offset": 3789, + "offset": 4127, "length": 5, "value": "false" }, diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface index 9ffb9b51a..e2afffa42 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc index 95d27b3dc..56404d60f 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc differ diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface index 9ffb9b51a..e2afffa42 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface @@ -1,6 +1,6 @@ // swift-interface-format-version: 1.0 // swift-compiler-version: Apple Swift version 5.8.1 (swiftlang-5.8.0.124.5 clang-1403.0.22.11.100) -// swift-module-flags: -target x86_64-apple-ios11.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative +// swift-module-flags: -target x86_64-apple-ios12.0-simulator -enable-objc-interop -enable-library-evolution -swift-version 5 -enforce-exclusivity=checked -O -module-name CanvasNative // swift-module-flags-ignorable: -enable-bare-slash-regex import AVFoundation @_exported import CanvasNative @@ -44,12 +44,14 @@ import _StringProcessing @objc override dynamic public init() @objc deinit } -@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView, GLKit.GLKViewDelegate { - @_Concurrency.MainActor(unsafe) @objc public func glkView(_ view: GLKit.GLKView, drawIn rect: CoreFoundation.CGRect) +@_inheritsConvenienceInitializers @_hasMissingDesignatedInitializers @objcMembers @objc(NSCCanvas) @_Concurrency.MainActor(unsafe) public class NSCCanvas : UIKit.UIView { @objc @_Concurrency.MainActor(unsafe) public static let store: Foundation.NSMutableDictionary @objc @_Concurrency.MainActor(unsafe) public static func getViews() -> Foundation.NSMapTable @objc @_Concurrency.MainActor(unsafe) public func getViewPtr() -> Swift.UnsafeMutableRawPointer - @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool + @objc @_Concurrency.MainActor(unsafe) public var ignorePixelScaling: Swift.Bool { + @objc get + @objc set + } @objc @_Concurrency.MainActor(unsafe) public var nativeGL: Swift.Int64 { get } @@ -83,8 +85,9 @@ import _StringProcessing @objc deinit @objc @_Concurrency.MainActor(unsafe) public static func getBoundingClientRect(_ canvas: CanvasNative.NSCCanvas, _ buffer: Swift.UnsafeMutableRawPointer) } -@_inheritsConvenienceInitializers @objcMembers @objc(TNSRender) public class NSCRender : ObjectiveC.NSObject { +@_inheritsConvenienceInitializers @objcMembers @objc(NSCRender) public class NSCRender : ObjectiveC.NSObject { @objc override dynamic public init() + @objc public func texImage2D(_ target: Swift.Int32, _ level: Swift.Int32, _ internalFormat: Swift.Int32, _ format: Swift.Int32, _ type: Swift.Int32, _ source: CanvasNative.NSCCanvas, _ dest: CanvasNative.NSCCanvas, _ flipYWebGL: Swift.Bool) @objc public func createSurface() @objc deinit } @@ -135,6 +138,8 @@ import _StringProcessing @_Concurrency.MainActor(unsafe) @objc override dynamic public init(frame: CoreFoundation.CGRect) @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay() @_Concurrency.MainActor(unsafe) @objc override dynamic public func setNeedsDisplay(_ rect: CoreFoundation.CGRect) + @_Concurrency.MainActor(unsafe) @objc override dynamic public func bindDrawable() + @_Concurrency.MainActor(unsafe) @objc override dynamic public func deleteDrawable() @objc deinit } extension GLKit.GLKView { diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources index c8d25c199..702692229 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources @@ -6,7 +6,7 @@ Headers/CanvasNative-Swift.h - +VCFMd8HrKLciD+OwsTVcdS0fAA= + hkAiS/OaLARvaFQb0DHwxYCAHNo= Headers/CanvasNative.h @@ -14,63 +14,63 @@ Headers/canvas_ios.h - KTxEWGEXbMkpqkl1jFw9IrlUXNk= + LPanBXKcbVunr8F1KyVxJgAshlg= Headers/canvas_native.h - IGuEROm9kdptZf3262S3gVStmBg= + pRAw58hbawyHmNg47MpPInfGUXE= Info.plist - U1i9btMZtOpHf9qhXwKYLDvVNdo= + EM/hl4VHfqrUWG5WhwjIgBQydpw= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo - HCnnpXSRLMEZUawVYP7bjIrykvY= + 3PGfu+DpWs74e2/jectBCkoPFkE= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo - NBQwCzT566EVuifc3CGTABJArIg= + AB2ULkbsV/tnfqLTj8xebAByTMg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json - ZMfwT5PJatFgh1+CMyoU3Wv8PIw= + rFeSh8JKQPfJKcbUjik683Pavbk= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + inBGczQvUjm9lsHxlr42D7v1U04= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc - CMMmee6VmdZfdJ0Wkbazb7dDXdQ= + 3k4ihv2rEGRfxk2bofe8XCNgmOU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + inBGczQvUjm9lsHxlr42D7v1U04= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule - xwUL0+sPWQOnLRbmCRAaufNhlQg= + B2YAI7Jk/GkcR0hx/P4EyZK13MM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json - ZMfwT5PJatFgh1+CMyoU3Wv8PIw= + rFeSh8JKQPfJKcbUjik683Pavbk= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + yTqFfRNAsSrbxJ3fEcILTeeMEPc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - qIf+V6LPokPDapYCnIkzGPNTQBQ= + LhXFUgL45ajNWjn9PjgN0RRMMRI= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + yTqFfRNAsSrbxJ3fEcILTeeMEPc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - a6dK/jYfYD3OMc+7AAdKioPdSzM= + Pr1Krr/11x7o2pc+XAGhTm0ZJj8= Modules/module.modulemap @@ -87,7 +87,7 @@ hash2 - fXm+b+Qm+nCs5qVchcJ5cPoIgOfKloO3YiRF6o4KNRg= + NgdeIBmztWUdD5mFMZ3+6AuGJtG14SrQYJD64J/vSpg= Headers/CanvasNative.h @@ -101,98 +101,98 @@ hash2 - TiO6d1r0FpNodOiAuX3VSvZMqWAXTOTOJOr7ntjAfW0= + D4WQBTe9g4ZWCu0OZfSbjUBcaqYn7WDpfEaYGK/aMqQ= Headers/canvas_native.h hash2 - 0L3I06bMeoK4UNoafHEw7AGoDeCi4B1w6G3Ms6CT26A= + +uJrcducrhwiNwtZ6wBUM2xpn2cfp1O2gq8/4NtuBVU= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo hash2 - 47O+ZoX5+8n5GWFdbt4LCXjSURv2AO1i+hSh7J7xyB0= + I2vQ77pc0KsbHL/IZ12xyWXLUnLqPKPtP6ovn8ocz5M= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo hash2 - WiDcXU4QuScyp6Lnic8gkcbMnIznccTZHGi35c1pR+g= + 8oN/iiMOEWKZyn+VYAy5OchsZ1wNXjfzjIQ6OgBPhFY= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json hash2 - E/7n06UUQIxz7Bkm2stxRet0YW5fO/ZBPTzdDtTgKrQ= + s7wRxIkfcWnQw1jCFrtr8hXFiK7atp9hr7ZiFk+ScDs= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + IgoY8nnXBXHGBbuwtmgkwCoVPabGtCPt2hPzjoFWD94= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc hash2 - XEwqbBhZEdrykIJcHcrifRLpaclowS2e/807PqxiO3c= + hfByW1Q/oKQfs+YO18TpacW07cK0OcnuziqQqzi0jjg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + IgoY8nnXBXHGBbuwtmgkwCoVPabGtCPt2hPzjoFWD94= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule hash2 - pTosagdcfbOSk+kqEUxvwO8uiO0kDuxEPJAEzFGZvNw= + lTwunV/yvYWKFiAhLqSymZsSWJwe/e/LsF6bFfisqFw= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json hash2 - E/7n06UUQIxz7Bkm2stxRet0YW5fO/ZBPTzdDtTgKrQ= + s7wRxIkfcWnQw1jCFrtr8hXFiK7atp9hr7ZiFk+ScDs= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + OXsFDkfWFhzN0IAaF4qXZjPWZYuJfnbjQheRjEZW2zM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc hash2 - 4Vrv9xfds4FwI/1nDrreY1HfYl1r31bJkIMvsfoEf54= + 0DLlMsH/LfZQEHFMASjz0T2DkSd63Uboie1M0O5WBmc= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + OXsFDkfWFhzN0IAaF4qXZjPWZYuJfnbjQheRjEZW2zM= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule hash2 - RzFPk/lsBdJedrAgG+Vzkgv6bq2WCg3BdPLGfDgwZtM= + EYv30S7uOq5oYA+vgzHwfGa8rS7Tgcd/7MZClAyVz+4= Modules/module.modulemap diff --git a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative index a32e468ca..717e15c29 100644 Binary files a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative and b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative differ diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-2d/Cargo.toml index 6e70eb561..e788323eb 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-2d/Cargo.toml @@ -11,15 +11,16 @@ gl = ["skia-safe/gl"] canvas-core = { path = "../canvas-core", features = ["2d"] } parking_lot = "0.12.1" regex = "1.10.2" -base64 = "0.21.0" +base64 = "0.21.5" encoding_rs = "0.8.32" gl-bindings = { path = "../gl-bindings" } lazy_static = "1.4.0" csscolorparser = { git = "https://github.com/triniwiz/csscolorparser-rs.git", rev = "c8c7e86", features = ["named-colors"] } -rgb = { version = "0.8.32", features = ["argb"] } +rgb = { version = "0.8.37", features = ["argb"] } log = "0.4.8" once_cell = "1.8.0" -skia-bindings = { version = "0.66.3", features = ["gl", "svg"] } -skia-safe = { version = "0.66.3", features = ["gl", "svg"] } -image = {version = "0.24.7" , features = ["png", "jpeg", "gif"]} -bytes = "1.5.0" \ No newline at end of file +skia-bindings = { version = "0.69.0", features = ["gl", "svg", "textlayout"] } +skia-safe = { version = "0.69.0", features = ["gl", "svg", "textlayout"] } +image = { version = "0.24.7", features = ["png", "jpeg", "gif"] } +bytes = "1.5.0" +env_logger = "0.10.1" \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_images/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_images/mod.rs index 38cbf00db..ada2c7c00 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_images/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_images/mod.rs @@ -107,13 +107,13 @@ impl Context { self.state .paint .image_smoothing_quality_set(self.state.image_filter_quality()); - let paint = self.state.paint.image_paint().clone(); + let paint = self.state.paint.image_paint(); self.surface.canvas().draw_image_rect_with_sampling_options( image, Some((&src_rect, SrcRectConstraint::Strict)), dst_rect, self.state.image_smoothing_quality, - &paint, + paint, ); } @@ -122,13 +122,13 @@ impl Context { self.state .paint .image_smoothing_quality_set(self.state.image_filter_quality()); - let paint = self.state.paint.image_paint().clone(); + let paint = self.state.paint.image_paint(); self.surface.canvas().draw_image_rect_with_sampling_options( image, None, dst_rect, self.state.image_smoothing_quality, - &paint, + paint, ); } @@ -136,7 +136,7 @@ impl Context { self.state .paint .image_smoothing_quality_set(self.state.image_filter_quality()); - let paint = self.state.paint.image_paint().clone(); + let paint = self.state.paint.image_paint(); self.surface.canvas().draw_image_with_sampling_options( image, (x, y), diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/global_fonts.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/global_fonts.rs new file mode 100644 index 000000000..9a50a0b7e --- /dev/null +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/global_fonts.rs @@ -0,0 +1,181 @@ +use std::collections::HashMap; + +use once_cell::sync::Lazy; +use parking_lot::Mutex; +use skia_safe::{FontArguments, FontMgr, Typeface}; +use skia_safe::font_arguments::variation_position::Coordinate; +use skia_safe::font_arguments::VariationPosition; +use skia_safe::font_style::Slant; +use skia_safe::textlayout::{FontCollection, TextStyle, TypefaceFontProvider}; + +#[derive(PartialEq, Eq, Hash)] +struct CollectionKey { + families: String, + weight: i32, + slant: Slant, +} + +impl CollectionKey { + pub fn new(style: &TextStyle) -> Self { + let families = style.font_families(); + let families = families.iter().collect::>().join(", "); + let weight = *style.font_style().weight(); + let slant = style.font_style().slant(); + CollectionKey { + families, + weight, + slant, + } + } +} + +// +// Font collection management +// + +pub static FONT_LIBRARY: Lazy> = Lazy::new(|| FontLibrary::shared()); + +pub struct FontLibrary { + pub fonts: Vec<(Typeface, Option)>, + pub collection: FontCollection, + collection_cache: HashMap, +} + +unsafe impl Send for FontLibrary { + // famous last words: this ‘should’ be safe in practice because the singleton is behind a mutex +} + +impl FontLibrary { + pub fn shared() -> Mutex { + let fonts = vec![]; + let collection_cache = HashMap::new(); + let mut collection = FontCollection::new(); + collection.set_default_font_manager(FontMgr::new(), None); + Mutex::new(FontLibrary { + collection, + collection_cache, + fonts, + }) + } + + fn add_typeface(&mut self, font: Typeface, alias: Option) { + // replace any previously added font with the same metadata/alias + if let Some(idx) = self.fonts.iter().position(|(old_font, old_alias)| + match alias.is_some(){ + true => old_alias == &alias, + false => old_font.family_name() == font.family_name() + } && old_font.font_style() == font.font_style() + ){ + self.fonts.remove(idx); + } + self.fonts.push((font, alias)); + + let mut assets = TypefaceFontProvider::new(); + for (font, alias) in &self.fonts { + assets.register_typeface(font.clone(), alias.as_ref()); + } + + let mut collection = FontCollection::new(); + collection.set_default_font_manager(FontMgr::new(), None); + collection.set_asset_font_manager(Some(assets.into())); + self.collection = collection; + self.collection_cache.drain(); + } + + pub fn collect_fonts(&mut self, style: &TextStyle) -> FontCollection { + let families = style.font_families(); + let families: Vec<&str> = families.iter().collect(); + let matches = self + .collection + .find_typefaces(&families, style.font_style()); + + // if the matched typeface is a variable font, create an instance that matches + // the current weight settings and return early with a new FontCollection that + // contains just that single font instance + if let Some(font) = matches.first() { + if let Some(params) = font.variation_design_parameters() { + // memoize the generation of single-weight FontCollections for variable fonts + let key = CollectionKey::new(style); + if let Some(collection) = self.collection_cache.get(&key) { + return collection.clone(); + } + + // reconnect to the user-specified family name (if provided) + let alias = self.fonts.iter().find_map(|(face, alias)| { + if Typeface::equal(font, face) { + alias.clone() + } else { + None + } + }); + + for param in params { + let chars = vec![param.tag.a(), param.tag.b(), param.tag.c(), param.tag.d()]; + let tag = String::from_utf8(chars).unwrap(); + if tag == "wght" { + // NB: currently setting the value to *one less* than what was requested + // to work around weird Skia behavior that returns something nonlinearly + // weighted in many cases (but not for ±1 of that value). This makes it so + // that n × 100 values will render correctly (and the bug will manifest at + // n × 100 + 1 instead) + let weight = *style.font_style().weight() - 1; + let value = (weight as f32).max(param.min).min(param.max); + let coords = [Coordinate { + axis: param.tag, + value, + }]; + let v_pos = VariationPosition { + coordinates: &coords, + }; + let args = FontArguments::new().set_variation_design_position(v_pos); + let face = font.clone_with_arguments(&args).unwrap(); + + let mut dynamic = TypefaceFontProvider::new(); + dynamic.register_typeface(face, alias); + + let mut collection = FontCollection::new(); + collection.set_default_font_manager(FontMgr::new(), None); + collection.set_asset_font_manager(Some(dynamic.into())); + self.collection_cache.insert(key, collection.clone()); + return collection; + } + } + } + } + + // if the matched font wasn't variable, then just return the standard collection + self.collection.clone() + } + + pub fn add_family(alias: Option<&str>, filenames: &[&str]) -> Result<(), String> { + for filename in filenames.iter() { + let path = std::path::Path::new(&filename); + let typeface = match std::fs::read(path) { + Err(why) => return Err(format!("{}: \"{}\"", why, path.display())), + Ok(bytes) => Typeface::from_data(skia_safe::Data::new_copy(&bytes), None), + }; + + match typeface { + Some(font) => { + // register the typeface + let mut library = FONT_LIBRARY.lock(); + let alias = alias.map(|v| v.to_owned()); + library.add_typeface(font, alias); + } + None => return Err(format!("Could not decode font data in {}", path.display())), + } + } + + Ok(()) + } + + pub fn reset(){ + let mut library = FONT_LIBRARY.lock(); + library.fonts.clear(); + + let mut collection = FontCollection::new(); + collection.set_default_font_manager(FontMgr::new(), None); + library.collection = collection; + library.collection_cache.drain(); + } +} diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/mod.rs index a3cde6c96..ab1321b21 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/mod.rs @@ -1,143 +1,326 @@ -use skia_safe::{Point, Size}; +use std::ops::Range; use std::os::raw::c_float; +use skia_safe::{Canvas, Paint}; + +use crate::context::Context; +use crate::context::drawing_text::global_fonts::FONT_LIBRARY; use crate::context::drawing_text::text_metrics::TextMetrics; -use crate::context::drawing_text::typography::{get_font_baseline, to_real_text_align}; use crate::context::text_styles::text_align::TextAlign; -use crate::context::Context; -use crate::utils::geometry::inflate_stroke_rect; +use crate::context::text_styles::text_baseline::TextBaseLine; +use crate::context::text_styles::text_direction::TextDirection; +pub(crate) const MAX_TEXT_WIDTH: f32 = 100_000.0; + +pub mod global_fonts; pub mod text_metrics; pub(crate) mod typography; +const HANGING_AS_PERCENT_OF_ASCENT: f32 = 80.; + impl Context { - pub fn fill_text(&mut self, text: &str, x: c_float, y: c_float, width: c_float) { - self.draw_text(true, text, x, y, width); - } + pub fn fill_text(&mut self, text: &str, x: c_float, y: c_float, width: Option) { + let width = width.unwrap_or(MAX_TEXT_WIDTH); + let paint = self.state.paint.fill_paint().clone(); + let shadow_paint = self.state.paint.fill_shadow_paint( + (0., 0.).into(), + self.state.shadow_color, + self.state.shadow_blur, + ); - pub fn stroke_text(&mut self, text: &str, x: c_float, y: c_float, width: c_float) { - self.draw_text(false, text, x, y, width); - } + let text = text.replace('\n', " "); - fn draw_text(&mut self, is_fill: bool, text: &str, x: c_float, y: c_float, width: c_float) { - if x.is_infinite() || y.is_infinite() { - return; + if let Some(shadow_paint) = shadow_paint { + self.surface.canvas().save(); + Context::apply_shadow_offset_matrix( + self.surface.canvas(), + self.state.shadow_offset.x, + self.state.shadow_offset.y, + ); + self.draw_text(text.as_str(), x, y, width, None, &shadow_paint); + self.surface.canvas().restore(); } - if width > 0.0 && width.is_infinite() { - return; - } - let shadow_paint; - let paint; - - if is_fill { - paint = self.state.paint.fill_paint(); - shadow_paint = self.state.paint.fill_shadow_paint( - self.state.shadow_offset, - self.state.shadow_color, - self.state.shadow_blur, - ); - } else { - paint = self.state.paint.stroke_paint(); - shadow_paint = self.state.paint.stroke_shadow_paint( - self.state.shadow_offset, - self.state.shadow_color, - self.state.shadow_blur, + self.draw_text(text.as_str(), x, y, width, None, &paint); + } + + pub fn stroke_text(&mut self, text: &str, x: c_float, y: c_float, width: Option) { + let width = width.unwrap_or(MAX_TEXT_WIDTH); + let paint = self.state.paint.stroke_paint().clone(); + let shadow_paint = self.state.paint.stroke_shadow_paint( + (0., 0.).into(), + self.state.shadow_color, + self.state.shadow_blur, + ); + + let text = text.replace('\n', " "); + + if let Some(shadow_paint) = shadow_paint { + self.surface.canvas().save(); + Context::apply_shadow_offset_matrix( + self.surface.canvas(), + self.state.shadow_offset.x, + self.state.shadow_offset.y, ); + self.draw_text(text.as_str(), x, y, width, None, &shadow_paint); + self.surface.canvas().restore(); + } + + self.draw_text(text.as_str(), x, y, width, None, &paint); + } + + fn apply_shadow_offset_matrix(canvas: &Canvas, shadow_offset_x: f32, shadow_offset_y: f32) { + let current_transform = canvas.local_to_device_as_3x3(); + if let Some(invert) = canvas.local_to_device_as_3x3().invert() { + canvas.concat(&invert); + let mut shadow_offset = current_transform.clone(); + shadow_offset.pre_translate(skia_safe::Vector::new(shadow_offset_x, shadow_offset_y)); + canvas.concat(&shadow_offset); + canvas.concat(¤t_transform); } - let font = &self.state.font; - - let measurement = font.to_skia().measure_str(text, Some(paint)); - let font_width = measurement.0; - let max_width = width; - let width: f32; - let use_max_width = max_width > 0.0 && max_width < font_width; - if use_max_width { - width = max_width - } else { - width = font_width; + } + + fn draw_text( + &mut self, + text: &str, + x: c_float, + y: c_float, + max_width: c_float, + metrics: Option<&mut TextMetrics>, + paint: &Paint, + ) { + let font_collection = &FONT_LIBRARY.lock().collection; + let weight = skia_safe::font_style::Weight::from(self.state.font_style.weight as i32); + let stretch = self.state.font_style.stretch; + let slant = self.state.font_style.style; + let font_style = skia_safe::FontStyle::new(weight, stretch.into(), slant.into()); + let text_direction = self.state.direction; + let mut families = vec![]; + for family in self.state.font_style.family.split(',') { + families.push(family); } - let (line_spacing, metrics) = font.to_skia().metrics(); - let baseline = get_font_baseline(metrics, self.state.text_baseline); - let mut location: Point = (x, y + baseline).into(); + let mut text_style = skia_safe::textlayout::TextStyle::new(); + text_style.set_font_families(families.as_slice()); + text_style.set_font_size(self.state.font_style.size); + text_style.set_word_spacing(self.state.word_spacing); + text_style.set_letter_spacing(self.state.letter_spacing); + text_style.set_height(1.); + text_style.set_font_style(font_style); + text_style.set_foreground_paint(paint); + text_style.set_text_baseline(skia_safe::textlayout::TextBaseline::Alphabetic); - match to_real_text_align(self.state.text_align, self.state.direction) { - TextAlign::RIGHT => { - location.x = location.x - width; + let mut paragraph_style = skia_safe::textlayout::ParagraphStyle::new(); + paragraph_style.set_text_style(&text_style); + match text_direction { + TextDirection::LTR => { + paragraph_style.set_text_direction(skia_safe::textlayout::TextDirection::LTR); } - TextAlign::CENTER => { - location.x = location.x - (width / 2.0); - } - _ => { - // NOOP + TextDirection::RTL => { + paragraph_style.set_text_direction(skia_safe::textlayout::TextDirection::RTL); } } - let mut rect: (Point, Size) = ( - ( - location.x - metrics.cap_height / 2.0, - location.y - metrics.ascent - metrics.leading, - ) - .into(), - (width + metrics.cap_height, line_spacing).into(), + + let mut builder = + skia_safe::textlayout::ParagraphBuilder::new(¶graph_style, font_collection); + builder.peek_style(); + builder.add_text(text); + + let mut paragraph = builder.build(); + + paragraph.layout(100000.); + + let metrics_vec = paragraph.get_line_metrics(); + + if metrics_vec.is_empty() { + return; + } + let line_metrics = &metrics_vec[0]; + + let font = paragraph.get_font_at(0); + let (_, font_metrics) = font.metrics(); + if font_metrics.has_bounds() { } + let glyphs = font.str_to_glyphs_vec(text); + let glyphs_size = glyphs.len(); + if glyphs_size == 0 { return; } + let mut bounds = vec![skia_safe::Rect::default(); glyphs_size]; + font.get_bounds(glyphs.as_slice(), bounds.as_mut_slice(), None); + let range: Range = 0_usize..glyphs_size; + let text_box = paragraph.get_rects_for_range( + range, + skia_safe::textlayout::RectHeightStyle::Tight, + skia_safe::textlayout::RectWidthStyle::Tight, ); + // line_metrics.width doesn't contain the suffix spaces + // run.calculateWidth will return 0 if font is rendering as fallback - if !is_fill { - inflate_stroke_rect(&mut rect, paint); + let mut line_width = 0.0; + for tbox in text_box.iter() { + line_width += tbox.rect.width(); } - if use_max_width { - self.surface.canvas().save(); - self.surface - .canvas() - .translate(Point::new(location.x, location.y)); - let mut scale_x: f32 = 0.0; - if font_width > 0.0 { - scale_x = width / font_width; + if line_width == 0. { return; } + + + let first_char_bounds = bounds[0]; + let mut descent = first_char_bounds.bottom; + let mut ascent = first_char_bounds.top; + let last_char_bounds = bounds[glyphs_size - 1]; + let last_char_pos_x = last_char_bounds.x(); + + let until = glyphs_size - 1; + for i in 1..=until { + let char_bounds = bounds[i]; + let char_bottom = char_bounds.bottom; + if char_bottom > descent { + descent = char_bottom; } + let char_top = char_bounds.top; + if char_top < ascent { + ascent = char_top; + } + } + let alphabetic_baseline = paragraph.alphabetic_baseline(); + + let css_baseline = self.state.text_baseline; + let mut baseline_offset = 0.; - // We draw when font_width is 0 so compositing operations (eg, a "copy" op) still work. - self.surface.canvas().scale((scale_x, 1.0)); + match css_baseline { + TextBaseLine::TOP => { + baseline_offset = -alphabetic_baseline + - font_metrics.ascent + - font_metrics.underline_position().unwrap_or_default() + - font_metrics.underline_thickness().unwrap_or_default(); + } + TextBaseLine::HANGING => { + // https://github.com/chromium/chromium/blob/104.0.5092.1/third_party/blink/renderer/core/html/canvas/text_metrics.cc#L21-L25 + // According to + // http://wiki.apache.org/xmlgraphics-fop/LineLayout/AlignmentHandling + // "FOP (Formatting Objects Processor) puts the hanging baseline at 80% of + // the ascender height" + baseline_offset = -alphabetic_baseline + - font_metrics.ascent * HANGING_AS_PERCENT_OF_ASCENT / 100.0; + } + TextBaseLine::MIDDLE => { + baseline_offset = -paragraph.height() / 2.; + } + TextBaseLine::ALPHABETIC => { + baseline_offset = -alphabetic_baseline; + } + TextBaseLine::IDEOGRAPHIC => { + baseline_offset = -paragraph.ideographic_baseline(); + } + TextBaseLine::BOTTOM => { + baseline_offset = -alphabetic_baseline + + font_metrics.strikeout_position().unwrap_or_default() + + font_metrics.strikeout_thickness().unwrap_or_default(); + } } - let font = font.to_skia(); - if let Some(shadow_paint) = shadow_paint { - self.surface - .canvas() - .draw_str(text, (location.x, location.y), &font, &shadow_paint); + let line_center = line_width / 2.; + let paint_x; + let mut offset_x = 0.0; + + match self.state.text_align { + TextAlign::START => { + if text_direction == TextDirection::LTR { + paint_x = x; + } else { + paint_x = x - line_width; + offset_x = line_width; + } + } + TextAlign::LEFT => { + paint_x = x; + } + TextAlign::CENTER => { + paint_x = x - line_center; + offset_x = line_center; + } + TextAlign::RIGHT => { + paint_x = x - line_width; + offset_x = line_width; + } + TextAlign::END => { + if text_direction == TextDirection::RTL { + paint_x = x; + } else { + paint_x = x - line_width; + offset_x = line_width; + } + } } - self.surface - .canvas() - .draw_str(text, (location.x, location.y), &font, paint); + match metrics { + None => { + let need_scale = line_width > max_width; + let ratio = if need_scale { + max_width / line_width + } else { + 1.0 + }; + if need_scale { + self.surface.canvas().save(); + self.surface.canvas().scale((ratio, 1.0)); + } + let paint_y = y + baseline_offset; - if use_max_width { - self.surface.canvas().restore(); + text_style.set_foreground_paint(paint); + + paragraph.paint( + self.surface.canvas(), + ( + if need_scale { + (paint_x + (1. - ratio) * offset_x) / ratio + } else { + paint_x + }, + paint_y, + ), + ); + if need_scale { + self.surface.canvas().restore(); + } + } + Some(text_metrics) => { + let offset = -baseline_offset - alphabetic_baseline; + text_metrics.actual_bounding_box_ascent = -ascent + offset; + text_metrics.actual_bounding_box_descent = descent - offset; + text_metrics.actual_bounding_box_left = + -paint_x + line_metrics.left as f32 - first_char_bounds.left; + text_metrics.actual_bounding_box_right = + paint_x + last_char_pos_x + last_char_bounds.right; + text_metrics.width = line_width; + text_metrics.font_bounding_box_ascent = -font_metrics.ascent + offset; + text_metrics.font_bounding_box_descent = font_metrics.descent - offset; + text_metrics.alphabetic_baseline = -font_metrics.ascent + offset; + } } } - pub fn measure_text(&self, text: &str) -> TextMetrics { - let (width, bounds) = self - .state - .font - .to_skia() - .measure_str(text, Some(self.state.paint.fill_paint())); - let (_, metrics) = self.state.font.to_skia().metrics(); - let ascent = metrics.ascent; - let descent = metrics.descent; - let baseline_y = get_font_baseline(metrics, self.state.text_baseline); - TextMetrics { - width, - actual_bounding_box_left: -bounds.x(), - actual_bounding_box_right: bounds.right(), - font_bounding_box_ascent: (ascent - baseline_y), - font_bounding_box_descent: (descent + baseline_y), - actual_bounding_box_ascent: (-bounds.y() - baseline_y), - actual_bounding_box_descent: (bounds.bottom() + baseline_y), + pub fn measure_text(&mut self, text: &str) -> TextMetrics { + let mut text_metrics = TextMetrics { + width: 0.0, + actual_bounding_box_left: 0.0, + actual_bounding_box_right: 0.0, + font_bounding_box_ascent: 0.0, + font_bounding_box_descent: 0.0, + actual_bounding_box_ascent: 0.0, + actual_bounding_box_descent: 0.0, em_height_ascent: 0.0, em_height_descent: 0.0, - hanging_baseline: (-0.8 * ascent + baseline_y), - alphabetic_baseline: baseline_y, - ideographic_baseline: (descent + baseline_y), + hanging_baseline: 0.0, + alphabetic_baseline: 0.0, + ideographic_baseline: 0.0, + }; + + if text.is_empty() { + return text_metrics; } + + let paint = self.state.paint.fill_paint().clone(); + + self.draw_text(text, 0., 0., -1., Some(&mut text_metrics), &paint); + + text_metrics } } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography.rs index cecc33ca6..6a9ace2c0 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography.rs @@ -1,347 +1,605 @@ -#![allow(dead_code)] - -use std::collections::VecDeque; - -use skia_safe::{ - font_style::{Slant, Weight, Width}, - typeface::Typeface, - FontMetrics, FontMgr, FontStyle, -}; - -use crate::context::{ - text_styles::text_align::TextAlign, text_styles::text_baseline::TextBaseLine, - text_styles::text_direction::TextDirection, Device, -}; -use crate::utils::dimensions::parse_size; - -const XX_SMALL: &str = "9px"; -const X_SMALL: &str = "10px"; -const SMALL: &str = "13px"; -const MEDIUM: &str = "16px"; -const LARGE: &str = "18px"; -const X_LARGE: &str = "24px"; -const XX_LARGE: &str = "32px"; - -pub(crate) fn get_font_baseline(metrics: FontMetrics, baseline: TextBaseLine) -> f32 { - match baseline { - TextBaseLine::TOP => metrics.ascent, - TextBaseLine::HANGING => { - // According to http://wiki.apache.org/xmlgraphics-fop/LineLayout/AlignmentHandling - // "FOP (Formatting Objects Processor) puts the hanging baseline at 80% of the ascender height" - (metrics.ascent * 4.0) / 5.0 - } - TextBaseLine::MIDDLE => -metrics.descent + metrics.cap_height / 2.0, - TextBaseLine::IDEOGRAPHIC | TextBaseLine::BOTTOM => -metrics.descent, - TextBaseLine::ALPHABETIC => 0.0, - } +use std::panic::panic_any; +use std::str::FromStr; + +use once_cell::sync::OnceCell; +use regex::Regex; +use skia_bindings::SkFontStyle_Slant; +use skia_safe::font_style::Width; + +pub(crate) static FONT_REGEXP: OnceCell = OnceCell::new(); + +const DEFAULT_FONT: &str = "sans-serif"; + +/// The minimum font-weight value per: +/// +/// https://drafts.csswg.org/css-fonts-4/#font-weight-numeric-values +pub const MIN_FONT_WEIGHT: f32 = 1.; + +/// The maximum font-weight value per: +/// +/// https://drafts.csswg.org/css-fonts-4/#font-weight-numeric-values +pub const MAX_FONT_WEIGHT: f32 = 1000.; + +/// The default font size. +pub const FONT_MEDIUM_PX: f32 = 16.0; + +#[derive(Debug, Clone, PartialEq)] +pub struct Font { + pub size: f32, + pub style: FontStyle, + pub family: String, + pub variant: FontVariant, + pub stretch: FontStretch, + pub weight: u32, } -pub(crate) fn to_text_align(align: &str) -> Option { - match align { - "start" => Some(TextAlign::START), - "left" => Some(TextAlign::LEFT), - "center" => Some(TextAlign::CENTER), - "end" => Some(TextAlign::END), - "right" => Some(TextAlign::RIGHT), - _ => None, +impl Default for Font { + fn default() -> Self { + Font { + size: 10.0, + style: FontStyle::Normal, + family: DEFAULT_FONT.to_owned(), + variant: FontVariant::Normal, + stretch: FontStretch::Normal, + weight: 400, + } } } -pub(crate) fn to_real_text_align(align: TextAlign, direction: TextDirection) -> TextAlign { - match align { - TextAlign::START => { - if direction == TextDirection::RTL { - TextAlign::RIGHT +/* +#[error("[`{0}`] is not valid font style")] + InvalidFontStyle(String), + #[error("[`{0}`] is not valid font variant")] +*/ +impl Font { + pub fn new(font_rules: &str) -> Result { + let font_regexp = FONT_REGEXP.get_or_init(init_font_regexp); + let default_font = Font::default(); + if let Some(cap) = font_regexp.captures(font_rules) { + let size_str = cap.get(7).or_else(|| cap.get(5)).unwrap().as_str(); + let size = if size_str.ends_with('%') { + size_str + .parse::() + .map(|v| v / 100.0 * FONT_MEDIUM_PX) + .ok() } else { - TextAlign::LEFT - } - } - TextAlign::END => { - if direction == TextDirection::RTL { - TextAlign::LEFT + size_str.parse::().ok() + }; + let family = cap.get(9).map(|c| c.as_str()).unwrap_or(DEFAULT_FONT); + // return if no valid size + if let Some(size) = size { + let style = cap + .get(2) + .and_then(|m| FontStyle::from_str(m.as_str()).ok()) + .unwrap_or(default_font.style); + let variant = cap + .get(3) + .and_then(|m| FontVariant::from_str(m.as_str()).ok()) + .unwrap_or(default_font.variant); + let weight = cap + .get(4) + .and_then(|m| parse_font_weight(m.as_str())) + .unwrap_or(default_font.weight); + // treat stretch as size + // the `20%` of '20% Arial' is treated as `stretch` but it's size actually + let stretch = if cap.get(6).is_none() { + default_font.stretch + } else { + cap.get(5) + .and_then(|m| parse_font_stretch(m.as_str())) + .unwrap_or(default_font.stretch) + }; + let size_px = parse_size_px(size, cap.get(8).map(|m| m.as_str()).unwrap_or("px")); + Ok(Font { + style, + variant, + weight, + size: size_px, + stretch, + family: family + .split(',') + .map(|string| string.trim()) + .map(|s| { + if s.starts_with('"') || s.starts_with('\'') { + unsafe { s.get_unchecked(1..s.len() - 1) } + } else { + s + } + }) + .collect::>() + .join(","), + }) } else { - TextAlign::RIGHT + Err(format!( + "[`{0}`] is not valid font style", + font_rules.to_owned() + )) } + } else { + Err(format!( + "[`{0}`] is not valid font style", + font_rules.to_owned() + )) } - TextAlign::RIGHT | TextAlign::CENTER | TextAlign::LEFT => align, } } -#[derive(Debug, Clone)] -pub struct Font { - pub(crate) font_details: String, - pub(crate) font: ParsedFont, - pub(crate) device: Device, +// [ [ <'font-style'> || || <'font-weight'> || <'font-stretch'> ]? <'font-size'> [ / <'line-height'> ]? <'font-family'> ] | caption | icon | menu | message-box | small-caption | status-barwhere = [ normal | small-caps ] +pub(crate) fn init_font_regexp() -> Regex { + Regex::new( + r#"(?x) + ( + (italic|oblique|normal){0,1}\s+ | # style + (small-caps|normal){0,1}\s+ | # variant + (bold|bolder|lighter|[1-9]00|normal){0,1}\s+ | # weight + (ultra-condensed|extra-condensed|condensed|semi-condensed|semi-expanded|expanded|extra-expanded|ultra-expanded|[\d\.]+%){0,1}\s+ # stretch + ){0,4} + ( + ([\d\.]+) # size + (%|px|pt|pc|in|cm|mm|%|em|ex|ch|rem|q)?\s* # unit + ) + # line-height is ignored here, as per the spec + # Borrowed from https://github.com/Automattic/node-canvas/blob/master/lib/parse-font.js#L21 + ((?:'([^']+)'|"([^"]+)"|[\w\s-]+)(\s*,\s*(?:'([^']+)'|"([^"]+)"|[\w\s-]+))*)? # family + "#, + ) + .unwrap() } -impl Font { - pub fn new(font_details: &str, device: Device) -> Self { - Self { - font_details: font_details.to_string(), - font: parse_font(font_details), - device, - } - } +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum FontStyle { + Normal, + Italic, + Oblique, +} - pub fn get_font_details(&self) -> &str { - self.font_details.as_ref() +impl FontStyle { + pub fn as_str(&self) -> &str { + match *self { + Self::Italic => "italic", + Self::Normal => "normal", + Self::Oblique => "oblique", + } } +} - pub fn get_font(&self) -> &ParsedFont { - &self.font - } +impl FromStr for FontStyle { + type Err = String; - pub fn set_font(&mut self, font_details: &str) { - if font_details.is_empty() { - return; + fn from_str(s: &str) -> Result { + match s { + "normal" => Ok(Self::Normal), + "italic" => Ok(Self::Italic), + "oblique" => Ok(Self::Oblique), + _ => Err(format!("[`{0}`] is not valid font style", s.to_owned())), } - - self.font_details = font_details.to_string(); - self.font = parse_font(font_details); } +} - fn to_font(&self) -> skia_safe::Font { - let style = to_font_style(self.font.font_weight(), self.font.font_style()); - let families: Vec = parse_font_family(self.font.font_family()); - let mut default_typeface = - Typeface::from_name("sans-serif", style).unwrap_or(Typeface::default()); - let mgr = FontMgr::default(); - let families_count = mgr.count_families(); - for i in 0..families_count { - let name = mgr.family_name(i); - if families.contains(&name) { - if let Some(typeface) = mgr.match_family_style(&name, style) { - default_typeface = typeface; - break; - } - } +impl From for FontStyle { + fn from(value: skia_safe::font_style::Slant) -> Self { + match value { + skia_safe::font_style::Slant::Upright => Self::Normal, + skia_safe::font_style::Slant::Italic => Self::Italic, + skia_safe::font_style::Slant::Oblique => Self::Oblique, } - - skia_safe::Font::from_typeface( - default_typeface, - Some(parse_size(self.font.font_size(), self.device)), - ) } +} - pub fn to_skia(&self) -> skia_safe::Font { - self.to_font() +impl Into for FontStyle { + fn into(self) -> skia_safe::font_style::Slant { + match self { + Self::Normal => skia_safe::font_style::Slant::Upright, + Self::Italic => skia_safe::font_style::Slant::Italic, + Self::Oblique => skia_safe::font_style::Slant::Oblique, + } } } -#[derive(Clone, Debug)] -pub struct ParsedFont { - font_style: ParsedFontStyle, - font_variant: String, - font_weight: ParsedFontWeight, - line_height: Option, - font_size: Option, - font_family: Option, +#[derive(Debug, Clone, PartialEq, Eq)] +pub enum FontVariant { + Normal, + SmallCaps, } -impl ParsedFont { - pub fn font_style(&self) -> ParsedFontStyle { - self.font_style - } - pub fn font_variant(&self) -> &str { - &self.font_variant - } - pub fn font_weight(&self) -> ParsedFontWeight { - self.font_weight - } - pub fn line_height(&self) -> &str { - self.line_height.as_ref().map_or("1.4px", |v| v) - } - pub fn font_size(&self) -> &str { - self.font_size.as_ref().map_or("10px", |v| v) - } - pub fn font_family(&self) -> &str { - self.font_family.as_ref().map_or("sans-serif", |v| v) - } -} +impl FromStr for FontVariant { + type Err = String; -impl Default for ParsedFont { - fn default() -> Self { - Self { - font_style: ParsedFontStyle::Normal, - font_variant: "normal".to_string(), - font_weight: ParsedFontWeight::Normal, - line_height: None, - font_size: None, - font_family: None, + fn from_str(s: &str) -> Result { + match s { + "normal" => Ok(Self::Normal), + "small-caps" => Ok(Self::SmallCaps), + _ => Err(format!("[`{0}`] is not valid font variant", s.to_owned())), } } } -const NORMAL: &str = "normal"; -const ITALIC: &str = "italic"; -const OBLIQUE: &str = "oblique"; - -#[derive(Copy, Clone, Debug)] -pub enum ParsedFontStyle { - Normal, - Italic, - Oblique, +#[repr(i32)] +#[derive(Debug, Clone, Copy, PartialEq, Eq)] +pub enum FontStretch { + UltraCondensed = 1, + ExtraCondensed = 2, + Condensed = 3, + SemiCondensed = 4, + Normal = 5, + SemiExpanded = 6, + Expanded = 7, + ExtraExpanded = 8, + UltraExpanded = 9, } -impl ParsedFontStyle { - pub fn value(&self) -> &str { - match self { - ParsedFontStyle::Normal => NORMAL, - ParsedFontStyle::Italic => ITALIC, - ParsedFontStyle::Oblique => OBLIQUE, +impl From for FontStretch { + fn from(value: i32) -> Self { + match value { + 1 => FontStretch::UltraCondensed, + 2 => FontStretch::ExtraCondensed, + 3 => FontStretch::Condensed, + 4 => FontStretch::SemiCondensed, + 5 => FontStretch::Normal, + 6 => FontStretch::SemiExpanded, + 7 => FontStretch::Expanded, + 8 => FontStretch::ExtraExpanded, + 9 => FontStretch::UltraExpanded, + _ => unreachable!(), } } +} - pub fn is_supported(value: &str) -> bool { - NORMAL == value || ITALIC == value || OBLIQUE == value - } - - pub fn into_skia(&self) -> Slant { - match self { - ParsedFontStyle::Italic => Slant::Italic, - ParsedFontStyle::Oblique => Slant::Oblique, - _ => Slant::Upright, +impl FontStretch { + pub fn as_str(&self) -> &str { + match *self { + FontStretch::UltraCondensed => "ultra-condensed", + FontStretch::ExtraCondensed => "extra-condensed", + FontStretch::Condensed => "condensed", + FontStretch::SemiCondensed => "semi-condensed", + FontStretch::Normal => "normal", + FontStretch::SemiExpanded => "semi-expanded", + FontStretch::Expanded => "expanded", + FontStretch::ExtraExpanded => "extra-expanded", + FontStretch::UltraExpanded => "ultra-expanded", } } } -#[repr(u32)] -#[derive(Copy, Clone, Debug)] -pub enum ParsedFontWeight { - Thin = 100, - ExtraLight = 200, - Light = 300, - Normal = 400, - Medium = 500, - SemiBold = 600, - Bold = 700, - ExtraBold = 800, - Black = 900, -} - -impl ParsedFontWeight { - pub fn is_supported(value: &str) -> bool { +impl From for FontStretch { + fn from(value: Width) -> Self { match value { - "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "lighter" - | "bold" | "bolder" | "normal" => true, - _ => false, + Width::ULTRA_CONDENSED => FontStretch::UltraCondensed, + Width::EXTRA_CONDENSED => FontStretch::ExtraCondensed, + Width::CONDENSED => FontStretch::Condensed, + Width::SEMI_CONDENSED => FontStretch::SemiCondensed, + Width::NORMAL => FontStretch::Normal, + Width::SEMI_EXPANDED => FontStretch::SemiExpanded, + Width::EXPANDED => FontStretch::Expanded, + Width::EXTRA_EXPANDED => FontStretch::ExtraExpanded, + Width::ULTRA_EXPANDED => FontStretch::UltraExpanded, + _ => panic!("Failed to convert Width"), } } +} - // todo parse relative values - pub fn parse(value: &str) -> Option { - match value { - "100" => Option::from(ParsedFontWeight::Thin), - "200" => Option::from(ParsedFontWeight::ExtraLight), - "300" => Option::from(ParsedFontWeight::Light), - "400" | "normal" => Option::from(ParsedFontWeight::Normal), - "500" => Option::from(ParsedFontWeight::Medium), - "600" => Option::from(ParsedFontWeight::SemiBold), - "700" | "bold" => Option::from(ParsedFontWeight::Bold), - "800" => Option::from(ParsedFontWeight::ExtraBold), - "900" => Option::from(ParsedFontWeight::Black), - _ => None, +impl Into for FontStretch { + fn into(self) -> Width { + match self { + FontStretch::UltraCondensed => Width::ULTRA_CONDENSED, + FontStretch::ExtraCondensed => Width::EXTRA_CONDENSED, + FontStretch::Condensed => Width::CONDENSED, + FontStretch::SemiCondensed => Width::SEMI_CONDENSED, + FontStretch::Normal => Width::NORMAL, + FontStretch::SemiExpanded => Width::SEMI_EXPANDED, + FontStretch::Expanded => Width::EXPANDED, + FontStretch::ExtraExpanded => Width::EXTRA_EXPANDED, + FontStretch::UltraExpanded => Width::ULTRA_EXPANDED, } } +} - pub fn into_skia(&self) -> Weight { - (*self).into() +// https://drafts.csswg.org/css-fonts-4/#propdef-font-weight +fn parse_font_weight(weight: &str) -> Option { + match weight { + "lighter" | "100" => Some(100), + "200" => Some(200), + "300" => Some(300), + "normal" | "400" => Some(400), + "500" => Some(500), + "600" => Some(600), + "bold" | "bolder" | "700" => Some(700), + _ => weight.parse::().ok().and_then(|w| { + if (MIN_FONT_WEIGHT..=MAX_FONT_WEIGHT).contains(&w) { + Some(w as u32) + } else { + None + } + }), } } -impl Into for ParsedFontWeight { - fn into(self) -> Weight { - Weight::from(*&self as i32) +fn parse_font_stretch(stretch: &str) -> Option { + match stretch { + "ultra-condensed" | "50%" => Some(FontStretch::UltraCondensed), + "extra-condensed" | "62.5%" => Some(FontStretch::ExtraCondensed), + "condensed" | "75%" => Some(FontStretch::Condensed), + "semi-condensed" | "87.5%" => Some(FontStretch::SemiCondensed), + "normal" | "100%" => Some(FontStretch::Normal), + "semi-expanded" | "112.5%" => Some(FontStretch::SemiExpanded), + "expanded" | "125%" => Some(FontStretch::Expanded), + "extra-expanded" | "150%" => Some(FontStretch::ExtraExpanded), + "ultra-expanded" | "200%" => Some(FontStretch::UltraExpanded), + _ => None, } } -pub fn parse_font(font: &str) -> ParsedFont { - let pat = regex::Regex::new(r"\s+").unwrap(); - let res = pat.split(font); - - let mut parsed_font = ParsedFont::default(); - - let mut res: VecDeque<_> = res.collect(); - - for _ in 0..res.len() { - if let Some(part) = res.pop_front() { - if part.eq("normal") { - } else if part.eq("small-caps") { - parsed_font.font_variant = part.into(); - } else if ParsedFontStyle::is_supported(part) { - match part { - NORMAL => { - parsed_font.font_style = ParsedFontStyle::Normal; - } - ITALIC => { - parsed_font.font_style = ParsedFontStyle::Italic; - } - OBLIQUE => { - parsed_font.font_style = ParsedFontStyle::Oblique; - } - _ => {} - } - } else if ParsedFontWeight::is_supported(part) { - parsed_font.font_weight = - ParsedFontWeight::parse(part).unwrap_or(ParsedFontWeight::Normal); - } else if parsed_font.font_size.is_none() { - let sizes = part.split('/'); - for (j, size) in sizes.enumerate() { - if j == 0 { - parsed_font.font_size = Some(size.into()); - } - - if j == 1 { - parsed_font.line_height = Some(size.into()); - } - } - } else { - parsed_font.font_family = Some(part.into()); - if !res.is_empty() { - let mut current = parsed_font.font_family.unwrap_or_default(); - for item in res.iter() { - current.push_str(&format!(" {}", *item)); - } - parsed_font.font_family = Some(current); - } - break; - } +pub fn parse_size_px(size: f32, unit: &str) -> f32 { + let mut size_px = size; + match unit { + "em" | "rem" | "pc" => { + size_px = size * FONT_MEDIUM_PX; } - } + "pt" => { + size_px = size * 4.0 / 3.0; + } + "px" => { + size_px = size; + } + "in" => { + size_px = size * 96.0; + } + "cm" => { + size_px = size * 96.0 / 2.54; + } + "mm" => { + size_px = size * 96.0 / 25.4; + } + "q" => { + size_px = size * 96.0 / 25.4 / 4.0; + } + "%" => { + size_px = size * FONT_MEDIUM_PX / 100.0; + } + _ => {} + }; + size_px +} - parsed_font +#[test] +fn font_stretch() { + assert_eq!( + parse_font_stretch("ultra-condensed"), + Some(FontStretch::UltraCondensed) + ); + assert_eq!(parse_font_stretch("50%"), Some(FontStretch::UltraCondensed)); + assert_eq!( + parse_font_stretch("extra-condensed"), + Some(FontStretch::ExtraCondensed) + ); + assert_eq!( + parse_font_stretch("62.5%"), + Some(FontStretch::ExtraCondensed) + ); + assert_eq!( + parse_font_stretch("condensed"), + Some(FontStretch::Condensed) + ); + assert_eq!(parse_font_stretch("75%"), Some(FontStretch::Condensed)); + assert_eq!( + parse_font_stretch("semi-condensed"), + Some(FontStretch::SemiCondensed) + ); + assert_eq!( + parse_font_stretch("87.5%"), + Some(FontStretch::SemiCondensed) + ); + assert_eq!(parse_font_stretch("normal"), Some(FontStretch::Normal)); + assert_eq!(parse_font_stretch("100%"), Some(FontStretch::Normal)); + assert_eq!( + parse_font_stretch("semi-expanded"), + Some(FontStretch::SemiExpanded) + ); + assert_eq!( + parse_font_stretch("112.5%"), + Some(FontStretch::SemiExpanded) + ); + assert_eq!(parse_font_stretch("expanded"), Some(FontStretch::Expanded)); + assert_eq!(parse_font_stretch("125%"), Some(FontStretch::Expanded)); + assert_eq!( + parse_font_stretch("extra-expanded"), + Some(FontStretch::ExtraExpanded) + ); + assert_eq!(parse_font_stretch("150%"), Some(FontStretch::ExtraExpanded)); + assert_eq!( + parse_font_stretch("ultra-expanded"), + Some(FontStretch::UltraExpanded) + ); + assert_eq!(parse_font_stretch("200%"), Some(FontStretch::UltraExpanded)); + assert_eq!(parse_font_stretch("52%"), None); + assert_eq!(parse_font_stretch("-50%"), None); + assert_eq!(parse_font_stretch("50"), None); + assert_eq!(parse_font_stretch("ultra"), None); } -fn parse_font_family(value: &str) -> Vec { - let mut result = Vec::new(); - if value.is_empty() { - return result; - } +#[test] +fn test_parse_font_weight() { + assert_eq!(parse_font_weight("lighter"), Some(100)); + assert_eq!(parse_font_weight("normal"), Some(400)); + assert_eq!(parse_font_weight("bold"), Some(700)); + assert_eq!(parse_font_weight("bolder"), Some(700)); + assert_eq!(parse_font_weight("100"), Some(100)); + assert_eq!(parse_font_weight("100.1"), Some(100)); + assert_eq!(parse_font_weight("120"), Some(120)); + assert_eq!(parse_font_weight("0.01"), None); + assert_eq!(parse_font_weight("-20"), None); + assert_eq!(parse_font_weight("whatever"), None); +} - let regex = regex::Regex::new(r#"/['"]+/g"#).unwrap(); +#[allow(clippy::float_cmp)] +#[test] +fn test_parse_size_px() { + assert_eq!(parse_size_px(12.0, "px"), 12.0f32); + assert_eq!(parse_size_px(2.0, "em"), 32.0f32); +} - let split = value.split(','); - for item in split { - let s = regex.replace(item.trim(), ""); - if !s.is_empty() { - result.push(s.to_string()); - } +#[test] +fn test_font_regexp() { + let reg = init_font_regexp(); + let caps = reg.captures("1.2em \"Fira Sans\""); + assert!(caps.is_some()); + let caps = caps.unwrap(); + for i in 1usize..=5usize { + assert_eq!(caps.get(i), None); } - - return result; + // size + assert_eq!(caps.get(7).map(|m| m.as_str()), Some("1.2")); + // unit + assert_eq!(caps.get(8).map(|m| m.as_str()), Some("em")); + // family + assert_eq!(caps.get(9).map(|m| m.as_str()), Some("\"Fira Sans\"")); } -fn is_size_length(value: &str) -> bool { - return value.contains("pc") - || value.contains("pt") - || value.contains("vh") - || value.contains("vw") - || value.contains("px") - || value.contains("em") - || value.contains("cm") - || value.contains("%"); +#[test] +fn test_font_regexp_order1() { + let reg = init_font_regexp(); + let caps = reg.captures("bold italic 50px Arial, sans-serif"); + assert!(caps.is_some()); + let caps = caps.unwrap(); + assert_eq!(caps.get(2).map(|m| m.as_str()), Some("italic")); // style + assert_eq!(caps.get(3), None); // variant + assert_eq!(caps.get(4).map(|m| m.as_str()), Some("bold")); // weight + assert_eq!(caps.get(5), None); // stretch + assert_eq!(caps.get(7).map(|m| m.as_str()), Some("50")); // size + assert_eq!(caps.get(8).map(|m| m.as_str()), Some("px")); // unit + assert_eq!(caps.get(9).map(|m| m.as_str()), Some("Arial, sans-serif")); // family } -fn to_font_style(weight: ParsedFontWeight, style: ParsedFontStyle) -> FontStyle { - FontStyle::new(weight.into_skia(), Width::NORMAL, style.into_skia()) +#[test] +fn test_font_new() { + let fixtures: Vec<(&'static str, Font)> = vec![ + ( + "20px Arial", + Font { + size: 20.0, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "20pt Arial", + Font { + size: 26.666_666, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "20.5pt Arial", + Font { + size: 27.333_334, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "50% Arial", + Font { + size: 8.0, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "62.5% 50% Arial", + Font { + size: 8.0, + family: "Arial".to_owned(), + stretch: FontStretch::ExtraCondensed, + ..Default::default() + }, + ), + ( + "20mm Arial", + Font { + size: 75.590_55, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "20px sans-serif", + Font { + size: 20.0, + family: "sans-serif".to_owned(), + ..Default::default() + }, + ), + ( + "20px monospace", + Font { + size: 20.0, + family: "monospace".to_owned(), + ..Default::default() + }, + ), + ( + "50px Arial, sans-serif", + Font { + size: 50.0, + family: "Arial,sans-serif".to_owned(), + ..Default::default() + }, + ), + ( + "bold italic 50px Arial, sans-serif", + Font { + size: 50.0, + weight: 700, + style: FontStyle::Italic, + family: "Arial,sans-serif".to_owned(), + ..Default::default() + }, + ), + ( + "50px Helvetica , Arial, sans-serif", + Font { + size: 50.0, + family: "Helvetica,Arial,sans-serif".to_owned(), + ..Default::default() + }, + ), + ( + "50px \"Helvetica Neue\", sans-serif", + Font { + size: 50.0, + family: "Helvetica Neue,sans-serif".to_owned(), + ..Default::default() + }, + ), + ( + "100px 'Microsoft YaHei'", + Font { + size: 100.0, + family: "Microsoft YaHei".to_owned(), + ..Default::default() + }, + ), + ( + "300 20px Arial", + Font { + size: 20.0, + weight: 300, + family: "Arial".to_owned(), + ..Default::default() + }, + ), + ( + "50px", + Font { + size: 50.0, + family: "sans-serif".to_owned(), + ..Default::default() + }, + ), + ]; + + for (rule, expect) in fixtures.into_iter() { + assert_eq!(Font::new(rule).unwrap(), expect); + } } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography_old.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography_old.rs new file mode 100644 index 000000000..cecc33ca6 --- /dev/null +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/typography_old.rs @@ -0,0 +1,347 @@ +#![allow(dead_code)] + +use std::collections::VecDeque; + +use skia_safe::{ + font_style::{Slant, Weight, Width}, + typeface::Typeface, + FontMetrics, FontMgr, FontStyle, +}; + +use crate::context::{ + text_styles::text_align::TextAlign, text_styles::text_baseline::TextBaseLine, + text_styles::text_direction::TextDirection, Device, +}; +use crate::utils::dimensions::parse_size; + +const XX_SMALL: &str = "9px"; +const X_SMALL: &str = "10px"; +const SMALL: &str = "13px"; +const MEDIUM: &str = "16px"; +const LARGE: &str = "18px"; +const X_LARGE: &str = "24px"; +const XX_LARGE: &str = "32px"; + +pub(crate) fn get_font_baseline(metrics: FontMetrics, baseline: TextBaseLine) -> f32 { + match baseline { + TextBaseLine::TOP => metrics.ascent, + TextBaseLine::HANGING => { + // According to http://wiki.apache.org/xmlgraphics-fop/LineLayout/AlignmentHandling + // "FOP (Formatting Objects Processor) puts the hanging baseline at 80% of the ascender height" + (metrics.ascent * 4.0) / 5.0 + } + TextBaseLine::MIDDLE => -metrics.descent + metrics.cap_height / 2.0, + TextBaseLine::IDEOGRAPHIC | TextBaseLine::BOTTOM => -metrics.descent, + TextBaseLine::ALPHABETIC => 0.0, + } +} + +pub(crate) fn to_text_align(align: &str) -> Option { + match align { + "start" => Some(TextAlign::START), + "left" => Some(TextAlign::LEFT), + "center" => Some(TextAlign::CENTER), + "end" => Some(TextAlign::END), + "right" => Some(TextAlign::RIGHT), + _ => None, + } +} + +pub(crate) fn to_real_text_align(align: TextAlign, direction: TextDirection) -> TextAlign { + match align { + TextAlign::START => { + if direction == TextDirection::RTL { + TextAlign::RIGHT + } else { + TextAlign::LEFT + } + } + TextAlign::END => { + if direction == TextDirection::RTL { + TextAlign::LEFT + } else { + TextAlign::RIGHT + } + } + TextAlign::RIGHT | TextAlign::CENTER | TextAlign::LEFT => align, + } +} + +#[derive(Debug, Clone)] +pub struct Font { + pub(crate) font_details: String, + pub(crate) font: ParsedFont, + pub(crate) device: Device, +} + +impl Font { + pub fn new(font_details: &str, device: Device) -> Self { + Self { + font_details: font_details.to_string(), + font: parse_font(font_details), + device, + } + } + + pub fn get_font_details(&self) -> &str { + self.font_details.as_ref() + } + + pub fn get_font(&self) -> &ParsedFont { + &self.font + } + + pub fn set_font(&mut self, font_details: &str) { + if font_details.is_empty() { + return; + } + + self.font_details = font_details.to_string(); + self.font = parse_font(font_details); + } + + fn to_font(&self) -> skia_safe::Font { + let style = to_font_style(self.font.font_weight(), self.font.font_style()); + let families: Vec = parse_font_family(self.font.font_family()); + let mut default_typeface = + Typeface::from_name("sans-serif", style).unwrap_or(Typeface::default()); + let mgr = FontMgr::default(); + let families_count = mgr.count_families(); + for i in 0..families_count { + let name = mgr.family_name(i); + if families.contains(&name) { + if let Some(typeface) = mgr.match_family_style(&name, style) { + default_typeface = typeface; + break; + } + } + } + + skia_safe::Font::from_typeface( + default_typeface, + Some(parse_size(self.font.font_size(), self.device)), + ) + } + + pub fn to_skia(&self) -> skia_safe::Font { + self.to_font() + } +} + +#[derive(Clone, Debug)] +pub struct ParsedFont { + font_style: ParsedFontStyle, + font_variant: String, + font_weight: ParsedFontWeight, + line_height: Option, + font_size: Option, + font_family: Option, +} + +impl ParsedFont { + pub fn font_style(&self) -> ParsedFontStyle { + self.font_style + } + pub fn font_variant(&self) -> &str { + &self.font_variant + } + pub fn font_weight(&self) -> ParsedFontWeight { + self.font_weight + } + pub fn line_height(&self) -> &str { + self.line_height.as_ref().map_or("1.4px", |v| v) + } + pub fn font_size(&self) -> &str { + self.font_size.as_ref().map_or("10px", |v| v) + } + pub fn font_family(&self) -> &str { + self.font_family.as_ref().map_or("sans-serif", |v| v) + } +} + +impl Default for ParsedFont { + fn default() -> Self { + Self { + font_style: ParsedFontStyle::Normal, + font_variant: "normal".to_string(), + font_weight: ParsedFontWeight::Normal, + line_height: None, + font_size: None, + font_family: None, + } + } +} + +const NORMAL: &str = "normal"; +const ITALIC: &str = "italic"; +const OBLIQUE: &str = "oblique"; + +#[derive(Copy, Clone, Debug)] +pub enum ParsedFontStyle { + Normal, + Italic, + Oblique, +} + +impl ParsedFontStyle { + pub fn value(&self) -> &str { + match self { + ParsedFontStyle::Normal => NORMAL, + ParsedFontStyle::Italic => ITALIC, + ParsedFontStyle::Oblique => OBLIQUE, + } + } + + pub fn is_supported(value: &str) -> bool { + NORMAL == value || ITALIC == value || OBLIQUE == value + } + + pub fn into_skia(&self) -> Slant { + match self { + ParsedFontStyle::Italic => Slant::Italic, + ParsedFontStyle::Oblique => Slant::Oblique, + _ => Slant::Upright, + } + } +} + +#[repr(u32)] +#[derive(Copy, Clone, Debug)] +pub enum ParsedFontWeight { + Thin = 100, + ExtraLight = 200, + Light = 300, + Normal = 400, + Medium = 500, + SemiBold = 600, + Bold = 700, + ExtraBold = 800, + Black = 900, +} + +impl ParsedFontWeight { + pub fn is_supported(value: &str) -> bool { + match value { + "100" | "200" | "300" | "400" | "500" | "600" | "700" | "800" | "900" | "lighter" + | "bold" | "bolder" | "normal" => true, + _ => false, + } + } + + // todo parse relative values + pub fn parse(value: &str) -> Option { + match value { + "100" => Option::from(ParsedFontWeight::Thin), + "200" => Option::from(ParsedFontWeight::ExtraLight), + "300" => Option::from(ParsedFontWeight::Light), + "400" | "normal" => Option::from(ParsedFontWeight::Normal), + "500" => Option::from(ParsedFontWeight::Medium), + "600" => Option::from(ParsedFontWeight::SemiBold), + "700" | "bold" => Option::from(ParsedFontWeight::Bold), + "800" => Option::from(ParsedFontWeight::ExtraBold), + "900" => Option::from(ParsedFontWeight::Black), + _ => None, + } + } + + pub fn into_skia(&self) -> Weight { + (*self).into() + } +} + +impl Into for ParsedFontWeight { + fn into(self) -> Weight { + Weight::from(*&self as i32) + } +} + +pub fn parse_font(font: &str) -> ParsedFont { + let pat = regex::Regex::new(r"\s+").unwrap(); + let res = pat.split(font); + + let mut parsed_font = ParsedFont::default(); + + let mut res: VecDeque<_> = res.collect(); + + for _ in 0..res.len() { + if let Some(part) = res.pop_front() { + if part.eq("normal") { + } else if part.eq("small-caps") { + parsed_font.font_variant = part.into(); + } else if ParsedFontStyle::is_supported(part) { + match part { + NORMAL => { + parsed_font.font_style = ParsedFontStyle::Normal; + } + ITALIC => { + parsed_font.font_style = ParsedFontStyle::Italic; + } + OBLIQUE => { + parsed_font.font_style = ParsedFontStyle::Oblique; + } + _ => {} + } + } else if ParsedFontWeight::is_supported(part) { + parsed_font.font_weight = + ParsedFontWeight::parse(part).unwrap_or(ParsedFontWeight::Normal); + } else if parsed_font.font_size.is_none() { + let sizes = part.split('/'); + for (j, size) in sizes.enumerate() { + if j == 0 { + parsed_font.font_size = Some(size.into()); + } + + if j == 1 { + parsed_font.line_height = Some(size.into()); + } + } + } else { + parsed_font.font_family = Some(part.into()); + if !res.is_empty() { + let mut current = parsed_font.font_family.unwrap_or_default(); + for item in res.iter() { + current.push_str(&format!(" {}", *item)); + } + parsed_font.font_family = Some(current); + } + break; + } + } + } + + parsed_font +} + +fn parse_font_family(value: &str) -> Vec { + let mut result = Vec::new(); + if value.is_empty() { + return result; + } + + let regex = regex::Regex::new(r#"/['"]+/g"#).unwrap(); + + let split = value.split(','); + for item in split { + let s = regex.replace(item.trim(), ""); + if !s.is_empty() { + result.push(s.to_string()); + } + } + + return result; +} + +fn is_size_length(value: &str) -> bool { + return value.contains("pc") + || value.contains("pt") + || value.contains("vh") + || value.contains("vw") + || value.contains("px") + || value.contains("em") + || value.contains("cm") + || value.contains("%"); +} + +fn to_font_style(weight: ParsedFontWeight, style: ParsedFontStyle) -> FontStyle { + FontStyle::new(weight.into_skia(), Width::NORMAL, style.into_skia()) +} diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/mod.rs index 5878bb79e..76c85b0c6 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/mod.rs @@ -1,12 +1,15 @@ +use parking_lot::{ + MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard, +}; use std::os::raw::c_float; use std::sync::Arc; -use parking_lot::{MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; +use log::log; -use skia_safe::gpu::BackendTexture; +use skia_safe::gpu::gl::TextureInfo; use skia_safe::{images, Color, Data, Image, Point, Surface}; +use crate::context::drawing_text::typography::Font; use compositing::composite_operation_type::CompositeOperationType; -use drawing_text::typography::Font; use fill_and_stroke_styles::paint::Paint; use filter_quality::FilterQuality; use image_smoothing::ImageSmoothingQuality; @@ -44,6 +47,27 @@ pub mod text_decoder; pub mod text_encoder; pub mod transformations; +const VERTEX_SHADER: &str = " + precision highp float; + attribute vec4 aPosition; + uniform mat4 uTextureMatrix; + varying vec2 TexCoord; + void main(){ + vec2 clipSpace = (1.0 - 2.0 * aPosition.xy); + TexCoord = aPosition.xy; + gl_Position = vec4(clipSpace, 0.0, 1.0); + } + "; + +const FRAGMENT_SHADER: &str = " + precision highp float; + varying vec2 TexCoord; + uniform sampler2D uSampler; + void main(){ + gl_FragColor = texture2D(uSampler, TexCoord); + } + "; + #[derive(Copy, Clone, Debug)] pub struct Device { pub width: c_float, @@ -73,7 +97,8 @@ impl Device { pub struct State { pub(crate) direction: TextDirection, pub(crate) paint: Paint, - pub(crate) font: Font, + pub(crate) font: String, + pub(crate) font_style: Font, pub(crate) text_align: TextAlign, pub(crate) text_baseline: TextBaseLine, pub(crate) shadow_color: Color, @@ -90,6 +115,12 @@ pub struct State { pub(crate) filter: String, pub(crate) global_alpha: f32, pub(crate) global_composite_operation: CompositeOperationType, + pub(crate) use_device_scale: bool, + pub(crate) did_use_device_scale: bool, + pub(crate) word_spacing_value: String, + pub(crate) word_spacing: f32, + pub(crate) letter_spacing_value: String, + pub(crate) letter_spacing: f32, } impl State { @@ -101,7 +132,7 @@ impl State { } } pub fn from_device(device: Device, direction: TextDirection) -> Self { - let font = Font::new("10px sans-serif", device); + let font = "10px sans-serif".to_owned(); let mut paint = Paint::default(); paint .stroke_paint_mut() @@ -111,6 +142,7 @@ impl State { direction, paint, font, + font_style: Font::default(), text_align: TextAlign::default(), text_baseline: TextBaseLine::default(), shadow_color: Color::TRANSPARENT, @@ -127,6 +159,12 @@ impl State { filter: "none".into(), global_alpha: 1.0, global_composite_operation: CompositeOperationType::default(), + use_device_scale: true, + did_use_device_scale: true, + word_spacing_value: "0px".to_string(), + word_spacing: 0., + letter_spacing_value: "0px".to_string(), + letter_spacing: 0. } } } @@ -243,13 +281,13 @@ impl Context { pub fn clear_canvas(&mut self) { self.surface.canvas().clear(Color::TRANSPARENT); if let Some(mut context) = self.surface.direct_context() { - context.flush(None); + context.flush_submit_and_sync_cpu(); } } pub fn flush(&mut self) { if let Some(mut context) = self.surface.direct_context() { - context.flush_and_submit(); + context.flush(None); } } @@ -259,32 +297,37 @@ impl Context { } } + pub fn reset(&mut self) { + if let Some(mut context) = self.surface.direct_context() { + context.reset(None); + } + } + pub fn snapshot_to_raster_data(&mut self) -> Vec { - self.flush(); let ss = self.surface.image_snapshot(); let info = ss.image_info(); let row_bytes = info.min_row_bytes(); - let size = info.height() as usize * row_bytes; - let mut buf = vec![0_u8; size]; + let mut buf = vec![0_u8; info.compute_byte_size(row_bytes)]; match ss.make_raster_image( &mut self.surface.direct_context(), - skia_safe::image::CachingHint::Allow, + skia_safe::image::CachingHint::Disallow, ) { Some(image) => { let mut info = skia_safe::ImageInfo::new( info.dimensions(), skia_safe::ColorType::RGBA8888, - ss.image_info().alpha_type(), - ss.image_info().color_space(), + skia_safe::AlphaType::Unpremul, + None, ); + let _read = image.read_pixels( &mut info, buf.as_mut_slice(), - row_bytes as usize, + row_bytes, skia_safe::IPoint::new(0, 0), - skia_safe::image::CachingHint::Allow, + skia_safe::image::CachingHint::Disallow, ); } _ => {} @@ -294,7 +337,6 @@ impl Context { } pub fn snapshot_to_raster_image(&mut self) -> Option { - self.flush_and_sync_cpu(); let ss = self.surface.image_snapshot(); ss.make_raster_image( &mut self.surface.direct_context(), @@ -302,17 +344,89 @@ impl Context { ) } + pub fn to_raster_image(&mut self, image: Image) -> Option { + image.make_raster_image( + &mut self.surface.direct_context(), + skia_safe::image::CachingHint::Allow, + ) + } + + pub fn to_raster_pixels( + &mut self, + image: Image, + is_alpha: bool, + premultiply: bool, + ) -> Option> { + if let Some(image) = image.make_raster_image( + &mut self.surface.direct_context(), + skia_safe::image::CachingHint::Disallow, + ) { + let info = image.image_info(); + + let mut info = skia_safe::ImageInfo::new( + info.dimensions(), + if is_alpha { + skia_safe::ColorType::RGBA8888 + } else { + skia_safe::ColorType::RGB565 + }, + if premultiply { + skia_safe::AlphaType::Premul + } else { + skia_safe::AlphaType::Unpremul + }, + None, + ); + + let mut buf = vec![0_u8; info.compute_byte_size(info.min_row_bytes())]; + + image.read_pixels( + &info, + &mut buf, + info.min_row_bytes(), + skia_safe::IPoint::new(0, 0), + skia_safe::image::CachingHint::Disallow, + ); + return Some(buf); + } + + None + } + + pub fn snapshot_with_texture_id(&mut self) -> (Image, u32) { + let ss = self.surface.image_snapshot(); + if let Some((texture, _)) = + skia_safe::gpu::images::get_backend_texture_from_image(&ss, false) + { + return ( + ss, + texture + .gl_texture_info() + .map(|info| info.id) + .unwrap_or_default(), + ); + } + (ss, 0) + } + pub fn read_pixels(&mut self) -> Vec { if let Some(mut context) = self.surface.direct_context() { context.flush_submit_and_sync_cpu(); } let info = self.surface.image_info(); - let size = info.height() as usize * info.min_row_bytes(); - let mut buf = vec![0_u8; size]; + + let mut info = skia_safe::ImageInfo::new( + info.dimensions(), + info.color_type(), + info.alpha_type(), + info.color_space(), + ); + + let mut buf = vec![0_u8; info.compute_byte_size(info.min_row_bytes())]; self.surface.read_pixels( &info, - buf.as_mut_slice(), + &mut buf, info.min_row_bytes(), skia_safe::IPoint::new(0, 0), ); diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface.rs index 4d11278c8..bebded78f 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface.rs @@ -37,11 +37,19 @@ impl Context { ); let mut surface = surfaces::raster(&info, None, None).unwrap(); - surface.canvas().scale((density, density)); + let mut state = State::from_device(device, direction); + + if density > 1. { + surface.canvas().scale((density, density)); + } else { + state.use_device_scale = false; + state.did_use_device_scale = false; + }; + Context { surface, path: Path::default(), - state: State::from_device(device, direction), + state, state_stack: vec![], font_color: Color::new(font_color as u32), device, @@ -74,7 +82,13 @@ impl Context { ); if let Some(mut surface) = surfaces::raster(&info, None, None) { - surface.canvas().scale((density, density)); + if density > 1. { + surface.canvas().scale((density, density)); + } else { + context.state.use_device_scale = false; + context.state.did_use_device_scale = false; + }; + context.surface = surface; context.device = device; context.path = Path::default(); diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface_gl.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface_gl.rs index 3aab237cc..e85cb2e0b 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface_gl.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/surface_gl.rs @@ -1,3 +1,4 @@ +use log::{log, Level}; use skia_safe::gpu::gl::Interface; use skia_safe::{gpu, surfaces, Color, ColorType, PixelGeometry, Surface}; @@ -67,12 +68,19 @@ impl Context { let mut surface = surface_holder.unwrap(); - surface.canvas().scale((density, density)); + let mut state = State::from_device(device, direction); + + if density > 1. { + surface.canvas().scale((density, density)); + } else { + state.use_device_scale = false; + state.did_use_device_scale = false; + }; Context { surface, path: Path::default(), - state: State::from_device(device, direction), + state, state_stack: vec![], font_color: Color::new(font_color as u32), device, @@ -137,7 +145,13 @@ impl Context { None, Some(&surface_props), ) { - surface.canvas().scale((density, density)); + if density > 1. { + surface.canvas().scale((density, density)); + } else { + context.state.use_device_scale = false; + context.state.did_use_device_scale = false; + }; + context.surface = surface; context.device = device; context.path = Path::default(); diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/mod.rs index fd05c9e06..c8a6394e1 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/mod.rs @@ -1,5 +1,6 @@ pub use text_direction::*; +use crate::context::drawing_text::typography::Font; use crate::{ context::text_styles::text_align::TextAlign, context::text_styles::text_baseline::TextBaseLine, context::text_styles::text_direction::TextDirection, context::Context, @@ -19,11 +20,14 @@ impl Context { } pub fn set_font(&mut self, font: &str) { - self.state.font.set_font(font); + if let Ok(value) = Font::new(font) { + self.state.font = font.to_owned(); + self.state.font_style = value; + } } pub fn font(&self) -> &str { - self.state.font.get_font_details() + self.state.font.as_str() } pub fn set_text_align(&mut self, align: TextAlign) { @@ -41,4 +45,63 @@ impl Context { pub fn text_baseline(&self) -> TextBaseLine { self.state.text_baseline } + + pub fn set_word_spacing(&mut self, value: &str) { + let size_regexp = crate::context::drawing_text::typography::FONT_REGEXP + .get_or_init(crate::context::drawing_text::typography::init_font_regexp); + + if let Some(cap) = size_regexp.captures(value) { + let size_str = cap.get(7).or_else(|| cap.get(5)).unwrap().as_str(); + let size = if size_str.ends_with('%') { + size_str + .parse::() + .map(|v| v / 100.0 * crate::context::drawing_text::typography::FONT_MEDIUM_PX) + .ok() + } else { + size_str.parse::().ok() + }; + + if let Some(size) = size { + let size_px = crate::context::drawing_text::typography::parse_size_px( + size, + cap.get(8).map(|m| m.as_str()).unwrap_or("px"), + ); + self.state.word_spacing_value = value.to_string(); + self.state.word_spacing = size_px; + }; + } + } + + pub fn get_word_spacing(&self) -> &str { + return self.state.word_spacing_value.as_str(); + } + pub fn set_letter_spacing(&mut self, value: &str) { + let size_regexp = crate::context::drawing_text::typography::FONT_REGEXP + .get_or_init(crate::context::drawing_text::typography::init_font_regexp); + + if let Some(cap) = size_regexp.captures(value) { + let size_str = cap.get(7).or_else(|| cap.get(5)).unwrap().as_str(); + let size = if size_str.ends_with('%') { + size_str + .parse::() + .map(|v| v / 100.0 * crate::context::drawing_text::typography::FONT_MEDIUM_PX) + .ok() + } else { + size_str.parse::().ok() + }; + + if let Some(size) = size { + let size_px = crate::context::drawing_text::typography::parse_size_px( + size, + cap.get(8).map(|m| m.as_str()).unwrap_or("px"), + ); + self.state.letter_spacing_value = value.to_string(); + self.state.letter_spacing = size_px; + }; + } + } + + pub fn get_letter_spacing(&self) -> &str { + return self.state.letter_spacing_value.as_str(); + } } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/text_direction.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/text_direction.rs index 787158a8d..3dc3e3fcf 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/text_direction.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/text_styles/text_direction.rs @@ -5,6 +5,17 @@ pub enum TextDirection { RTL = 1, } +impl From for TextDirection { + fn from(value: skia_safe::textlayout::TextDirection) -> Self { + match value { + skia_safe::textlayout::TextDirection::LTR => Self::LTR, + skia_safe::textlayout::TextDirection::RTL => Self::RTL, + } + } +} + + + impl From for TextDirection { fn from(value: u32) -> Self { match value { diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/transformations.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/transformations.rs index bb192a665..600688961 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/context/transformations.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/transformations.rs @@ -10,10 +10,12 @@ const DEG: f32 = 180.0 / PI; impl Context { pub fn get_transform(&mut self) -> Matrix { let mut matrix = self.surface.canvas().local_to_device_as_3x3(); - // return a non density scaled matrix - let x = matrix.scale_x() / self.device.density; - let y = matrix.scale_y() / self.device.density; - matrix.set_scale((x, y), None); + if self.state.use_device_scale { + // return a non density scaled matrix + let x = matrix.scale_x() / self.device.density; + let y = matrix.scale_y() / self.device.density; + matrix.set_scale((x, y), None); + } matrix } @@ -22,8 +24,12 @@ impl Context { } pub fn scale(&mut self, x: c_float, y: c_float) { - let density = self.device.density; - self.surface.canvas().scale((x * density, y * density)); + if self.state.use_device_scale { + let density = self.device.density; + self.surface.canvas().scale((x * density, y * density)); + } else { + self.surface.canvas().scale((x, y)); + } } pub fn translate(&mut self, x: c_float, y: c_float) { @@ -41,11 +47,13 @@ impl Context { ) { let affine = [a, b, c, d, e, f]; let mut transform = Matrix::from_affine(&affine); - let density = self.device.density; - let x_scale = transform.scale_x() * density; - let y_scale = transform.scale_y() * density; - transform.set_scale_x(x_scale); - transform.set_scale_y(y_scale); + if self.state.use_device_scale { + let density = self.device.density; + let x_scale = transform.scale_x() * density; + let y_scale = transform.scale_y() * density; + transform.set_scale_x(x_scale); + transform.set_scale_y(y_scale); + } self.surface.canvas().concat(&transform); } @@ -53,11 +61,13 @@ impl Context { let mut current = self.surface.canvas().local_to_device_as_3x3(); current.pre_concat(matrix); - let density = self.device.density; - let x_scale = current.scale_x() * density; - let y_scale = current.scale_y() * density; - current.set_scale_x(x_scale); - current.set_scale_y(y_scale); + if self.state.use_device_scale { + let density = self.device.density; + let x_scale = current.scale_x() * density; + let y_scale = current.scale_y() * density; + current.set_scale_x(x_scale); + current.set_scale_y(y_scale); + } let m = M44::from(¤t); self.surface.canvas().set_matrix(&m); @@ -75,11 +85,13 @@ impl Context { let affine = [a, b, c, d, e, f]; let mut matrix = Matrix::from_affine(&affine); - let density = self.device.density; - let x_scale = matrix.scale_x() * density; - let y_scale = matrix.scale_y() * density; - matrix.set_scale_x(x_scale); - matrix.set_scale_y(y_scale); + if self.state.use_device_scale { + let density = self.device.density; + let x_scale = matrix.scale_x() * density; + let y_scale = matrix.scale_y() * density; + matrix.set_scale_x(x_scale); + matrix.set_scale_y(y_scale); + } let m44 = M44::from(matrix); self.surface.canvas().set_matrix(&m44); @@ -88,13 +100,13 @@ impl Context { pub fn set_transform_matrix(&mut self, matrix: &Matrix) { self.surface.canvas().reset_matrix(); let mut matrix = matrix.clone(); - - let density = self.device.density; - let x_scale = matrix.scale_x() * density; - let y_scale = matrix.scale_y() * density; - matrix.set_scale_x(x_scale); - matrix.set_scale_y(y_scale); - + if self.state.use_device_scale { + let density = self.device.density; + let x_scale = matrix.scale_x() * density; + let y_scale = matrix.scale_y() * density; + matrix.set_scale_x(x_scale); + matrix.set_scale_y(y_scale); + } let m44 = M44::from(matrix); self.surface.canvas().set_matrix(&m44); } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/image_bitmap.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/image_bitmap.rs index 51b937555..ca88e4848 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/image_bitmap.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/image_bitmap.rs @@ -249,7 +249,7 @@ pub(crate) fn create_image_bitmap_internal( Some(mut surface) => { let canvas = surface.canvas(); if flip_y { - canvas.translate(skia_safe::Vector::new(0., source_rect.height() as f32)); + canvas.translate(skia_safe::Vector::new(0., source_rect.height())); canvas.scale((1., -1.)); } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/lib.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/lib.rs index 37500be2d..24f304802 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/lib.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/lib.rs @@ -1,24 +1,27 @@ extern crate core; -use std::ffi::c_uint; use base64::Engine; use image::EncodableLayout; +use once_cell::sync::Lazy; use skia_safe::image::CachingHint; use skia_safe::wrapper::NativeTransmutableWrapper; -use skia_safe::{AlphaType, ColorType, EncodedImageFormat, IPoint, ISize, ImageInfo, Point, Surface, images, surfaces}; +use skia_safe::{ + images, surfaces, AlphaType, ColorType, EncodedImageFormat, IPoint, ISize, ImageInfo, Point, + Surface, +}; +use std::ffi::c_uint; use context::filter_quality::FilterQuality; use context::{Context, ContextWrapper}; - +use parking_lot::Mutex; pub mod context; pub mod ffi; pub mod image_bitmap; +pub mod ios; pub mod prelude; pub mod svg; pub mod utils; -pub mod ios; - pub fn to_data_url_context(context: &mut Context, format: &str, quality: c_uint) -> String { let mut ctx = context.surface.direct_context(); let image = context @@ -140,8 +143,7 @@ pub fn bytes_to_data_url( skia_bindings::SkAlphaType::Unpremul, None, ); - if let Some(image) = images::raster_from_data(&image_info, data, (width * 4) as usize) - { + if let Some(image) = images::raster_from_data(&image_info, data, (width * 4) as usize) { let mut quality = quality; if quality > 100 || quality < 0 { quality = 92; @@ -274,7 +276,7 @@ pub(crate) fn snapshot_canvas(context: &mut ContextWrapper) -> Option> { let snapshot = context.surface.image_snapshot(); let mut ctx = context.surface.direct_context(); - if let Some(data) = snapshot.encode(&mut ctx,EncodedImageFormat::PNG, None) { + if let Some(data) = snapshot.encode(&mut ctx, EncodedImageFormat::PNG, None) { return Some(data.as_bytes().to_vec()); } return None; @@ -306,7 +308,7 @@ pub(crate) fn snapshot_canvas_raw(context: &mut ContextWrapper) -> Vec { if let Some(mut context) = dst_surface.direct_context() { context.flush_and_submit(); } - + bytes } } diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/svg/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/svg/mod.rs index 511d265b0..2a2c625af 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/svg/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/svg/mod.rs @@ -1,4 +1,5 @@ use std::io::{Read, Seek, SeekFrom}; +use skia_safe::FontMgr; use skia_safe::svg::Dom; @@ -14,7 +15,8 @@ pub fn draw_svg_from_path(context: &mut Context, path: &str) { match result { Ok(_) => { let _ = reader.seek(SeekFrom::Start(0)); - match Dom::read(reader) { + let mgr = FontMgr::new(); + match Dom::read(reader, mgr) { Ok(mut svg) => { let _device = context.device; let size = skia_safe::Size::new( @@ -44,7 +46,8 @@ pub fn draw_svg_from_path(context: &mut Context, path: &str) { } pub fn draw_svg(context: &mut Context, svg: &str) { - match Dom::from_bytes(svg.as_bytes()) { + let mgr = FontMgr::new(); + match Dom::from_bytes(svg.as_bytes(), mgr) { Ok(mut svg) => { let _device = context.device; let size = skia_safe::Size::new( diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/dimensions.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/dimensions.rs index 323080119..fbbcf4db9 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/dimensions.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/dimensions.rs @@ -9,7 +9,14 @@ const SIZE_PX: f32 = 1.0 / 96.0 * SIZE_INCH; const SIZE_POINT: f32 = 1.0 / 72.0 * SIZE_INCH; const SIZE_PICAS: f32 = SIZE_POINT * 12.0; + +/// The default font size. +pub const FONT_MEDIUM_PX: f32 = 16.0; + pub(crate) fn parse_size(value: &str, device: Device) -> f32 { + if value.contains("%") { + return value.replace("%", "").parse::().unwrap_or(0.0); + } if value.contains("px") { return value.replace("px", "").parse::().unwrap_or(0.0); } else if value.contains("cm") { diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/image.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/image.rs index c1d1aeed9..9fb18f2d9 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/image.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/image.rs @@ -1,10 +1,14 @@ -use std::ffi::{c_void}; +use std::ffi::c_void; use std::os::raw::c_int; -use skia_safe::{AlphaType, Bitmap, images, ColorType, Data, ISize, Image, ImageInfo, Pixmap}; - -use canvas_core::image_asset::ImageAsset; +use skia_safe::{AlphaType, Bitmap, ColorType, Data, Image, ImageInfo, ISize}; +pub fn from_backend_texture(context: &mut crate::context::Context, texture: &skia_safe::gpu::BackendTexture, origin: skia_safe::gpu::SurfaceOrigin, info: &ImageInfo) -> Option { + if let Some(mut context) = context.surface.canvas().recording_context() { + return Image::from_texture(&mut context, texture, origin, info.color_type(), info.alpha_type(), info.color_space()) + } + None +} pub fn to_image( image_array: *const u8, image_size: usize, @@ -18,7 +22,7 @@ pub fn to_image( AlphaType::Premul, None, ); - Image::from_raster_data(&info, Data::new_copy(image_slice), (width * 4) as usize) + Image::from_raster_data(&info, Data::new_copy(image_slice), info.min_row_bytes()) } pub fn to_image_encoded(image_array: *const u8, image_size: usize) -> Option { @@ -38,7 +42,7 @@ pub fn from_image_slice_no_copy(image_slice: &[u8], width: c_int, height: c_int) None, ); - unsafe { Image::from_raster_data(&info, Data::new_bytes(image_slice), (width * 4) as usize) } + unsafe { Image::from_raster_data(&info, Data::new_bytes(image_slice), info.min_row_bytes()) } } pub fn from_bitmap_slice(image_slice: &[u8], width: c_int, height: c_int) -> Option { @@ -54,7 +58,7 @@ pub fn from_bitmap_slice(image_slice: &[u8], width: c_int, height: c_int) -> Opt bm.install_pixels( &info, image_slice.as_ptr() as *mut c_void, - (width * 4) as usize, + info.min_row_bytes(), ); } @@ -72,7 +76,7 @@ pub fn from_image_slice(image_slice: &[u8], width: c_int, height: c_int) -> Opti AlphaType::Unpremul, None, ); - Image::from_raster_data(&info, Data::new_copy(image_slice), (width * 4) as usize) + Image::from_raster_data(&info, Data::new_copy(image_slice), info.min_row_bytes()) } pub fn from_image_slice_encoded(image_slice: &[u8]) -> Option { diff --git a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/mod.rs index bfc145add..1c1a0bd05 100644 --- a/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-2d/src/utils/mod.rs @@ -1,6 +1,23 @@ +use std::ops::Range; + pub mod color; pub(crate) mod device; pub(crate) mod dimensions; pub(crate) mod geometry; pub mod gl; pub mod image; + +// https://github.com/samizdatco/skia-canvas/blob/35ac526e8b428579f84b7d9557f032cbf5e04883/src/utils.rs#L146 +/// Convert from byte-indices to char-indices for a given UTF-8 string +pub fn string_idx_range(text: &str, start_idx: usize, end_idx: usize) -> Range { + let mut indices = text.char_indices(); + let obtain_index = |(index, _char)| index; + let str_len = text.len(); + + Range { + start: indices.nth(start_idx).map_or(str_len, &obtain_index), + end: indices + .nth((end_idx - start_idx).max(1) - 1) + .map_or(str_len, &obtain_index), + } +} diff --git a/packages/canvas/src-native/canvas-native/canvas-android/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-android/Cargo.toml index 20f5028cb..27fb14add 100644 --- a/packages/canvas/src-native/canvas-native/canvas-android/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-android/Cargo.toml @@ -10,8 +10,6 @@ rustflags = ["-Cpanic=abort", "-C target-cpu=native", "-C target-feature=-outlin name = "canvasandroid" crate-type = ["cdylib"] -[build-dependencies] -bindgen = "0.64.0" [dependencies] canvas-core = { path = "../canvas-core", features = ["2d"] } @@ -29,5 +27,5 @@ ndk = { version = "0.7.0", features = ["bitmap"] } libloading = "0.8.1" log = "0.4.20" android_logger = "0.13.1" -skia-safe = { version = "0.66.3" } -itertools = "0.11.0" +skia-safe = { version = "0.69.0" } +itertools = "0.12.0" diff --git a/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml index 3de6880e2..9e118b884 100644 --- a/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml @@ -18,15 +18,16 @@ canvas-webgl = { path = "../canvas-webgl", optional = true } parking_lot = "0.12.0" ureq = "2.8.0" bytes = "1.5.0" -#ada-url = {git = "https://github.com/triniwiz/ada-url-rust" , rev = "bc35ae9"} +ada-url = {git = "https://github.com/triniwiz/ada-url-rust" , rev = "bc35ae9"} +log = { version = "0.4.20", features = [] } [target.'cfg(target_os="ios")'.dependencies] display-link = "0.2.0" -ada-url = "2.1.0" +#ada-url = "2.1.0" #[target.'cfg(target_os="macos")'.dependencies] #display-link = "0.2.0" -[target.'cfg(target_os="android")'.dependencies] -ndk = { version = "0.7.0", features = ["bitmap"] } -once_cell = "1.14.0" +#[target.'cfg(target_os="android")'.dependencies] +#ndk = { version = "0.7.0", features = ["bitmap"] } +#once_cell = "1.14.0" #ada-url = {git = "https://github.com/triniwiz/ada-url-rust" , rev = "bc35ae9"} \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/canvas-c/src/lib.rs b/packages/canvas/src-native/canvas-native/canvas-c/src/lib.rs index 1d323017c..add5ea9ad 100644 --- a/packages/canvas/src-native/canvas-native/canvas-c/src/lib.rs +++ b/packages/canvas/src-native/canvas-native/canvas-c/src/lib.rs @@ -3,12 +3,14 @@ use std::borrow::Cow; use std::ffi::{CStr, CString}; use std::io::{Read, Write}; +use std::os::raw::{c_char, c_int, c_uint}; use std::os::raw::c_ulong; use std::os::raw::c_void; -use std::os::raw::{c_char, c_int, c_uint}; use std::sync::Arc; + use parking_lot::{MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock}; +use canvas_2d::context::{Context, ContextWrapper}; use canvas_2d::context::compositing::composite_operation_type::CompositeOperationType; use canvas_2d::context::drawing_paths::fill_rule::FillRule; use canvas_2d::context::fill_and_stroke_styles::paint::paint_style_set_color_with_string; @@ -17,12 +19,10 @@ use canvas_2d::context::image_smoothing::ImageSmoothingQuality; use canvas_2d::context::line_styles::line_cap::LineCap; use canvas_2d::context::line_styles::line_join::LineJoin; use canvas_2d::context::text_styles::text_align::TextAlign; +use canvas_2d::context::text_styles::text_baseline::TextBaseLine; use canvas_2d::context::text_styles::text_direction::TextDirection; -use canvas_2d::context::{Context, ContextWrapper}; use canvas_2d::utils::color::{parse_color, to_parsed_color}; -use canvas_2d::utils::image::{ - from_bitmap_slice, from_image_slice, from_image_slice_encoded, from_image_slice_no_copy, -}; +use canvas_2d::utils::image::{from_backend_texture, from_bitmap_slice, from_image_slice, from_image_slice_encoded, from_image_slice_no_copy}; use canvas_core::image_asset::OutputFormat; use canvas_webgl::prelude::WebGLVersion; #[cfg(target_os = "android")] @@ -130,6 +130,33 @@ pub extern "C" fn canvas_native_image_filter_destroy(value: *mut ImageFilter) { /* Helpers */ +#[no_mangle] +pub extern "C" fn canvas_native_font_add_family( + alias: *const c_char, + filenames: *const *const c_char, + length: usize, +) { + let names = unsafe { std::slice::from_raw_parts(filenames, length) }; + let names = names + .iter() + .map(|value| unsafe { CStr::from_ptr(*value).to_string_lossy().to_string() }) + .collect::>(); + let tmp = names.iter().map(String::as_ref).collect::>(); + if alias.is_null() { + let _ = canvas_2d::context::drawing_text::global_fonts::FontLibrary::add_family( + None, + tmp.as_slice(), + ); + } else { + let alias = unsafe { CStr::from_ptr(alias) }; + let alias = alias.to_string_lossy(); + let _ = canvas_2d::context::drawing_text::global_fonts::FontLibrary::add_family( + Some(alias.as_ref()), + tmp.as_slice(), + ); + } +} + #[derive(Clone, Default)] pub struct FileHelper { data: Option, @@ -265,6 +292,10 @@ impl CanvasRenderingContext2D { } } + pub fn reset(&mut self) { + self.context.get_context_mut().reset(); + } + pub fn render(&self) { self.gl_context.make_current(); { @@ -601,7 +632,7 @@ pub extern "C" fn canvas_native_context_create_gl_no_window( width as i32, height as i32, ) - .unwrap(); + .unwrap(); gl_context.make_current(); @@ -675,6 +706,55 @@ pub extern "C" fn canvas_native_context_set_font( .set_font(font.to_string_lossy().as_ref()); } +#[no_mangle] +pub extern "C" fn canvas_native_context_get_letter_spacing( + context: *const CanvasRenderingContext2D, +) -> *const c_char { + let context = unsafe { &*context }; + let ret = context.get_context().get_letter_spacing().to_string(); + CString::new(ret).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn canvas_native_context_set_letter_spacing( + context: *mut CanvasRenderingContext2D, + spacing: *const c_char, +) { + if spacing.is_null() { + return; + } + let context = unsafe { &mut *context }; + let spacing = unsafe { CStr::from_ptr(spacing) }; + context + .get_context_mut() + .set_letter_spacing(spacing.to_string_lossy().as_ref()); +} + + +#[no_mangle] +pub extern "C" fn canvas_native_context_get_word_spacing( + context: *const CanvasRenderingContext2D, +) -> *const c_char { + let context = unsafe { &*context }; + let ret = context.get_context().get_word_spacing().to_string(); + CString::new(ret).unwrap().into_raw() +} + +#[no_mangle] +pub extern "C" fn canvas_native_context_set_word_spacing( + context: *mut CanvasRenderingContext2D, + spacing: *const c_char, +) { + if spacing.is_null() { + return; + } + let context = unsafe { &mut *context }; + let spacing = unsafe { CStr::from_ptr(spacing) }; + context + .get_context_mut() + .set_word_spacing(spacing.to_string_lossy().as_ref()); +} + #[no_mangle] pub extern "C" fn canvas_native_context_get_global_alpha( context: *const CanvasRenderingContext2D, @@ -991,12 +1071,12 @@ pub extern "C" fn canvas_native_context_get_text_baseline( ) -> *const c_char { let context = unsafe { &*context }; let ret = match context.get_context().text_baseline() { - TextBaseline::ALPHABETIC => "alphabetic", - TextBaseline::BOTTOM => "bottom", - TextBaseline::HANGING => "hanging", - TextBaseline::IDEOGRAPHIC => "ideographic", - TextBaseline::MIDDLE => "middle", - TextBaseline::TOP => "top", + TextBaseLine::ALPHABETIC => "alphabetic", + TextBaseLine::BOTTOM => "bottom", + TextBaseLine::HANGING => "hanging", + TextBaseLine::IDEOGRAPHIC => "ideographic", + TextBaseLine::MIDDLE => "middle", + TextBaseLine::TOP => "top", }; CString::new(ret).unwrap().into_raw() } @@ -1014,14 +1094,14 @@ pub extern "C" fn canvas_native_context_set_text_baseline( match baseline.to_string_lossy().as_ref() { "alphabetic" => context .get_context_mut() - .set_text_baseline(TextBaseline::ALPHABETIC), - "bottom" => context.get_context_mut().set_text_baseline(TextBaseline::BOTTOM), - "hanging" => context.get_context_mut().set_text_baseline(TextBaseline::HANGING), + .set_text_baseline(TextBaseLine::ALPHABETIC), + "bottom" => context.get_context_mut().set_text_baseline(TextBaseLine::BOTTOM), + "hanging" => context.get_context_mut().set_text_baseline(TextBaseLine::HANGING), "ideographic" => context .get_context_mut() - .set_text_baseline(TextBaseline::IDEOGRAPHIC), - "middle" => context.get_context_mut().set_text_baseline(TextBaseline::MIDDLE), - "top" => context.get_context_mut().set_text_baseline(TextBaseline::TOP), + .set_text_baseline(TextBaseLine::IDEOGRAPHIC), + "middle" => context.get_context_mut().set_text_baseline(TextBaseLine::MIDDLE), + "top" => context.get_context_mut().set_text_baseline(TextBaseLine::TOP), _ => {} } } @@ -1602,7 +1682,6 @@ pub extern "C" fn canvas_native_context_create_linear_gradient( )))) } - #[no_mangle] pub extern "C" fn canvas_native_context_create_conic_gradient( context: *mut CanvasRenderingContext2D, @@ -1614,7 +1693,9 @@ pub extern "C" fn canvas_native_context_create_conic_gradient( let context = unsafe { &mut *context }; Box::into_raw(Box::new(PaintStyle(Some( canvas_2d::context::fill_and_stroke_styles::paint::PaintStyle::Gradient( - context.get_context().create_conic_gradient(start_angle, x, y) + context + .get_context() + .create_conic_gradient(start_angle, x, y), ), )))) } @@ -1748,12 +1829,32 @@ pub extern "C" fn canvas_native_context_create_pattern_canvas2d( if !source_non_gpu { source.make_current(); + + + #[cfg(any(target_os = "ios", target_os = "macos"))] { + let snapshot = source_ctx.snapshot(); + let info = snapshot.image_info(); + + if let Some((image, origin)) = snapshot.backend_texture(false) { + let mut ctx = context.get_context_mut(); + + if let Some(image) = from_backend_texture(&mut ctx, &image, origin, info) { + return Some(canvas_2d::context::fill_and_stroke_styles::paint::PaintStyle::Pattern( + context.get_context().create_pattern(image, repetition), + )) + } + } + + return None; + } + + // todo use gpu image created from snapshot ... need single or shared context or transfer to a texture //let data = source_ctx.snapshot_to_raster_data(); // let mut data = source_ctx.snapshot_to_raster_data(); let image = source_ctx.image_snapshot_to_non_texture_image(); - // context.make_current(); + context.make_current(); return image.map(|image| { canvas_2d::context::fill_and_stroke_styles::paint::PaintStyle::Pattern( @@ -2128,18 +2229,40 @@ pub extern "C" fn canvas_native_context_draw_image_context( let context = unsafe { &mut *context }; let source = unsafe { &*source }; source.make_current(); - let source_ctx = source.get_context_mut(); - let width = source_ctx.device().width; - let height = source_ctx.device().height; - let bytes = source.get_context_mut().snapshot_to_raster_data(); + // gl context is shared so snapshots should work + let mut source_ctx = source.get_context_mut(); + + + #[cfg(any(target_os = "ios", target_os = "macos"))] { + let snapshot = source_ctx.snapshot(); + let info = snapshot.image_info(); + + if let Some((image, origin)) = snapshot.backend_texture(false) { + let mut ctx = context.get_context_mut(); + + if let Some(image) = from_backend_texture(&mut ctx, &image, origin, info) { + ctx.draw_image_src_xywh_dst_xywh( + &image, sx, sy, s_width, s_height, dx, dy, d_width, d_height, + ); + } + } + } + + #[cfg(target_os = "ios")] { + let width = source_ctx.device().width; + let height = source_ctx.device().height; + + let bytes = source_ctx.snapshot_to_raster_data(); + + if let Some(image) = from_image_slice_no_copy(bytes.as_slice(), width as c_int, height as c_int) + { + let context = unsafe { &mut *context }; + context.make_current(); + context.get_context_mut().draw_image_src_xywh_dst_xywh( + &image, sx, sy, s_width, s_height, dx, dy, d_width, d_height, + ); + } - if let Some(image) = from_image_slice_no_copy(bytes.as_slice(), width as c_int, height as c_int) - { - let context = unsafe { &mut *context }; - context.make_current(); - context.get_context_mut().draw_image_src_xywh_dst_xywh( - &image, sx, sy, s_width, s_height, dx, dy, d_width, d_height, - ); } } @@ -2230,6 +2353,26 @@ pub extern "C" fn canvas_native_context_fill_text( text: *const c_char, x: f32, y: f32, +) { + if text.is_null() { + return; + } + let text = unsafe { CStr::from_ptr(text) }; + let text = text.to_string_lossy(); + let context = unsafe { &mut *context }; + context.make_current(); + context + .get_context_mut() + .fill_text(text.as_ref(), x, y, None); +} + +#[inline] +#[no_mangle] +pub extern "C" fn canvas_native_context_fill_text_width( + context: *mut CanvasRenderingContext2D, + text: *const c_char, + x: f32, + y: f32, width: f32, ) { if text.is_null() { @@ -2241,7 +2384,7 @@ pub extern "C" fn canvas_native_context_fill_text( context.make_current(); context .get_context_mut() - .fill_text(text.as_ref(), x, y, width); + .fill_text(text.as_ref(), x, y, Some(width)); } #[no_mangle] @@ -2371,7 +2514,7 @@ pub extern "C" fn canvas_native_context_measure_text( let text = text.to_string_lossy(); let context = unsafe { &mut *context }; Box::into_raw(Box::new(TextMetrics( - context.get_context().measure_text(text.as_ref()), + context.get_context_mut().measure_text(text.as_ref()), ))) } @@ -2585,6 +2728,25 @@ pub extern "C" fn canvas_native_context_stroke_text( text: *const c_char, x: f32, y: f32, +) { + if text.is_null() { + return; + } + let text = unsafe { CStr::from_ptr(text) }; + let text = text.to_string_lossy(); + let context = unsafe { &mut *context }; + context.make_current(); + context + .get_context_mut() + .stroke_text(text.as_ref(), x, y, None); +} + +#[no_mangle] +pub extern "C" fn canvas_native_context_stroke_text_width( + context: *mut CanvasRenderingContext2D, + text: *const c_char, + x: f32, + y: f32, width: f32, ) { if text.is_null() { @@ -2596,7 +2758,7 @@ pub extern "C" fn canvas_native_context_stroke_text( context.make_current(); context .get_context_mut() - .stroke_text(text.as_ref(), x, y, width); + .stroke_text(text.as_ref(), x, y, Some(width)); } #[no_mangle] @@ -3590,8 +3752,8 @@ impl ImageAsset { } pub fn load_from_reader(&mut self, reader: &mut R) -> bool - where - R: Read + std::io::Seek + std::io::BufRead, + where + R: Read + std::io::Seek + std::io::BufRead, { self.0.load_from_reader(reader) } @@ -4146,6 +4308,7 @@ pub extern "C" fn canvas_native_text_decoder_decode_c_string( decoder.0.decode_c_string(data).into_raw() } + #[no_mangle] pub extern "C" fn canvas_native_text_decoder_get_encoding( decoder: *const TextDecoder, @@ -4445,8 +4608,8 @@ pub extern "C" fn canvas_native_webgl_to_data_url( format.as_ref(), quality, )) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } #[derive(Debug)] @@ -4685,7 +4848,6 @@ impl WebGLExtension { } #[allow(non_camel_case_types)] - pub struct EXT_blend_minmax(canvas_webgl::prelude::EXT_blend_minmax); #[no_mangle] @@ -4697,7 +4859,6 @@ pub extern "C" fn canvas_native_webgl_EXT_blend_minmax_destroy(value: *mut EXT_b } #[allow(non_camel_case_types)] - pub struct EXT_color_buffer_half_float(canvas_webgl::prelude::EXT_color_buffer_half_float); #[no_mangle] @@ -4711,7 +4872,6 @@ pub extern "C" fn canvas_native_webgl_EXT_color_buffer_half_float_destroy( } #[allow(non_camel_case_types)] - pub struct EXT_disjoint_timer_query(canvas_webgl::prelude::EXT_disjoint_timer_query); #[no_mangle] @@ -4725,7 +4885,6 @@ pub extern "C" fn canvas_native_webgl_EXT_disjoint_timer_query_destroy( } #[allow(non_camel_case_types)] - pub struct EXT_sRGB(canvas_webgl::prelude::EXT_sRGB); #[no_mangle] @@ -4737,7 +4896,6 @@ pub extern "C" fn canvas_native_webgl_EXT_sRGB_destroy(value: *mut EXT_disjoint_ } #[allow(non_camel_case_types)] - pub struct EXT_shader_texture_lod(canvas_webgl::prelude::EXT_shader_texture_lod); #[no_mangle] @@ -4751,7 +4909,6 @@ pub extern "C" fn canvas_native_webgl_EXT_shader_texture_lod_destroy( } #[allow(non_camel_case_types)] - pub struct EXT_texture_filter_anisotropic(canvas_webgl::prelude::EXT_texture_filter_anisotropic); #[no_mangle] @@ -4765,7 +4922,6 @@ pub extern "C" fn canvas_native_webgl_EXT_texture_filter_anisotropic_destroy( } #[allow(non_camel_case_types)] - pub struct OES_element_index_uint(canvas_webgl::prelude::OES_element_index_uint); #[no_mangle] @@ -4779,7 +4935,6 @@ pub extern "C" fn canvas_native_webgl_OES_element_index_uint_destroy( } #[allow(non_camel_case_types)] - pub struct OES_standard_derivatives(canvas_webgl::prelude::OES_standard_derivatives); #[no_mangle] @@ -4793,7 +4948,6 @@ pub extern "C" fn canvas_native_webgl_OES_standard_derivatives_destroy( } #[allow(non_camel_case_types)] - pub struct OES_texture_float(canvas_webgl::prelude::OES_texture_float); #[no_mangle] @@ -4805,7 +4959,6 @@ pub extern "C" fn canvas_native_webgl_OES_texture_float_destroy(value: *mut OES_ } #[allow(non_camel_case_types)] - pub struct OES_texture_float_linear(canvas_webgl::prelude::OES_texture_float_linear); #[no_mangle] @@ -4819,7 +4972,6 @@ pub extern "C" fn canvas_native_webgl_OES_texture_float_linear_destroy( } #[allow(non_camel_case_types)] - pub struct OES_texture_half_float(canvas_webgl::prelude::OES_texture_half_float); #[no_mangle] @@ -4833,7 +4985,6 @@ pub extern "C" fn canvas_native_webgl_OES_texture_half_float_destroy( } #[allow(non_camel_case_types)] - pub struct OES_texture_half_float_linear(canvas_webgl::prelude::OES_texture_half_float_linear); #[no_mangle] @@ -4847,7 +4998,6 @@ pub extern "C" fn canvas_native_webgl_OES_texture_half_float_linear_destroy( } #[allow(non_camel_case_types)] - pub struct OES_vertex_array_object(canvas_webgl::prelude::OES_vertex_array_object); #[no_mangle] @@ -4861,7 +5011,6 @@ pub extern "C" fn canvas_native_webgl_OES_vertex_array_object_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_color_buffer_float(canvas_webgl::prelude::WEBGL_color_buffer_float); #[no_mangle] @@ -4875,7 +5024,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_color_buffer_float_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_atc(canvas_webgl::prelude::WEBGL_compressed_texture_atc); #[no_mangle] @@ -4889,7 +5037,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_atc_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_etc1(canvas_webgl::prelude::WEBGL_compressed_texture_etc1); #[no_mangle] @@ -4903,7 +5050,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_etc1_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_s3tc(canvas_webgl::prelude::WEBGL_compressed_texture_s3tc); #[no_mangle] @@ -4917,7 +5063,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_s3tc_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_s3tc_srgb( canvas_webgl::prelude::WEBGL_compressed_texture_s3tc_srgb, ); @@ -4933,7 +5078,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_s3tc_srgb_destroy } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_etc(canvas_webgl::prelude::WEBGL_compressed_texture_etc); #[no_mangle] @@ -4947,7 +5091,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_etc_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_compressed_texture_pvrtc(canvas_webgl::prelude::WEBGL_compressed_texture_pvrtc); #[no_mangle] @@ -4961,7 +5104,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_compressed_texture_pvrtc_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_lose_context(canvas_webgl::prelude::WEBGL_lose_context); #[no_mangle] @@ -4973,7 +5115,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_lose_context_destroy(value: *mut WEB } #[allow(non_camel_case_types)] - pub struct ANGLE_instanced_arrays(canvas_webgl::prelude::ANGLE_instanced_arrays); #[no_mangle] @@ -4987,7 +5128,6 @@ pub extern "C" fn canvas_native_webgl_ANGLE_instanced_arrays_destroy( } #[allow(non_camel_case_types)] - pub struct WEBGL_depth_texture(canvas_webgl::prelude::WEBGL_depth_texture); #[no_mangle] @@ -4999,7 +5139,6 @@ pub extern "C" fn canvas_native_webgl_WEBGL_depth_texture_destroy(value: *mut WE } #[allow(non_camel_case_types)] - pub struct WEBGL_draw_buffers(canvas_webgl::prelude::WEBGL_draw_buffers); #[no_mangle] @@ -6700,8 +6839,8 @@ pub extern "C" fn canvas_native_webgl_get_program_info_log( state.get_inner_mut(), ), ) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } #[no_mangle] @@ -6743,8 +6882,8 @@ pub extern "C" fn canvas_native_webgl_get_shader_info_log( CString::new( canvas_webgl::webgl::canvas_native_webgl_get_shader_info_log(shader, state.get_inner_mut()), ) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } #[no_mangle] @@ -6789,8 +6928,8 @@ pub extern "C" fn canvas_native_webgl_get_shader_source( shader, state.get_inner_mut(), )) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } #[no_mangle] @@ -7237,49 +7376,90 @@ pub extern "C" fn canvas_native_webgl_tex_image2d_canvas2d( canvas: *mut CanvasRenderingContext2D, state: *mut WebGLState, ) { - assert!(!state.is_null()); + assert!(!canvas.is_null()); assert!(!state.is_null()); let canvas = unsafe { &mut *canvas }; let state = unsafe { &mut *state }; - { - let context = &mut state.0; - context.remove_if_current(); - } - let width; - let height; + let width: i32; + let height: i32; let source_non_gpu; { let ctx = canvas.get_context(); let device = ctx.device(); - width = device.width; - height = device.height; + width = device.width as i32; + height = device.height as i32; source_non_gpu = device.non_gpu; } - let mut source_ctx = canvas.get_context_mut(); - let mut buf; if !source_non_gpu { canvas.make_current(); - buf = source_ctx.snapshot_to_raster_data(); - canvas.remove_if_current(); - // canvas.gl_context.remove_if_current(); + let mut source_ctx = canvas.get_context_mut(); + + let snapshot = source_ctx.snapshot(); + + if let Some(pixels) = snapshot.peek_pixels() { + if let Some(buf) = pixels.bytes() { + let buf = buf.to_vec(); + state.0.make_current(); + + canvas_webgl::webgl::canvas_native_webgl_tex_image2d( + target, + level, + internalformat, + width, + height, + 0, + format, + image_type, + buf.as_slice(), + state.get_inner_mut(), + ); + } + } else { + if let Some(buf) = source_ctx.to_raster_pixels( + snapshot, + if internalformat == gl_bindings::RGBA as i32 { + true + } else { + false + }, + true, + ) { + state.0.make_current(); + + canvas_webgl::webgl::canvas_native_webgl_tex_image2d( + target, + level, + internalformat, + width, + height, + 0, + format, + image_type, + buf.as_slice(), + state.get_inner_mut(), + ); + } + } } else { - buf = source_ctx.read_pixels(); + let mut source_ctx = canvas.get_context_mut(); + canvas.make_current(); + let buf = source_ctx.read_pixels(); + canvas.remove_if_current(); + canvas_webgl::webgl::canvas_native_webgl_tex_image2d( + target, + level, + internalformat, + width, + height, + 0, + format, + image_type, + buf.as_slice(), + state.get_inner_mut(), + ); } - - canvas_webgl::webgl::canvas_native_webgl_tex_image2d( - target, - level, - internalformat, - width as i32, - height as i32, - 0, - format, - image_type, - buf.as_mut_slice(), - state.get_inner_mut(), - ); } #[no_mangle] @@ -7466,45 +7646,88 @@ pub extern "C" fn canvas_native_webgl_tex_sub_image2d_canvas2d( assert!(!canvas.is_null()); let state = unsafe { &mut *state }; let canvas = unsafe { &mut *canvas }; - { - let context = &mut state.0; - context.remove_if_current(); - } - let width; - let height; let source_non_gpu; { let ctx = canvas.get_context(); let device = ctx.device(); - width = device.width; - height = device.height; source_non_gpu = device.non_gpu; } - let mut source_ctx = canvas.get_context_mut(); let mut buf; if !source_non_gpu { canvas.make_current(); - buf = source_ctx.snapshot_to_raster_data(); - canvas.remove_if_current(); - // canvas.gl_context.remove_if_current(); + let mut source_ctx = canvas.get_context_mut(); + source_ctx.flush_and_sync_cpu(); + let snapshot = source_ctx.snapshot(); + let width = snapshot.width(); + let height = snapshot.height(); + + if let Some(pixels) = snapshot.peek_pixels() { + if let Some(buf) = pixels.bytes() { + let mut buf = buf.to_vec(); + state.0.make_current(); + + canvas_webgl::webgl::canvas_native_webgl_tex_sub_image2d( + target, + level, + xoffset, + yoffset, + width, + height, + format, + image_type, + buf.as_mut_slice(), + state.get_inner_mut(), + ); + } + } else { + if let Some(mut buf) = source_ctx.to_raster_pixels( + snapshot, + if format == gl_bindings::RGBA { + true + } else { + false + }, + true, + ) { + state.0.make_current(); + + canvas_webgl::webgl::canvas_native_webgl_tex_sub_image2d( + target, + level, + xoffset, + yoffset, + width, + height, + format, + image_type, + buf.as_mut_slice(), + state.get_inner_mut(), + ); + } + } } else { + let mut source_ctx = canvas.get_context_mut(); + canvas.make_current(); + let width = source_ctx.device().width; + let height = source_ctx.device().height; buf = source_ctx.read_pixels(); - } + canvas.remove_if_current(); - canvas_webgl::webgl::canvas_native_webgl_tex_sub_image2d( - target, - level, - xoffset, - yoffset, - width as _, - height as _, - format, - image_type, - buf.as_mut_slice(), - state.get_inner_mut(), - ); + canvas_webgl::webgl::canvas_native_webgl_tex_sub_image2d( + target, + level, + xoffset, + yoffset, + width as _, + height as _, + format, + image_type, + buf.as_mut_slice(), + state.get_inner_mut(), + ); + } } #[no_mangle] @@ -8609,8 +8832,8 @@ pub extern "C" fn canvas_native_webgl2_get_active_uniform_block_name( state.get_inner_mut(), ), ) - .unwrap() - .into_raw() + .unwrap() + .into_raw() } #[no_mangle] diff --git a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml index a51fcb602..83171d91d 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-core/Cargo.toml @@ -9,25 +9,25 @@ edition = "2021" [dependencies] gl-bindings = { path = "../gl-bindings" } -raw-window-handle = "0.5.0" +raw-window-handle = "0.5.2" parking_lot = "0.12.0" -image = {version = "0.24.7", features = ["jpeg", "png", "gif", "rgb", "jpeg_rayon"]} -skia-safe = { version = "0.66.3", features = ["gl", "svg"], optional = true } +image = { version = "0.24.7", features = ["jpeg", "png", "gif", "rgb", "jpeg_rayon"] } +skia-safe = { version = "0.69.0", features = ["gl", "svg"], optional = true } once_cell = "1.14.0" log = "0.4.17" [target.'cfg(target_os = "ios")'.dependencies] -icrate = {version = "0.0.4", features = ["objc2", "Foundation" , "Foundation_NSData"]} +icrate = { version = "0.0.4", features = ["objc2", "Foundation", "Foundation_NSData"] } core-foundation = "0.9.3" -[target.'cfg(target_os = "android")'.dependencies] -egl = "0.2.7" -glutin = "0.30.10" +#[target.'cfg(target_os = "android")'.dependencies] +#egl = "0.2.7" +#glutin = "0.31.1" #glutin = { git = "https://github.com/triniwiz/glutin", rev = "1b2cbbe" } -android_log = "0.1.3" +#android_log = "0.1.3" -#[target.'cfg(target_os = "macos")'.dependencies] -#winit = "0.28.1" -#glutin-winit = "0.3.0" -#glutin = "0.30.10" +[target.'cfg(target_os = "macos")'.dependencies] +winit = "0.29.4" +glutin-winit = "0.4.2" +glutin = "0.31.1" #glutin = { git = "https://github.com/triniwiz/glutin", rev = "1b2cbbe" } \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/android.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/android.rs index 9de35463f..eb3596cb6 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/android.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/android.rs @@ -21,8 +21,7 @@ use raw_window_handle::{AndroidDisplayHandle, RawDisplayHandle, RawWindowHandle} use crate::context_attributes::ContextAttributes; use once_cell::sync::OnceCell; -use parking_lot::lock_api::RwLockReadGuard; -use parking_lot::{MappedRwLockWriteGuard, RwLock}; +use parking_lot::{ MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; pub static IS_GL_SYMBOLS_LOADED: OnceCell = OnceCell::new(); @@ -38,6 +37,7 @@ pub struct GLContextInner { surface: Option, context: Option, display: Option, + transfer_surface_info: crate::gl::TransferSurface, } unsafe impl Sync for GLContextInner {} @@ -573,6 +573,7 @@ impl GLContext { surface, context, display: Some(display), + transfer_surface_info: Default::default() }; let ret = GLContext { @@ -980,6 +981,7 @@ impl GLContext { surface, context, display: Some(display), + transfer_surface_info: Default::default() })), }) } @@ -1135,4 +1137,15 @@ impl GLContext { }) .unwrap_or_default() } + + + pub fn get_transfer_surface_info(&self) -> MappedRwLockReadGuard { + RwLockReadGuard::map(self.inner.read(), |v| &v.transfer_surface_info) + } + + pub fn get_transfer_surface_info_mut( + &self, + ) -> MappedRwLockWriteGuard { + RwLockWriteGuard::map(self.inner.write(), |v| &mut v.transfer_surface_info) + } } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/ios.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/ios.rs index 5a84f51e3..9df57d06e 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/ios.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/ios.rs @@ -15,7 +15,7 @@ use std::sync::Arc; use crate::context_attributes::ContextAttributes; use once_cell::sync::OnceCell; -use parking_lot::RwLock; +use parking_lot::{ MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard}; pub static IS_GL_SYMBOLS_LOADED: OnceCell = OnceCell::new(); @@ -24,6 +24,7 @@ pub struct GLContextInner { context: Option, sharegroup: EAGLSharegroup, view: Option, + transfer_surface_info: crate::gl::TransferSurface } unsafe impl Sync for GLContextInner {} @@ -147,9 +148,9 @@ impl EAGLContext { Some(current) => { let is_equal: bool = unsafe { msg_send![¤t, isEqual: &*self.0] }; if is_equal { - unsafe { - gl_bindings::Flush(); - } + // unsafe { + // gl_bindings::Flush(); + // } let nil: *mut NSObject = std::ptr::null_mut(); return msg_send![cls, setCurrentContext: nil]; } @@ -326,13 +327,13 @@ impl GLKView { pub fn set_alpha(&self, alpha: bool) { let layer: Id = unsafe { msg_send_id![&self.0, layer] }; - let _: () = unsafe { msg_send![&layer, setOpaque: alpha] }; + let _: () = unsafe { msg_send![&layer, setOpaque: !alpha] }; } pub fn get_alpha(&self) -> bool { let layer: Id = unsafe { msg_send_id![&self.0, layer] }; let ret: bool = unsafe { msg_send![&layer, isOpaque] }; - ret + !ret } pub fn set_drawable_depth_format(&self, format: GLKViewDrawableDepthFormat) { @@ -472,6 +473,7 @@ impl GLContext { context, sharegroup: share_group, view: Some(view), + transfer_surface_info: Default::default() }; Some(GLContext { @@ -609,4 +611,14 @@ impl GLContext { .map(|v| v.drawable_height().try_into().unwrap_or_default()) .unwrap() } + + pub fn get_transfer_surface_info(&self) -> MappedRwLockReadGuard { + RwLockReadGuard::map(self.inner.read(), |v| &v.transfer_surface_info) + } + + pub fn get_transfer_surface_info_mut( + &self, + ) -> MappedRwLockWriteGuard { + RwLockWriteGuard::map(self.inner.write(), |v| &mut v.transfer_surface_info) + } } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mac.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mac.rs index ab4d6a40f..eab099cac 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mac.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mac.rs @@ -1,5 +1,7 @@ use once_cell::sync::OnceCell; -use parking_lot::RwLock; +use parking_lot::{ + MappedRwLockReadGuard, MappedRwLockWriteGuard, RwLock, RwLockReadGuard, RwLockWriteGuard, +}; use std::ffi::CString; use std::num::NonZeroU32; use std::sync::Arc; @@ -39,6 +41,7 @@ pub struct GLContextInner { display: Option, window: Option, event: Option>, + transfer_surface_info: crate::gl::TransferSurface, } unsafe impl Sync for GLContextInner {} @@ -94,8 +97,7 @@ impl From<&mut ContextAttributes> for ConfigTemplate { .with_alpha_size(if value.get_alpha() { 8 } else { 0 }) .with_depth_size(if value.get_depth() { 16 } else { 0 }) .with_stencil_size(if value.get_stencil() { 8 } else { 0 }) - .with_transparency(value.get_alpha()) - .build(); + .with_transparency(value.get_alpha()); if !value.get_is_canvas() && value.get_antialias() { builder = builder.with_multisampling(4) @@ -113,7 +115,7 @@ impl Into for ContextAttributes { .with_stencil_size(if self.get_stencil() { 8 } else { 0 }) .with_transparency(self.get_alpha()); - if !value.get_is_canvas() && value.get_antialias() { + if !self.get_is_canvas() && self.get_antialias() { builder = builder.with_multisampling(4) } builder @@ -283,11 +285,33 @@ impl GLContext { false } + pub fn create_shared_window_context( + context_attrs: &mut ContextAttributes, + width: i32, + height: i32, + window: RawWindowHandle, + context: &GLContext, + ) -> Option { + GLContext::create_window_context_internal( + context_attrs, width, height, window, Some(context) + ) + } + pub fn create_window_context( context_attrs: &mut ContextAttributes, width: i32, height: i32, window: RawWindowHandle, + ) -> Option { + GLContext::create_window_context_internal(context_attrs, width, height, window, None) + } + + fn create_window_context_internal( + context_attrs: &mut ContextAttributes, + width: i32, + height: i32, + window: RawWindowHandle, + context: Option<&GLContext>, ) -> Option { match unsafe { Display::new(RawDisplayHandle::AppKit(AppKitDisplayHandle::empty())) } { Ok(display) => unsafe { @@ -408,15 +432,24 @@ impl GLContext { .map(SurfaceHelper::Window) .ok(); - let context_attrs = glutin::context::ContextAttributesBuilder::new() - .with_context_api(ContextApi::OpenGl(Some( - if context_attrs.get_is_canvas() { + let mut context_attrs_builder = + glutin::context::ContextAttributesBuilder::new().with_context_api( + ContextApi::OpenGl(Some(if context_attrs.get_is_canvas() { Version::new(2, 1) } else { Version::new(3, 0) - }, - ))) - .build(Some(window)); + })), + ); + + if let Some(context) = context { + let inner = context.inner.read(); + if let Some(context) = inner.context.as_ref() { + context_attrs_builder = + context_attrs_builder.with_context_api(context.context_api()); + } + } + + let context_attrs = context_attrs_builder.build(Some(window)); let context = display .create_context(&config, &context_attrs) @@ -430,6 +463,7 @@ impl GLContext { display: Some(display), window: None, event: None, + transfer_surface_info: Default::default(), })), }) } @@ -574,14 +608,14 @@ impl GLContext { width: i32, height: i32, ) -> Option { - use winit::event::{Event, WindowEvent}; use winit::event_loop::EventLoop; use winit::window::WindowBuilder; - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window_builder = WindowBuilder::new(); let window = window_builder + .with_inner_size(winit::dpi::PhysicalSize::new(width, height)) .with_visible(false) .build(&event_loop) .unwrap(); @@ -600,6 +634,36 @@ impl GLContext { ) } + pub fn create_offscreen_context_with_event_loop( + context_attrs: &mut ContextAttributes, + width: i32, + height: i32, + event_loop: &EventLoop<()>, + ) -> Option { + use winit::window::WindowBuilder; + + let window_builder = WindowBuilder::new(); + + let window = window_builder + .with_inner_size(winit::dpi::PhysicalSize::new(width, height)) + .with_visible(false) + .build(event_loop) + .unwrap(); + + let raw_window_handle = window.raw_window_handle(); + + GLContext::create_window_context(context_attrs, width, height, raw_window_handle).map( + |ctx| { + { + let mut context = ctx.inner.write(); + context.window = Some(window); + context.event = None; + } + ctx + }, + ) + } + fn has_extension(extensions: &str, name: &str) -> bool { !extensions.split(' ').into_iter().any(|s| s == name) } @@ -619,8 +683,6 @@ impl GLContext { } } - - #[inline(always)] pub fn set_vsync(&self, sync: bool) -> bool { let inner = self.inner.read(); @@ -685,7 +747,8 @@ impl GLContext { #[inline(always)] pub fn get_surface_width(&self) -> i32 { let inner = self.inner.read(); - inner.surface + inner + .surface .as_ref() .map(|v| match v { SurfaceHelper::Window(window) => window.width().unwrap_or_default() as i32, @@ -698,7 +761,8 @@ impl GLContext { #[inline(always)] pub fn get_surface_height(&self) -> i32 { let inner = self.inner.read(); - inner.surface + inner + .surface .as_ref() .map(|v| match v { SurfaceHelper::Window(window) => window.height().unwrap_or_default() as i32, @@ -707,4 +771,14 @@ impl GLContext { }) .unwrap_or_default() } + + pub fn get_transfer_surface_info(&self) -> MappedRwLockReadGuard { + RwLockReadGuard::map(self.inner.read(), |v| &v.transfer_surface_info) + } + + pub fn get_transfer_surface_info_mut( + &self, + ) -> MappedRwLockWriteGuard { + RwLockWriteGuard::map(self.inner.write(), |v| &mut v.transfer_surface_info) + } } diff --git a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mod.rs b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mod.rs index c505de253..40c54212a 100644 --- a/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mod.rs +++ b/packages/canvas/src-native/canvas-native/canvas-core/src/gl/mod.rs @@ -1,7 +1,9 @@ #[cfg(target_os = "ios")] mod ios; + #[cfg(target_os = "ios")] pub use ios::*; +use std::ffi::CString; #[cfg(target_os = "macos")] mod mac; @@ -14,3 +16,352 @@ mod android; #[cfg(target_os = "android")] pub use android::*; + +#[cfg(any(target_os = "android", target_os = "ios"))] +const VERTEX_SHADER: &str = " +precision highp float; +attribute vec4 aPosition; +uniform mat4 uTextureMatrix; +varying vec2 TexCoord; +void main(){ +vec2 clipSpace = (1.0 - 2.0 * aPosition.xy); +TexCoord = (uTextureMatrix * aPosition).xy; +gl_Position = vec4(clipSpace, 0.0, 1.0); +} +"; + +#[cfg(target_os = "macos")] +const VERTEX_SHADER: &str = " +#version 330 core +precision highp float; +in vec4 aPosition; +out vec2 TexCoord; +uniform mat4 uTextureMatrix; +void main() { + vec2 clipSpace = (1.0 - 2.0 * aPosition.xy); + TexCoord = (uTextureMatrix * aPosition).xy; + gl_Position = vec4(clipSpace, 0.0, 1.0); +} +"; + +#[cfg(any(target_os = "android", target_os = "ios"))] +const FRAGMENT_SHADER: &str = " + #version 330 core + precision highp float; + varying vec2 TexCoord; +uniform samplerExternalOES uSampler; +void main(){ +gl_FragColor = texture2D(uSampler, TexCoord); +} +"; + +#[cfg(target_os = "macos")] +const FRAGMENT_SHADER: &str = " +#version 330 core + +precision highp float; +in vec2 TexCoord; +uniform sampler2D uSampler; +out vec4 FragColor; + +void main() { +FragColor = texture(uSampler, TexCoord); +} +"; + +const VERTEX_COORDS: [f32; 8] = [0., 0., 1., 0., 0., 1., 1., 1.]; + +#[derive(Copy, Clone, Debug, Default)] +pub struct TransferSurface { + program: u32, + rbo: u32, + fbo: u32, + width: u32, + height: u32, + ab: u32, + pos: i32, + matrix_pos: i32, + sampler_pos: i32, + matrix: [f32; 16], + initialized: bool, +} + +fn get_shader_parameter(shader: u32, pname: u32) -> i32 { + let mut params = 0i32; + unsafe { gl_bindings::GetShaderiv(shader, pname, &mut params) } + params +} + +pub fn get_shader_info_log(shader: u32) -> String { + let mut length = 0i32; + unsafe { gl_bindings::GetShaderiv(shader, gl_bindings::INFO_LOG_LENGTH, &mut length) } + + if length == 0 { + return String::new(); + } + + let mut log = vec![0; length as usize]; + let mut len = 0; + unsafe { + gl_bindings::GetShaderInfoLog( + shader, + length, + &mut len, + log.as_mut_ptr() as *mut std::ffi::c_char, + ) + } + + log.shrink_to(len.try_into().unwrap()); + let c_str = unsafe { std::ffi::CStr::from_ptr(log.as_ptr()) }; + c_str.to_string_lossy().to_string() +} + +impl TransferSurface { + pub fn init(&mut self, texture_id: u32) { + unsafe { + if self.initialized { + return; + } + + self.program = gl_bindings::CreateProgram(); + let vs = gl_bindings::CreateShader(gl_bindings::VERTEX_SHADER); + let vs_source = CString::new(VERTEX_SHADER).unwrap(); + gl_bindings::ShaderSource(vs, 1, &vs_source.as_ptr(), std::ptr::null()); + + let fs = gl_bindings::CreateShader(gl_bindings::FRAGMENT_SHADER); + let fs_source = CString::new(FRAGMENT_SHADER).unwrap(); + + gl_bindings::ShaderSource(fs, 1, &fs_source.as_ptr(), std::ptr::null()); + + gl_bindings::CompileShader(vs); + + // let status = get_shader_parameter(vs, 0x8B81); + // + // if status == 0 { + // println!("Shader compilation failed: {:?}", get_shader_info_log(vs)); + // } + + gl_bindings::CompileShader(fs); + + // let status = get_shader_parameter(fs, 0x8B81); + // + // if status == 0 { + // println!("Shader compilation failed: {:?}", get_shader_info_log(fs)); + // } + + gl_bindings::AttachShader(self.program, vs); + gl_bindings::AttachShader(self.program, fs); + + gl_bindings::LinkProgram(self.program); + + let mut buffers = [0_u32]; + + gl_bindings::GenBuffers(1, buffers.as_mut_ptr()); + self.ab = buffers[0]; + + let mut rbos = [0_u32]; + gl_bindings::GenRenderbuffers(1, rbos.as_mut_ptr()); + self.rbo = rbos[0]; + + let mut fbos = [0_u32]; + gl_bindings::GenFramebuffers(1, fbos.as_mut_ptr()); + self.fbo = fbos[0]; + + // let mut textures = [0_u32]; + // GLES20.glGenTextures(1, textures, 0) + // textureId = textures[0] + + gl_bindings::BindBuffer(gl_bindings::ARRAY_BUFFER, self.ab); + gl_bindings::BufferData( + gl_bindings::ARRAY_BUFFER, + (std::mem::size_of::() * VERTEX_COORDS.len()) as isize, + VERTEX_COORDS.as_ptr() as _, + gl_bindings::STATIC_DRAW, + ); + + let u_sampler = CString::new("uSampler").unwrap(); + let u_texture_matrix = CString::new("uTextureMatrix").unwrap(); + let a_position = CString::new("aPosition").unwrap(); + self.sampler_pos = gl_bindings::GetUniformLocation(self.program, u_sampler.as_ptr()); + self.matrix_pos = + gl_bindings::GetUniformLocation(self.program, u_texture_matrix.as_ptr()); + self.pos = gl_bindings::GetAttribLocation(self.program, a_position.as_ptr()); + + gl_bindings::VertexAttribPointer( + self.pos as u32, + 2, + gl_bindings::FLOAT, + 0, + (2 * std::mem::size_of::()) as _, + std::ptr::null(), + ); + gl_bindings::EnableVertexAttribArray(self.pos as u32); + + let mut previous_texture = [0_i32]; + + gl_bindings::GetIntegerv( + gl_bindings::TEXTURE_BINDING_2D, + previous_texture.as_mut_ptr(), + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, texture_id); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MIN_FILTER, + gl_bindings::LINEAR as _, + ); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MAG_FILTER, + gl_bindings::LINEAR as _, + ); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_S, + gl_bindings::CLAMP_TO_EDGE as _, + ); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_T, + gl_bindings::CLAMP_TO_EDGE as _, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, previous_texture[0] as u32); + + self.initialized = true; + } + } + + pub fn draw_tex_image_2d( + &mut self, + target: u32, + level: i32, + width: u32, + height: u32, + internal_format: i32, + format: i32, + flip_y_webgl: bool, + texture_id: u32, + ) { + let mut previous_texture = -1_i32; + + unsafe { + gl_bindings::GetIntegerv( + gl_bindings::TEXTURE_BINDING_2D, + &mut previous_texture, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, texture_id); + + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MAG_FILTER, + gl_bindings::LINEAR as i32, + ); + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MIN_FILTER, + gl_bindings::LINEAR as i32, + ); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_S, + gl_bindings::CLAMP_TO_EDGE as i32, + ); + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_T, + gl_bindings::CLAMP_TO_EDGE as i32, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, previous_texture as u32); + + + gl_bindings::CopyTexImage2D( + target, + level, + internal_format as u32, + 0, + 0, + width as i32, + height as i32, + 0 + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, previous_texture as u32); + } + + self.width = width; + self.height = height; + } + + + + pub fn draw_tex_sub_image_2d( + &mut self, + target: u32, + level: i32, + xoffset: i32, + yoffset: i32, + width: u32, + height: u32, + flip_y_webgl: bool, + texture_id: u32, + ) { + + let mut previous_texture = -1_i32; + + unsafe { + gl_bindings::GetIntegerv( + gl_bindings::TEXTURE_BINDING_2D, + &mut previous_texture, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, texture_id); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MAG_FILTER, + gl_bindings::LINEAR as i32, + ); + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MIN_FILTER, + gl_bindings::LINEAR as i32, + ); + + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_S, + gl_bindings::CLAMP_TO_EDGE as i32, + ); + gl_bindings::TexParameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_T, + gl_bindings::CLAMP_TO_EDGE as i32, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, previous_texture as u32); + + + gl_bindings::CopyTexSubImage2D( + target, + level, + xoffset, + yoffset, + 0, + 0, + width as i32, + height as i32, + ); + + gl_bindings::BindTexture(gl_bindings::TEXTURE_2D, previous_texture as u32); + } + } +} diff --git a/packages/canvas/src-native/canvas-native/canvas-ios/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-ios/Cargo.toml index e41bd4a60..a08ffa3b6 100644 --- a/packages/canvas/src-native/canvas-native/canvas-ios/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-ios/Cargo.toml @@ -16,9 +16,10 @@ canvas-2d = { path = "../canvas-2d", features = ["gl"] } canvas-webgl = { path = "../canvas-webgl" } canvas-c = { path = "../canvas-c", features = ["2d", "webgl"] } gl-bindings = { path = "../gl-bindings" } -raw-window-handle = "0.5.0" -ureq = "2.8.0" -parking_lot = "0.12.0" +raw-window-handle = "0.5.2" +ureq = "2.9.1" +parking_lot = "0.12.1" once_cell = "1.10.0" utf16string = "0.2.0" -log = "0.4.17" \ No newline at end of file +log = "0.4.17" +env_logger = "0.10.1" \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/canvas-ios/src/lib.rs b/packages/canvas/src-native/canvas-native/canvas-ios/src/lib.rs index ace1a392a..428d0b719 100644 --- a/packages/canvas/src-native/canvas-native/canvas-ios/src/lib.rs +++ b/packages/canvas/src-native/canvas-native/canvas-ios/src/lib.rs @@ -1,22 +1,21 @@ -use std::cell::RefCell; -use std::ffi::{c_longlong, c_void, CStr, CString}; -use std::ops::DerefMut; -use std::os::raw::c_char; -use std::ptr::NonNull; -use parking_lot::RwLock; - use canvas_2d::context::fill_and_stroke_styles::pattern::Repetition; use canvas_2d::utils::image::from_image_slice; -pub use canvas_c::*; use canvas_c::CanvasRenderingContext2D; use canvas_c::PaintStyle; +pub use canvas_c::*; use canvas_core::context_attributes::ContextAttributes; use canvas_core::gl::GLContext; use canvas_core::image_asset::ImageAsset; +use std::ffi::{c_longlong, c_void, CStr, CString}; +use std::ops::DerefMut; +use std::os::raw::c_char; +use std::ptr::NonNull; +use parking_lot::RwLock; + #[allow(non_camel_case_types)] pub(crate) enum iOSView { OffScreen, - OnScreen(NonNull) + OnScreen(NonNull), } #[allow(dead_code)] @@ -27,6 +26,26 @@ pub(crate) struct iOSGLContext { ios_view: iOSView, } +const VERTEX_SHADER: &str = " + precision highp float; + attribute vec4 aPosition; + uniform mat4 uTextureMatrix; + varying vec2 TexCoord; + void main(){ + vec2 clipSpace = (1.0 - 2.0 * aPosition.xy); + TexCoord = aPosition.xy; + gl_Position = vec4(clipSpace, 0.0, 1.0); + } + "; + +const FRAGMENT_SHADER: &str = " + precision highp float; + varying vec2 TexCoord; + uniform sampler2D uSampler; + void main(){ + gl_FragColor = texture2D(uSampler, TexCoord); + } + "; #[no_mangle] pub extern "C" fn canvas_native_init_ios_gl( view: i64, @@ -47,6 +66,8 @@ pub extern "C" fn canvas_native_init_ios_gl( return 0; } + env_logger::init(); + let power_preference = unsafe { CStr::from_ptr(power_preference).to_string_lossy() }; if let Some(ios_view) = NonNull::new(view as *mut c_void) { @@ -64,11 +85,11 @@ pub extern "C" fn canvas_native_init_ios_gl( is_canvas, ); - if let Some(gl_context) = GLContext::create_window_context(&mut attrs, ios_view) { + if let Some(mut gl_context) = GLContext::create_window_context(&mut attrs, ios_view) { return Box::into_raw(Box::new(iOSGLContext { ios_view: iOSView::OnScreen(ios_view), gl_context, - context_attributes: attrs, + context_attributes: attrs })) as i64; } } @@ -121,7 +142,7 @@ pub extern "C" fn canvas_native_init_ios_gl_with_shared_gl( let shared_context = shared_context as *mut iOSGLContext; let shared_context = unsafe { &*shared_context }; - if let Some(gl_context) = GLContext::create_shared_window_context( + if let Some(mut gl_context) = GLContext::create_shared_window_context( &mut attrs, ios_view, &shared_context.gl_context, @@ -137,10 +158,6 @@ pub extern "C" fn canvas_native_init_ios_gl_with_shared_gl( 0 } - - - - #[no_mangle] pub extern "C" fn canvas_native_init_offscreen_ios_gl( width: i32, @@ -178,7 +195,7 @@ pub extern "C" fn canvas_native_init_offscreen_ios_gl( is_canvas, ); - if let Some(gl_context) = GLContext::create_offscreen_context(&mut attrs, width, height) { + if let Some(mut gl_context) = GLContext::create_offscreen_context(&mut attrs, width, height) { return Box::into_raw(Box::new(iOSGLContext { ios_view: iOSView::OffScreen, gl_context, @@ -234,7 +251,7 @@ pub extern "C" fn canvas_native_init_offscreen_ios_gl_with_shared_gl( let shared_context = shared_context as *mut iOSGLContext; let shared_context = unsafe { &*shared_context }; - if let Some(gl_context) = GLContext::create_shared_offscreen_context( + if let Some(mut gl_context) = GLContext::create_shared_offscreen_context( &mut attrs, width, height, @@ -250,7 +267,6 @@ pub extern "C" fn canvas_native_init_offscreen_ios_gl_with_shared_gl( 0 } - #[no_mangle] pub extern "C" fn canvas_native_ios_flush_gl(context: i64) -> bool { if context == 0 { @@ -313,7 +329,7 @@ pub extern "C" fn canvas_native_create_2d_context( gl_bindings::GetIntegerv(gl_bindings::FRAMEBUFFER_BINDING, frame_buffers.as_mut_ptr()) }; - let ctx_2d = CanvasRenderingContext2D::new( + let mut ctx_2d = CanvasRenderingContext2D::new( canvas_2d::context::ContextWrapper::new(canvas_2d::context::Context::new_gl( width as f32, height as f32, @@ -329,6 +345,11 @@ pub extern "C" fn canvas_native_create_2d_context( alpha, ); + { + let mut ctx = ctx_2d.get_context_mut(); + ctx.clear_canvas(); + } + Box::into_raw(Box::new(ctx_2d)) as i64 } @@ -398,6 +419,17 @@ pub extern "C" fn canvas_native_context_2d_test(context: i64) { context.render(); } +#[no_mangle] +pub extern "C" fn canvas_native_gl_make_current(gl_context: i64) { + if gl_context == 0 { + return; + } + let gl_context = gl_context as *mut iOSGLContext; + let gl_context = unsafe { &*gl_context }; + gl_context.gl_context.make_current(); +} + + #[no_mangle] pub extern "C" fn canvas_native_context_2d_test_to_data_url(context: i64) -> *mut c_char { if context == 0 { @@ -440,7 +472,6 @@ pub extern "C" fn canvas_native_imageasset_load_from_bytes( asset.load_from_bytes(bytes) } - #[no_mangle] pub extern "C" fn canvas_native_context_create_pattern_raw( context: i64, diff --git a/packages/canvas/src-native/canvas-native/canvas-webgl/src/prelude.rs b/packages/canvas/src-native/canvas-native/canvas-webgl/src/prelude.rs index dadea39e0..3840be320 100644 --- a/packages/canvas/src-native/canvas-native/canvas-webgl/src/prelude.rs +++ b/packages/canvas/src-native/canvas-native/canvas-webgl/src/prelude.rs @@ -56,7 +56,7 @@ pub enum WebGLExtensionType { WEBGL_depth_texture, WEBGL_draw_buffers, OES_fbo_render_mipmap, - None + None, } #[derive(Copy, Clone, Debug, PartialOrd, PartialEq)] @@ -170,7 +170,7 @@ impl WebGLState { unpack_colorspace_conversion_webgl: WEBGL_BROWSER_DEFAULT_WEBGL as i32, }))); ctx.make_current(); - // crate::webgl::restore_state_after_clear(&mut ctx); + // crate::webgl::restore_state_after_clear(&mut ctx); ctx } @@ -219,12 +219,12 @@ impl WebGLState { flip_y: false, unpack_colorspace_conversion_webgl: WEBGL_BROWSER_DEFAULT_WEBGL as i32, }))); - // crate::webgl::restore_state_after_clear(&mut ctx); + // crate::webgl::restore_state_after_clear(&mut ctx); ctx } #[cfg(target_os = "ios")] - pub fn snapshot(&self) -> Option>{ + pub fn snapshot(&self) -> Option> { self.get().gl_context.snapshot() } @@ -414,6 +414,39 @@ impl WebGLState { pub fn remove_if_current(&self) { self.get().gl_context.remove_if_current(); } + + pub fn init_transfer_surface(&mut self, texture_id: u32) { + let mut lock = self.get(); + lock.gl_context + .get_transfer_surface_info_mut() + .init(texture_id); + } + + pub fn draw_tex_image_2d( + &mut self, + target: u32, + level: i32, + width: u32, + height: u32, + internal_format: i32, + format: i32, + flip_y_webgl: bool, + texture_id: u32, + ) { + let mut lock = self.get(); + lock.gl_context + .get_transfer_surface_info_mut() + .draw_tex_image_2d( + target, + level, + width, + height, + internal_format, + format, + flip_y_webgl, + texture_id, + ); + } } impl Clone for WebGLState { @@ -992,8 +1025,7 @@ impl WebGLExtension for OES_texture_float { } } - -pub struct OES_fbo_render_mipmap{} +pub struct OES_fbo_render_mipmap {} impl OES_fbo_render_mipmap { pub fn new() -> Self { diff --git a/packages/canvas/src-native/canvas-native/canvas-webgl/src/webgl.rs b/packages/canvas/src-native/canvas-native/canvas-webgl/src/webgl.rs index 366114be1..6cbf73b53 100644 --- a/packages/canvas/src-native/canvas-native/canvas-webgl/src/webgl.rs +++ b/packages/canvas/src-native/canvas-native/canvas-webgl/src/webgl.rs @@ -1856,7 +1856,7 @@ pub fn canvas_native_webgl_scissor( pub fn canvas_native_webgl_shader_source(shader: u32, source: &str, state: &mut WebGLState) { state.make_current(); - let src = CString::new(source.as_bytes()).unwrap(); + let src = CString::new(source).unwrap(); unsafe { gl_bindings::ShaderSource(shader, 1, &src.as_ptr(), std::ptr::null()) } } @@ -2335,13 +2335,13 @@ pub fn canvas_native_webgl_tex_sub_image2d( unsafe { gl_bindings::TexSubImage2D( - target as u32, + target, level, xoffset, yoffset, width, height, - format as u32, + format, image_type as u32, buffer.as_ptr() as *const c_void, ); @@ -2351,13 +2351,13 @@ pub fn canvas_native_webgl_tex_sub_image2d( } unsafe { gl_bindings::TexSubImage2D( - target as u32, + target, level, xoffset, yoffset, width, height, - format as u32, + format, image_type as u32, buf.as_ptr() as *const c_void, ); diff --git a/packages/canvas/src-native/canvas-native/my_header.h b/packages/canvas/src-native/canvas-native/my_header.h index 9e4ae93ba..f799a4a91 100644 --- a/packages/canvas/src-native/canvas-native/my_header.h +++ b/packages/canvas/src-native/canvas-native/my_header.h @@ -163,6 +163,8 @@ typedef struct U32Buffer U32Buffer; typedef struct U8Buffer U8Buffer; +typedef struct URL URL; + typedef struct WEBGL_color_buffer_float WEBGL_color_buffer_float; typedef struct WEBGL_compressed_texture_atc WEBGL_compressed_texture_atc; @@ -201,6 +203,10 @@ typedef struct WebGLSync WebGLSync; void canvas_native_image_filter_destroy(struct ImageFilter *value); +void canvas_native_font_add_family(const char *alias, + const char *const *filenames, + uintptr_t length); + void canvas_native_helper_destroy(struct FileHelper *value); struct FileHelper *canvas_native_helper_read_file(const char *path); @@ -285,6 +291,16 @@ const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D void canvas_native_context_set_font(struct CanvasRenderingContext2D *context, const char *font); +const char *canvas_native_context_get_letter_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_letter_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + +const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context, + const char *spacing); + float canvas_native_context_get_global_alpha(const struct CanvasRenderingContext2D *context); void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha); @@ -658,8 +674,13 @@ void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_fill_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_fill_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, float sx, @@ -770,8 +791,13 @@ void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, void canvas_native_context_stroke_text(struct CanvasRenderingContext2D *context, const char *text, float x, - float y, - float width); + float y); + +void canvas_native_context_stroke_text_width(struct CanvasRenderingContext2D *context, + const char *text, + float x, + float y, + float width); void canvas_native_context_transform(struct CanvasRenderingContext2D *context, float a, @@ -2647,4 +2673,54 @@ char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer void canvas_native_string_buffer_destroy(struct StringBuffer *buffer); +bool canvas_url_can_parse(const char *value, const char *base); + +struct URL *canvas_url_create(const char *value, const char *base); + +void canvas_url_destroy(struct URL *url); + +struct CCow *canvas_url_to_string(struct URL *url); + +const char *canvas_url_hash(struct URL *url); + +void canvas_url_set_hash(struct URL *url, const char *hash); + +const char *canvas_url_host(struct URL *url); + +void canvas_url_set_host(struct URL *url, const char *host); + +const char *canvas_url_host_name(struct URL *url); + +void canvas_url_set_host_name(struct URL *url, const char *hostname); + +const char *canvas_url_href(struct URL *url); + +void canvas_url_set_href(struct URL *url, const char *href); + +const char *canvas_url_origin(struct URL *url); + +const char *canvas_url_password(struct URL *url); + +void canvas_url_set_password(struct URL *url, const char *password); + +const char *canvas_url_pathname(struct URL *url); + +void canvas_url_set_pathname(struct URL *url, const char *pathname); + +const char *canvas_url_port(struct URL *url); + +void canvas_url_set_port(struct URL *url, const char *port); + +const char *canvas_url_protocol(struct URL *url); + +void canvas_url_set_protocol(struct URL *url, const char *protocol); + +const char *canvas_url_search(struct URL *url); + +void canvas_url_set_search(struct URL *url, const char *search); + +const char *canvas_url_username(struct URL *url); + +void canvas_url_set_username(struct URL *url, const char *username); + #endif /* CANVAS_C_H */ diff --git a/packages/canvas/src-native/canvas-native/playground/Cargo.toml b/packages/canvas/src-native/canvas-native/playground/Cargo.toml index c1e5e3e24..79ff3109f 100644 --- a/packages/canvas/src-native/canvas-native/playground/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/playground/Cargo.toml @@ -7,12 +7,13 @@ edition = "2021" canvas-core = { path = "../canvas-core" } canvas-webgl = { path = "../canvas-webgl" } canvas-2d = { path = "../canvas-2d", features = ["gl"] } -raw-window-handle = "0.5.0" +gl-bindings = { path = "../gl-bindings" } +raw-window-handle = "0.5.2" rand = "0.8.5" reqwest = { version = "0.11.14", features = ["blocking"] } chrono = "0.4.23" -#[target.'cfg(any(target_os = "macos", target_os = "android"))'.dependencies] -#glutin = "0.30.4" -#winit = "0.28.1" -#glutin-winit = "0.3.0" \ No newline at end of file +[target.'cfg(any(target_os = "macos", target_os = "android"))'.dependencies] +winit = "0.29.4" +glutin-winit = "0.4.2" +glutin = "0.31.1" \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/playground/src/fs.txt b/packages/canvas/src-native/canvas-native/playground/src/fs.txt new file mode 100644 index 000000000..b37f1ccc5 --- /dev/null +++ b/packages/canvas/src-native/canvas-native/playground/src/fs.txt @@ -0,0 +1,5 @@ +#version 330 core +precision highp float; +uniform vec4 u_color; +out vec4 fragColor; +void main() {fragColor = u_color;} \ No newline at end of file diff --git a/packages/canvas/src-native/canvas-native/playground/src/main.rs b/packages/canvas/src-native/canvas-native/playground/src/main.rs index c2761eb6f..807762a4a 100644 --- a/packages/canvas/src-native/canvas-native/playground/src/main.rs +++ b/packages/canvas/src-native/canvas-native/playground/src/main.rs @@ -1,6 +1,8 @@ +use std::ffi::{CStr, CString}; use std::fmt::Formatter; use std::io::Read; use std::num::NonZeroU32; +use std::string::ToString; use std::sync::Arc; use std::time::{Instant, SystemTime}; @@ -25,18 +27,523 @@ use canvas_2d::context::compositing::composite_operation_type::CompositeOperatio use canvas_2d::context::drawing_paths::fill_rule::FillRule; use canvas_2d::context::fill_and_stroke_styles::paint::PaintStyle; use canvas_2d::context::line_styles::line_cap::LineCap; +use canvas_2d::context::text_styles::text_align::TextAlign; use canvas_2d::context::{Context, ContextWrapper}; +use canvas_2d::to_data_url; use canvas_core::context_attributes::ContextAttributes; -use canvas_core::gl::GLContext; +use canvas_core::gl::{get_shader_info_log, GLContext}; use canvas_core::image_asset::ImageAsset; use canvas_webgl::prelude::{WebGLResult, WebGLState, WebGLVersion}; +use canvas_webgl::webgl::{ + canvas_native_webgl_attach_shader, canvas_native_webgl_bind_buffer, + canvas_native_webgl_bind_texture, canvas_native_webgl_buffer_data, + canvas_native_webgl_buffer_data_f32, canvas_native_webgl_clear, + canvas_native_webgl_clear_color, canvas_native_webgl_compile_shader, + canvas_native_webgl_create_buffer, canvas_native_webgl_create_program, + canvas_native_webgl_create_shader, canvas_native_webgl_create_texture, + canvas_native_webgl_delete_program, canvas_native_webgl_delete_shader, + canvas_native_webgl_draw_arrays, canvas_native_webgl_enable_vertex_attrib_array, + canvas_native_webgl_get_attrib_location, canvas_native_webgl_get_error, + canvas_native_webgl_get_program_info_log, canvas_native_webgl_get_program_parameter, + canvas_native_webgl_get_shader_info_log, canvas_native_webgl_get_shader_parameter, + canvas_native_webgl_get_tex_parameter, canvas_native_webgl_get_uniform_location, + canvas_native_webgl_link_program, canvas_native_webgl_pixel_storei, + canvas_native_webgl_shader_source, canvas_native_webgl_tex_image2d, + canvas_native_webgl_tex_image2d_asset, canvas_native_webgl_tex_parameteri, + canvas_native_webgl_uniform2f, canvas_native_webgl_uniform4fv, canvas_native_webgl_use_program, + canvas_native_webgl_vertex_attrib_pointer, canvas_native_webgl_viewport, +}; +use canvas_webgl::webgl2::{canvas_native_webgl2_bind_vertex_array, canvas_native_webgl2_create_vertex_array}; + +// Vertex and fragment shaders + +// Function to compile a shader +fn compile_shader(state: &mut WebGLState, source: &str, shader_type: u32) -> u32 { + let shader = canvas_native_webgl_create_shader(shader_type, state); + canvas_native_webgl_shader_source(shader, source, state); + canvas_native_webgl_compile_shader(shader, state); + + match canvas_native_webgl_get_shader_parameter(shader, 0x8B81, state) { + WebGLResult::Boolean(status) => { + if !status { + println!( + "Shader compilation failed: {:?}", + canvas_native_webgl_get_shader_info_log(shader, state) + ); + canvas_native_webgl_delete_shader(shader, state); + return 0; + } + } + _ => {} + } + + return shader; +} + +// Function to link a program +fn link_program(state: &mut WebGLState, vertex_shader: u32, fragment_shader: u32) -> u32 { + let program = canvas_native_webgl_create_program(state); + canvas_native_webgl_attach_shader(program, vertex_shader, state); + canvas_native_webgl_attach_shader(program, fragment_shader, state); + canvas_native_webgl_link_program(program, state); + + match canvas_native_webgl_get_program_parameter(program, 0x8B82, state) { + WebGLResult::Boolean(result) => { + if !result { + println!( + "Program linking failed: {:?}", + canvas_native_webgl_get_program_info_log(program, state) + ); + return 0; + } + } + _ => {} + } + + return program; +} + +// Function to set the rectangle vertices +fn set_rectangle(state: &mut WebGLState, x: f32, y: f32, width: f32, height: f32) { + let vertices = [ + x, + y, + x + width, + y, + x, + y + height, + x, + y + height, + x + width, + y, + x + width, + y + height, + ]; + canvas_native_webgl_buffer_data_f32(0x8892, &vertices, 0x88E4, state); +} + +fn test(state: &mut WebGLState, gl_state: &mut WebGLState, ctx_2d: &mut ContextWrapper) { + // Compile shaders + + let fs = include_str!("./fs.txt"); + let vs = include_str!("./vs.txt"); + + let fragment_shader = compile_shader(state, fs, 0x8B30); + + let vertex_shader = compile_shader(state, vs, 0x8B31); + + // Link shaders into a program + let program = link_program(state, vertex_shader, fragment_shader); + + // Get attribute and uniform locations + let position_attribute_location = + canvas_native_webgl_get_attrib_location(program, "a_position", state); + let color_uniform_location = + canvas_native_webgl_get_uniform_location(program, "u_color", state); + + // Create a buffer and set the position data + let position_buffer = canvas_native_webgl_create_buffer(state); + canvas_native_webgl_bind_buffer(0x8892, position_buffer, state); + + set_rectangle( + state, + 0., + 0., + state.get_drawing_buffer_width() as f32, + state.get_drawing_buffer_height() as f32, + ); + + canvas_native_webgl_clear_color(1.0, 1.0, 1.0, 1.0, state); + canvas_native_webgl_clear(0x00004000, state); + + canvas_native_webgl_use_program(program, state); + + canvas_native_webgl_bind_buffer(0x8892, position_buffer, state); + + // Tell the attribute how to get data out of the position buffer + let size = 2; // 2 components per iteration + let ttype = 0x1406; // the data is 32bit floats + let normalize = false; // don't normalize the data + let stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position + let offset = 0; // start at the beginning of the buffer + + canvas_native_webgl_vertex_attrib_pointer( + position_attribute_location as u32, + size, + ttype, + normalize, + stride, + offset, + state, + ); + + dbg!("webgl error {}", canvas_native_webgl_get_error(state)); + + canvas_native_webgl_enable_vertex_attrib_array(position_attribute_location as u32, state); + + dbg!("webgl error {}", canvas_native_webgl_get_error(state)); + + canvas_native_webgl_uniform4fv(color_uniform_location, &[1.0, 1.0, 1.0, 1.0], state); + + // Draw the rectangle + let primitive_type = 0x0004; + let offset_draw = 0; + let count = 6; + + canvas_native_webgl_draw_arrays(primitive_type, offset_draw, count, state); + + let w = gl_state.drawing_buffer_width(); + let h = gl_state.drawing_buffer_height(); + + // state.remove_if_current(); + gl_state.make_current(); + + let mut ctx = ctx_2d.get_context_mut(); + + ctx.set_font("30px Arial"); + + let fill_style = PaintStyle::new_color_str("white").unwrap(); + ctx.set_fill_style(fill_style); + ctx.rect(0., 0., w as f32, h as f32); + ctx.fill(None); + + let fill_style = PaintStyle::new_color_str("red").unwrap(); + ctx.set_fill_style(fill_style); + ctx.fill_text("Hello, WebGL!", 50., 50., None); + + // ctx.flush_and_sync_cpu(); + // + // gl_state.swap_buffers(); + + let (_, texture_id) = ctx.snapshot_with_texture_id(); + + // let mut buf = ctx.read_pixels(); + // drop(ctx); + + // dbg!(to_data_url(ctx_2d, "image/jpg", 100)); + + // gl_state.remove_if_current(); + state.make_current(); + + gl_state.init_transfer_surface(texture_id); + + gl_state.draw_tex_image_2d( + 0x0DE1, 0, w as u32, h as u32, 0x1908, 0x1908, false, texture_id, + ); + + // canvas_native_webgl_tex_image2d( + // 0x0DE1, + // 0, + // 0x1908, + // w, + // h, + // 0, + // 0x1908, + // 0x1401, + // buf.as_slice(), + // state, + // ); + + canvas_native_webgl_draw_arrays(primitive_type, offset_draw, count, state); +} + +fn leaves(state: &mut WebGLState, gl_state: &mut WebGLState, ctx_2d: &mut ContextWrapper) { + let drawingBufferWidth = state.get_drawing_buffer_width(); + let drawingBufferHeight = state.get_drawing_buffer_height(); + + let vertexShader2d = " + #version 330 +in vec2 a_texCoord; + in vec2 a_position; + + +uniform vec2 u_resolution; + +out vec2 v_texCoord; + +void main() { + // convert the rectangle from pixels to 0.0 to 1.0 + vec2 zeroToOne = a_position / u_resolution; + + // convert from 0->1 to 0->2 + vec2 zeroToTwo = zeroToOne * 2.0; + + // convert from 0->2 to -1->+1 (clipspace) + vec2 clipSpace = zeroToTwo - 1.0; + + gl_Position = vec4(clipSpace * vec2(1, -1), 0, 1); + + // pass the texCoord to the fragment shader + // The GPU will interpolate this value between points. + v_texCoord = a_texCoord; +}"; + + let fragmentShader2d = " + #version 330 + precision mediump float; + +// our texture +uniform sampler2D u_image; + +// the texCoords passed in from the vertex shader. +in vec2 v_texCoord; + +out vec4 FragColor; + +void main() { + FragColor = texture(u_image, v_texCoord); +}"; + + fn set_rectangle(state: &mut WebGLState, x: f32, y: f32, width: f32, height: f32) { + let x1 = x; + let x2 = x + width; + let y1 = y; + let y2 = y + height; + canvas_native_webgl_buffer_data_f32( + gl_bindings::ARRAY_BUFFER, + &[x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2], + gl_bindings::STATIC_DRAW, + state, + ); + } + + // function main() { + // const asset = new global.ImageAsset(); + // asset.fromUrl("https://webglfundamentals.org/webgl/resources/leaves.jpg") + // .then(image =>{ + // render(asset); + // }); + // } + + // setup GLSL program + let program = create_program_from_scripts( + state, + [ + (vertexShader2d, gl_bindings::VERTEX_SHADER), + (fragmentShader2d, gl_bindings::FRAGMENT_SHADER), + ], + ) + .unwrap(); + + // look up where the vertex data needs to go. + let position_location = canvas_native_webgl_get_attrib_location(program, "a_position", state); + let texcoord_location = canvas_native_webgl_get_attrib_location(program, "a_texCoord", state); + + // Create a buffer to put three 2d clip space points in + let positionBuffer = canvas_native_webgl_create_buffer(state); + + // Bind it to ARRAY_BUFFER (think of it as ARRAY_BUFFER = positionBuffer) + canvas_native_webgl_bind_buffer(gl_bindings::ARRAY_BUFFER, positionBuffer, state); + + let width; + let height; + + { + let ctx = ctx_2d.get_context(); + width = ctx.device().width; + height = ctx.device().height; + } + + // Set a rectangle the same size as the image. + set_rectangle(state, 0., 0., width, height); + + // provide texture coordinates for the rectangle. + let texcoordBuffer = canvas_native_webgl_create_buffer(state); + canvas_native_webgl_bind_buffer(gl_bindings::ARRAY_BUFFER, texcoordBuffer, state); + canvas_native_webgl_buffer_data_f32( + gl_bindings::ARRAY_BUFFER, + &[0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0], + gl_bindings::STATIC_DRAW, + state, + ); + + // Create a texture. + let texture = canvas_native_webgl_create_texture(state); + canvas_native_webgl_bind_texture(gl_bindings::TEXTURE_2D, texture, state); + + canvas_native_webgl_tex_parameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_S, + gl_bindings::CLAMP_TO_EDGE as i32, + state, + ); + canvas_native_webgl_tex_parameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_WRAP_T, + gl_bindings::CLAMP_TO_EDGE as i32, + state, + ); + + canvas_native_webgl_tex_parameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MIN_FILTER, + gl_bindings::NEAREST as i32, + state, + ); + canvas_native_webgl_tex_parameteri( + gl_bindings::TEXTURE_2D, + gl_bindings::TEXTURE_MAG_FILTER, + gl_bindings::NEAREST as i32, + state, + ); + + gl_state.make_current(); + + let mut ctx = ctx_2d.get_context_mut(); + + ctx.set_font("30px Arial"); + + let fill_style = PaintStyle::new_color_str("white").unwrap(); + ctx.set_fill_style(fill_style); + ctx.rect(0., 0., width, height); + ctx.fill(None); + + let fill_style = PaintStyle::new_color_str("red").unwrap(); + ctx.set_fill_style(fill_style); + ctx.fill_text("Hello, WebGL!", 50., 50., None); + + // let d = ctx.read_pixels(); + + let (_, texture_id) = ctx.snapshot_with_texture_id(); + + state.make_current(); + + // gl_state.init_transfer_surface(texture_id); + + gl_state.draw_tex_image_2d( + gl_bindings::TEXTURE_2D, + 0, + width as u32, + height as u32, + gl_bindings::RGBA as i32, + gl_bindings::RGBA as i32, + false, + texture_id, + ); + + + /* + let mut asset = ImageAsset::new(); + let bytes = include_bytes!("./svh.jpeg"); + asset.load_from_bytes(bytes); + */ + + // Upload the image into the texture. + + // canvas_native_webgl_tex_image2d_asset( + // gl_bindings::TEXTURE_2D as i32, + // 0, + // gl_bindings::RGBA as i32, + // gl_bindings::RGBA as i32, + // gl_bindings::UNSIGNED_BYTE as i32, + // &asset, + // state, + // ); + + // canvas_native_webgl_tex_image2d( + // gl_bindings::TEXTURE_2D as i32, + // 0, + // gl_bindings::RGBA as i32, + // width as i32, height as i32, + // 0, + // gl_bindings::RGBA as i32, + // gl_bindings::UNSIGNED_BYTE as i32, + // d.as_slice(), + // state, + // ); + + + // lookup uniforms + let resolutionLocation = + canvas_native_webgl_get_uniform_location(program, "u_resolution", state); + + // webglUtils.resizeCanvasToDisplaySize(gl.canvas); + + // Tell WebGL how to convert from clip space to pixels + canvas_native_webgl_viewport(0, 0, drawingBufferWidth, drawingBufferHeight, state); + + canvas_native_webgl_clear_color(0., 0., 0., 0., state); + // Clear the canvas + canvas_native_webgl_clear(gl_bindings::COLOR_BUFFER_BIT, state); + + // Tell it to use our program (pair of shaders) + canvas_native_webgl_use_program(program, state); + + // opengl needs this one newer versions + // https://stackoverflow.com/a/24644675 + let vaoId = canvas_native_webgl2_create_vertex_array(state); + canvas_native_webgl2_bind_vertex_array(vaoId, state); + + + // Turn on the position attribute + canvas_native_webgl_enable_vertex_attrib_array(position_location as u32, state); + + // Bind the position buffer. + canvas_native_webgl_bind_buffer(gl_bindings::ARRAY_BUFFER, positionBuffer, state); + + // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) + let size = 2; // 2 components per iteration + let ttype = gl_bindings::FLOAT; // the data is 32bit floats + let normalize = false; // don't normalize the data + let stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position + let offset = 0; // start at the beginning of the buffer + + canvas_native_webgl_vertex_attrib_pointer( + position_location as u32, + size, + ttype, + normalize, + stride, + offset, + state, + ); + + + // Turn on the teccord attribute + canvas_native_webgl_enable_vertex_attrib_array(texcoord_location as u32, state); + + // Bind the position buffer. + canvas_native_webgl_bind_buffer(gl_bindings::ARRAY_BUFFER, texcoordBuffer, state); + + + + // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) + let size = 2; // 2 components per iteration + let ttype = gl_bindings::FLOAT; // the data is 32bit floats + let normalize = false; // don't normalize the data + let stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position + let offset = 0; // start at the beginning of the buffer + canvas_native_webgl_vertex_attrib_pointer( + texcoord_location as u32, + size, + ttype, + normalize, + stride, + offset, + state, + ); + + // set the resolution + canvas_native_webgl_uniform2f( + resolutionLocation, + drawingBufferWidth as f32, + drawingBufferHeight as f32, + state, + ); + + // Draw the rectangle. + let primitive_type = gl_bindings::TRIANGLES; + let offset = 0; + let count = 6; + + canvas_native_webgl_draw_arrays(primitive_type, offset, count, state); +} fn main() { - let event_loop = EventLoop::new(); + let event_loop = EventLoop::new().unwrap(); let window_builder = WindowBuilder::new(); let mut asset = ImageAsset::new(); - let window = window_builder .with_title("CanvasNative Demo") .build(&event_loop) @@ -45,43 +552,50 @@ fn main() { let raw_window_handle = window.raw_window_handle(); let mut attrs = ContextAttributes::default(); + attrs.set_antialias(false); let size = window.inner_size(); - let context = GLContext::create_window_context( + let ocontext = GLContext::create_offscreen_context_with_event_loop( &mut attrs, size.width as i32, size.height as i32, - raw_window_handle, + &event_loop, ); + let owebgl = ocontext.unwrap(); + let context = GLContext::create_shared_window_context( + &mut attrs, + size.width as i32, + size.height as i32, + raw_window_handle, + &owebgl, + ); let webgl = context.unwrap(); - let mut gl_state = WebGLState::new_with_context(webgl, WebGLVersion::V2); - /*let value = match canvas_webgl::webgl::canvas_native_webgl_get_parameter(36006, &mut gl_state) { - WebGLResult::U32(value) => value as i32, - WebGLResult::I32(value) => value, - _ => 0, - }; - - let mut done = false; - - let mut ctx_2d = ContextWrapper::new(Context::new_gl( - size.width as f32, - size.height as f32, - 1., - value, - 0, - true, - value, - 0., - canvas_2d::context::text_styles::text_direction::TextDirection::LTR, - )); - */ + // let value = match canvas_webgl::webgl::canvas_native_webgl_get_parameter(36006, &mut gl_state) { + // WebGLResult::U32(value) => value as i32, + // WebGLResult::I32(value) => value, + // _ => 0, + // }; + + // let mut done = false; + + // let mut ctx_2d = ContextWrapper::new(Context::new_gl( + // size.width as f32, + // size.height as f32, + // 1., + // value, + // 0, + // true, + // value, + // 0., + // canvas_2d::context::text_styles::text_direction::TextDirection::LTR, + // )); // { // let mut ctx = ctx_2d.get_context_mut(); @@ -145,16 +659,47 @@ fn main() { // triangle(&mut gl_state); + let mut done = false; + + let mut gl_state_other = WebGLState::new_with_context(owebgl, WebGLVersion::V2); + gl_state_other.make_current(); - event_loop.run(move |event, target, control_flow| { - control_flow.set_wait(); + let value = + match canvas_webgl::webgl::canvas_native_webgl_get_parameter(36006, &mut gl_state_other) { + WebGLResult::U32(value) => value as i32, + WebGLResult::I32(value) => value, + _ => 0, + }; + + let w = gl_state_other.drawing_buffer_width(); + let h = gl_state_other.drawing_buffer_height(); + + let mut ctx_2d = ContextWrapper::new(Context::new_gl( + w as f32, + h as f32, + 1., + value, + 0, + true, + 0, + 0., + canvas_2d::context::text_styles::text_direction::TextDirection::LTR, + )); + + event_loop.run(move |event, target| { match event { Event::NewEvents(_) => {} Event::WindowEvent { event, .. } => { match event { WindowEvent::Resized(resized) => { - canvas_webgl::webgl::canvas_native_webgl_viewport(0, 0, resized.width as i32, resized.height as i32, &gl_state); + canvas_webgl::webgl::canvas_native_webgl_viewport( + 0, + 0, + resized.width as i32, + resized.height as i32, + &gl_state, + ); // window.request_redraw(); // @@ -163,65 +708,110 @@ fn main() { // gl_state.swap_buffers(); } WindowEvent::CloseRequested => { - control_flow.set_exit(); + //control_flow.set_exit(); + } + WindowEvent::RedrawRequested => { + if !done { + window.request_redraw(); + + canvas_native_webgl_clear_color(1., 1., 1., 1., &mut gl_state); + + canvas_native_webgl_clear(16384, &mut gl_state); + + // test(&mut gl_state, &mut gl_state_other, &mut ctx_2d); + + let mut ctx = ctx_2d.get_context_mut(); + + ctx.fill_text(" ", 0., 0., None); + + // leaves(&mut gl_state, &mut gl_state_other, &mut ctx_2d); + + done = true; + + gl_state.swap_buffers(); + } + + // rainbow_octopus(&mut ctx_2d, &mut ro); + + // if let (Some(sun), Some(moon), Some(earth)) = (sun.as_ref(), moon.as_ref(), earth.as_ref()) { + // solar(&ctx_2d, earth, moon, sun, fill.clone(), stroke.clone()) + // } + + // { + // clock(&mut ctx_2d); + // } + + //swarm(&mut ctx_2d, &mut particles, particle_count); + + // colorRain(&mut ctx_2d, &mut colors, &mut dots, &mut dots_vel); + + /* + + if let Some(color) = PaintStyle::new_color_str("red") { + { + let mut ctx = ctx_2d.get_context_mut(); + // colorRain(&mut ctx_2d, &mut colors, &mut dots, &mut dots_vel); + let bg = PaintStyle::new_color_str("white").unwrap(); + let black = PaintStyle::new_color_str("black").unwrap(); + ctx.set_fill_style(bg); + let device = *ctx.device(); + ctx.rect(0., 0., device.width, device.height); + ctx.fill(None); + ctx.set_fill_style(black); + + // Create a red line in position 150 + ctx.set_stroke_style(color); + ctx.move_to(150., 20.); + ctx.line_to(150., 170.); + ctx.stroke(None); + + ctx.set_font("15px Arial"); + + // Show the different textAlign values + ctx.set_text_align(TextAlign::START); + ctx.fill_text("textAlign = start", 150., 60., None); + ctx.set_text_align(TextAlign::END); + ctx.fill_text("textAlign = end", 150., 80., None); + ctx.set_text_align(TextAlign::LEFT); + ctx.fill_text("textAlign = left", 150., 100., None); + ctx.set_text_align(TextAlign::CENTER); + ctx.fill_text("textAlign = center", 150., 120., None); + ctx.set_text_align(TextAlign::RIGHT); + ctx.fill_text("textAlign = right", 150., 140., None); + + ctx.flush(); + } + + // println!("{}", canvas_2d::to_data_url(&mut ctx_2d, "image/jpg", 100)) + } + + */ + // + // ctx_2d.fill_rect_xywh(0., 0., 300., 300.); + // ctx_2d.get_context_mut().flush(); + //ctx_2d.flush(); + + // canvas_webgl::webgl::canvas_native_webgl_clear_color(1.0, 1.0, 0.0, 1.0, &mut gl_state); + // + // let start = Instant::now(); + // canvas_webgl::webgl::canvas_native_webgl_clear(canvas_webgl::webgl::COLOR_BUFFER_BIT, &mut gl_state); + // let end = Instant::now() - start; + // + // println!("clear {:?}", end.as_millis()); + // canvas_webgl::webgl::canvas_native_webgl_draw_arrays(canvas_webgl::webgl::TRIANGLES, 0, 3, &mut gl_state); + + // canvas_webgl::webgl::canvas_native_webgl_draw_arrays(canvas_webgl::webgl::POINTS, 0, 1, &mut gl_state); + + // gl_state.swap_buffers(); } _ => {} } } - Event::RedrawEventsCleared => { - // canvas_webgl::webgl::canvas_native_webgl_clear_color( - // 1., 0.2, 0.3, 1., &mut gl_state, - // ); - // - // - // canvas_webgl::webgl::canvas_native_webgl_clear( - // 16384, &mut gl_state, - // ); - - window.request_redraw(); - - // rainbow_octopus(&mut ctx_2d, &mut ro); - - // if let (Some(sun), Some(moon), Some(earth)) = (sun.as_ref(), moon.as_ref(), earth.as_ref()) { - // solar(&ctx_2d, earth, moon, sun, fill.clone(), stroke.clone()) - // } - - // clock(&mut ctx_2d); - - //swarm(&mut ctx_2d, &mut particles, particle_count); - - // colorRain(&mut ctx_2d, &mut colors, &mut dots, &mut dots_vel); - - // if let Some(color) = PaintStyle::new_color_str("red") { - // ctx_2d.set_fill_style(color); - // ctx_2d.set_font("100px san-serif"); - // ctx_2d.fill_text("Look Some red text", 350., 300., -1.); - // } - // - // ctx_2d.fill_rect_xywh(0., 0., 300., 300.); - // ctx_2d.get_context_mut().flush(); - //ctx_2d.flush(); - - // canvas_webgl::webgl::canvas_native_webgl_clear_color(1.0, 1.0, 0.0, 1.0, &mut gl_state); - // - // let start = Instant::now(); - // canvas_webgl::webgl::canvas_native_webgl_clear(canvas_webgl::webgl::COLOR_BUFFER_BIT, &mut gl_state); - // let end = Instant::now() - start; - // - // println!("clear {:?}", end.as_millis()); - // canvas_webgl::webgl::canvas_native_webgl_draw_arrays(canvas_webgl::webgl::TRIANGLES, 0, 3, &mut gl_state); - - // canvas_webgl::webgl::canvas_native_webgl_draw_arrays(canvas_webgl::webgl::POINTS, 0, 1, &mut gl_state); - - gl_state.swap_buffers(); - } Event::Resumed => {} _ => {} } }); - - /* #[cfg(target_os = "macos")] @@ -1022,3 +1612,68 @@ fn solar( ctx.draw_image_asset_dx_dy_dw_dh(sun, 0., 0., 300., 300.); } + +fn create_program_from_scripts( + state: &mut WebGLState, + shader_sources: [(&str, u32); 2], +) -> Option { + // setup GLSL programs + + let mut shaders = vec![]; + + for (source, shader_type) in shader_sources { + unsafe { + let shader = canvas_native_webgl_create_shader(shader_type, state); + + canvas_native_webgl_shader_source(shader, source, state); + canvas_native_webgl_compile_shader(shader, state); + + let compiled = canvas_native_webgl_get_shader_parameter( + shader, + gl_bindings::COMPILE_STATUS, + state, + ); + + match compiled { + WebGLResult::Boolean(compiled) => { + if !compiled { + // Something went wrong during compilation; get the error + let last_error = get_shader_info_log(shader); + println!("*** Error compiling shader '{}': {:?}", shader, last_error); + canvas_native_webgl_delete_shader(shader, state); + return None; + } + + shaders.push(shader); + } + _ => {} + } + } + } + + let program = canvas_native_webgl_create_program(state); + + for shader in shaders { + canvas_native_webgl_attach_shader(program, shader, state); + } + + canvas_native_webgl_link_program(program, state); + + // Check the link status + let linked = + canvas_native_webgl_get_program_parameter(program, gl_bindings::LINK_STATUS, state); + + match linked { + WebGLResult::Boolean(linked) => { + if !linked { + let last_error = canvas_native_webgl_get_program_info_log(program, state); + println!("Error in program linking: {last_error}"); + canvas_native_webgl_delete_program(program, state); + return None; + } + } + _ => {} + } + + Some(program) +} diff --git a/packages/canvas/src-native/canvas-native/playground/src/vs.txt b/packages/canvas/src-native/canvas-native/playground/src/vs.txt new file mode 100644 index 000000000..daa561d63 --- /dev/null +++ b/packages/canvas/src-native/canvas-native/playground/src/vs.txt @@ -0,0 +1,8 @@ +#version 330 core +precision highp float; + +in vec4 a_position; + +void main() { + gl_Position = a_position; +} \ No newline at end of file diff --git a/tools/demo/canvas-three/index.ts b/tools/demo/canvas-three/index.ts index 2084b85b2..78b039723 100644 --- a/tools/demo/canvas-three/index.ts +++ b/tools/demo/canvas-three/index.ts @@ -69,6 +69,8 @@ export class DemoSharedCanvasThree extends DemoSharedBase { //init(this.canvas); + this.topDown(this.canvas); + // (canvas as any).scaleX = -1; //this.group(this.canvas); //this.geoTextShapes(this.canvas); @@ -113,6 +115,62 @@ export class DemoSharedCanvasThree extends DemoSharedBase { //ghost_card(this.canvas); } + topDown(canvas) { + const context = canvas.getContext('webgl2'); + const gridHelper = new THREE.GridHelper(40, 20, 16777215, 16777215); + const width = this.canvas.width as number; + const height = this.canvas.height as number; + const scene = new THREE.Scene(); + + scene.rotation.x = (45 * Math.PI) / 180; + + scene.add(gridHelper); + scene.add(new THREE.AmbientLight(0xaaaaaa)); + + const light = new THREE.SpotLight(0xffffff, 10000); + light.position.set(0, 25, 50); + light.angle = Math.PI / 5; + + light.shadow.camera.near = 0.1; + light.shadow.camera.far = 100; + light.shadow.mapSize.width = width; + light.shadow.mapSize.height = height; + + scene.add(light); + + scene.background = new THREE.Color('black'); + const aspect = width / height; + const frustumSize = 20; + const camera = new THREE.OrthographicCamera((frustumSize * aspect) / -2, (frustumSize * aspect) / 2, frustumSize / 2, frustumSize / -2, 0.1, 100); + + const renderer = new THREE.WebGLRenderer({ context, alpha: true }); + + // renderer.outputColorSpace = THREE.SRGBColorSpace; + renderer.setPixelRatio(window.devicePixelRatio); + renderer.setSize(width, height); + // renderer.setAnimationLoop(this.animate.bind(this)); + + const cameraControls = new OrbitControls(camera, this.canvas as any); + // cameraControls.maxPolarAngle = Math.PI * 0.5; + // cameraControls.minDistance = 3; + // cameraControls.maxDistance = 8; + cameraControls.enableRotate = false; + cameraControls.enablePan = true; + // cameraControls.enableZoom = true; + + function render() { + renderer.render(scene, camera); + } + + function animate() { + requestAnimationFrame(animate); + + render(); + } + + animate(); + } + webgl_postprocessing_unreal_bloom(canvas) { const context = canvas.getContext('webgl2'); @@ -1275,10 +1333,11 @@ export class DemoSharedCanvasThree extends DemoSharedBase { // shadow var shadow = document.createElement('canvas'); - shadow.width = 128; - shadow.height = 128; + shadow.width = 256; + shadow.height = 256; var context = shadow.getContext('2d', { alpha: true }); + var gradient = context.createRadialGradient(shadow.width / 2, shadow.height / 2, 0, shadow.width / 2, shadow.height / 2, shadow.width / 2); gradient.addColorStop(0.1, 'rgba(210,210,210,1)'); gradient.addColorStop(1, 'rgba(255,255,255,1)'); @@ -1289,7 +1348,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { var shadowTexture = new THREE.CanvasTexture(shadow); var shadowMaterial = new THREE.MeshBasicMaterial({ map: shadowTexture }); - var shadowGeo = new THREE.PlaneGeometry(300, 300, 1, 1); + var shadowGeo = new THREE.PlaneGeometry(600, 600, 1, 1); var shadowMesh; @@ -1365,9 +1424,9 @@ export class DemoSharedCanvasThree extends DemoSharedBase { var wireframe = new THREE.Mesh(geometry3, wireframeMaterial); mesh.add(wireframe); scene.add(mesh); - const gl = canvas.getContext('webgl2', { antialias: false }) as WebGL2RenderingContext; + const gl = canvas.getContext('webgl2', { alpha: true, antialias: false }) as WebGL2RenderingContext; - renderer = new THREE.WebGLRenderer({ context: gl, antialias: false }); + renderer = new THREE.WebGLRenderer({ context: gl, antialias: false, alpha: true }); renderer.setPixelRatio(window.devicePixelRatio); renderer.setSize(width, height); diff --git a/tools/demo/canvas/canvas2d/mdn.ts b/tools/demo/canvas/canvas2d/mdn.ts index 1385bc437..e25937e2a 100644 --- a/tools/demo/canvas/canvas2d/mdn.ts +++ b/tools/demo/canvas/canvas2d/mdn.ts @@ -273,16 +273,18 @@ export function multiStrokeStyle(canvas) { } export function textAlign(canvas) { - const ctx = canvas.getContext('2d'); canvas.width = 350; + const ctx = canvas.getContext('2d'); + const x = canvas.width / 2; + ctx.strokeStyle = 'red'; ctx.beginPath(); ctx.moveTo(x, 0); ctx.lineTo(x, canvas.height); ctx.stroke(); - ctx.font = '30px serif'; + ctx.font = '30px creepster'; ctx.textAlign = 'left'; ctx.fillText('left-aligned', x, 40); diff --git a/tools/demo/canvas/index.ts b/tools/demo/canvas/index.ts index 0baf7d59c..a8c24afd2 100644 --- a/tools/demo/canvas/index.ts +++ b/tools/demo/canvas/index.ts @@ -53,12 +53,13 @@ import { } from './canvas2d'; const Chart = require('chart.js').Chart; //const CanvasWorker = require('nativescript-worker-loader!./canvas.worker.js'); -import { handleVideo, cancelInteractiveCube, cancelMain, cubeRotation, cubeRotationRotation, drawElements, drawModes, imageFilter, interactiveCube, main, textures, points, triangle, scaleTriangle } from './webgl'; +import { handleVideo, cancelInteractiveCube, cancelMain, cubeRotation, cubeRotationRotation, drawElements, drawModes, imageFilter, interactiveCube, main, textures, points, triangle, scaleTriangle, imageProcessing } from './webgl'; import { cancelEnvironmentMap, cancelFog, draw_image_space, draw_instanced, environmentMap, fog } from './webgl2'; // declare var com, java; let zen3d; import * as Svg from '@nativescript/canvas/SVG'; import { issue54, issue93 } from './issues'; +import { subTest } from './webgl/test'; var Vex; export class DemoSharedCanvas extends DemoSharedBase { private canvas: any; @@ -75,12 +76,11 @@ export class DemoSharedCanvas extends DemoSharedBase { canvasLoaded(args) { this.canvas = args.object; console.log('canvas ready'); - this.textBaseLine(); - // this.draw(); + this.draw(); } - textBaseLine() { - const ctx = this.canvas.getContext('2d'); + textBaseLine(canvas) { + const ctx = canvas.getContext('2d'); const baselines = ['top', 'hanging', 'middle', 'alphabetic', 'ideographic', 'bottom']; ctx.font = '24px serif'; @@ -97,6 +97,29 @@ export class DemoSharedCanvas extends DemoSharedBase { }); } + textBaseLine2(canvas) { + const ctx = canvas.getContext('2d'); + + const baselines = ['top', 'hanging', 'middle', 'alphabetic', 'ideographic', 'bottom']; + ctx.font = '20px serif'; + ctx.strokeStyle = 'red'; + + ctx.beginPath(); + ctx.moveTo(0, 100); + ctx.lineTo(840, 100); + ctx.moveTo(0, 55); + ctx.stroke(); + + baselines.forEach((baseline, index) => { + ctx.save(); + ctx.textBaseline = baseline; + let x = index * 120 + 10; + ctx.fillText('Abcdefghijk', x, 100); + ctx.restore(); + ctx.fillText(baseline, x + 5, 50); + }); + } + svgViewLoaded(args) { const view = args.object; console.log('svg ready', view.id); @@ -510,7 +533,21 @@ export class DemoSharedCanvas extends DemoSharedBase { ctx.stroke(); } + drawOnCanvasWithCanvas(canvas) { + const c2 = document.createElement('canvas'); + c2.width = 512; + c2.height = 512; + const c2d = c2.getContext('2d'); + const image = new global.ImageAsset(); + + image.fromUrl(`https://source.unsplash.com/random/${512}x${512}`).then(() => { + c2d.drawImage(image, 0, 0); + const ctx = canvas.getContext('2d'); + ctx.drawImage(c2, 0, 0); + }); + } draw() { + this.drawOnCanvasWithCanvas(this.canvas); //const ctx = this.canvas.getContext('2d'); //this.urlTests(); //const str = new java.lang.String() @@ -647,6 +684,10 @@ export class DemoSharedCanvas extends DemoSharedBase { //environmentMap(this.canvas); //cubeRotationRotation(this.canvas); //main(this.canvas); + //this.letterSpacing(this.canvas); + //this.wordSpacing(this.canvas); + //imageProcessing(this.canvas); + //subTest(this.canvas); //imageFilter(this.canvas); //interactiveCube(this.canvas); //textures(this.canvas); @@ -678,6 +719,40 @@ export class DemoSharedCanvas extends DemoSharedBase { // canvas.getBoundingClientRect(); // } // console.timeEnd('getBoundingClientRect'); + // this.textBaseLine(this.canvas); + //this.textBaseLine2(this.canvas); + } + + letterSpacing(canvas) { + const ctx = canvas.getContext('2d'); + ctx.font = '30px serif'; + + // Default letter spacing + ctx.fillText(`Hello world (default: ${ctx.letterSpacing})`, 10, 40); + + // Custom letter spacing: 10px + ctx.letterSpacing = '10px'; + ctx.fillText(`Hello world (${ctx.letterSpacing})`, 10, 90); + + // Custom letter spacing: 20px + ctx.letterSpacing = '20px'; + ctx.fillText(`Hello world (${ctx.letterSpacing})`, 10, 140); + } + + wordSpacing(canvas) { + const ctx = canvas.getContext('2d'); + ctx.font = '30px serif'; + + // Default word spacing + ctx.fillText(`Hello world (default: ${ctx.wordSpacing})`, 10, 40); + + // Custom word spacing: 10px + ctx.wordSpacing = '10px'; + ctx.fillText(`Hello world (${ctx.wordSpacing})`, 10, 90); + + // Custom word spacing: 30px + ctx.wordSpacing = '30px'; + ctx.fillText(`Hello world (${ctx.wordSpacing})`, 10, 140); } drawRandomFullscreenImage(canvas) { diff --git a/tools/demo/canvas/webgl/cube-example.ts b/tools/demo/canvas/webgl/cube-example.ts index c28ae4c1e..2a343e788 100644 --- a/tools/demo/canvas/webgl/cube-example.ts +++ b/tools/demo/canvas/webgl/cube-example.ts @@ -349,11 +349,14 @@ function loadTexture(gl: WebGLRenderingContext) { // } // } - + const canvas = document.createElement('canvas'); + const ctx = canvas.getContext('2d'); + asset.fromFile('~/assets/file-assets/webgl/svh.jpeg').then((done) => { if (done) { + ctx.drawImage(asset, 0, 0, asset.width,asset.height); gl.bindTexture(gl.TEXTURE_2D, texture); - gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, srcFormat, srcType, asset); + // gl.texImage2D(gl.TEXTURE_2D, level, internalFormat, srcFormat, srcType, canvas); // WebGL1 has different requirements for power of 2 images // vs non power of 2 images so check if the image is a diff --git a/tools/demo/canvas/webgl/test.ts b/tools/demo/canvas/webgl/test.ts new file mode 100644 index 000000000..201e3cad3 --- /dev/null +++ b/tools/demo/canvas/webgl/test.ts @@ -0,0 +1,127 @@ +import { Canvas } from "@nativescript/canvas"; + +export function subTest(canvas) { + const gl = canvas.getContext('webgl2'); + + if (!gl) { + console.error('Unable to initialize WebGL. Your browser may not support it.'); + return; + } + + // Vertex and fragment shader source code + const vsSource = ` + attribute vec4 a_position; + void main() { + gl_Position = a_position; + } + `; + + const fsSource = ` + precision mediump float; + uniform vec4 u_color; + void main() { + gl_FragColor = u_color; + } + `; + + // Compile shader and create program + function compileShader(gl, source, type) { + const shader = gl.createShader(type); + gl.shaderSource(shader, source); + gl.compileShader(shader); + + if (!gl.getShaderParameter(shader, gl.COMPILE_STATUS)) { + console.error('Shader compilation error:', gl.getShaderInfoLog(shader)); + gl.deleteShader(shader); + return null; + } + + return shader; + } + + const vertexShader = compileShader(gl, vsSource, gl.VERTEX_SHADER); + const fragmentShader = compileShader(gl, fsSource, gl.FRAGMENT_SHADER); + + const program = gl.createProgram(); + gl.attachShader(program, vertexShader); + gl.attachShader(program, fragmentShader); + gl.linkProgram(program); + + if (!gl.getProgramParameter(program, gl.LINK_STATUS)) { + console.error('Program linking error:', gl.getProgramInfoLog(program)); + return; + } + + gl.useProgram(program); + + // Create a texture and load an initial image + const texture = gl.createTexture(); + gl.bindTexture(gl.TEXTURE_2D, texture); + + const initialImage = new Image(); + initialImage.src = 'https://webglfundamentals.org/webgl/resources/leaves.jpg'; + + initialImage.onload = function () { + + + + const c = Canvas.createCustomView(); + c.width = 512; + c.height = 512; + const c2d = c.getContext('2d'); + c2d.drawImage(initialImage, 0, 0); + + gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, c); + + // // Set the clear color and clear the canvas + // gl.clearColor(0.0, 0.0, 0.0, 1.0); + // gl.clear(gl.COLOR_BUFFER_BIT); + + // Draw the initial texture + drawTexture(); + + // Update a portion of the texture using texSubImage2D + //updateTexture(); + }; + + // Define the vertex buffer + const positionBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); + const positions = new Float32Array([-1.0, -1.0, 1.0, -1.0, -1.0, 1.0, 1.0, 1.0]); + gl.bufferData(gl.ARRAY_BUFFER, positions, gl.STATIC_DRAW); + + // Get the attribute location and enable it + const positionAttrib = gl.getAttribLocation(program, 'a_position'); + gl.vertexAttribPointer(positionAttrib, 2, gl.FLOAT, false, 0, 0); + gl.enableVertexAttribArray(positionAttrib); + + // Define the uniform location for the color + const colorUniform = gl.getUniformLocation(program, 'u_color'); + + // Function to draw the texture + function drawTexture() { + gl.drawArrays(gl.TRIANGLE_STRIP, 0, 4); + } + + // Function to update a portion of the texture + function updateTexture() { + // Assuming the updated portion is a square at (x, y) with size (width, height) + const x = 50; + const y = 50; + const width = 100; + const height = 100; + + // Create a new image or use another source + const updatedImage = new Image(); + updatedImage.src = 'https://webglfundamentals.org/webgl/resources/leaves.jpg'; + + updatedImage.onload = function () { + // Update the portion of the texture using texSubImage2D + gl.texSubImage2D(gl.TEXTURE_2D, 0, x, y, gl.RGBA, gl.UNSIGNED_BYTE, updatedImage); + + // Set the color to white and draw the updated texture + gl.uniform4f(colorUniform, 1.0, 1.0, 1.0, 1.0); + drawTexture(); + }; + } +} diff --git a/tools/demo/canvas/webgl/webgl-image-processing.ts b/tools/demo/canvas/webgl/webgl-image-processing.ts index 26fd7ed15..eb0eaa949 100644 --- a/tools/demo/canvas/webgl/webgl-image-processing.ts +++ b/tools/demo/canvas/webgl/webgl-image-processing.ts @@ -1,10 +1,10 @@ -import {createProgramFromScripts} from './utils'; +import { Canvas } from '@nativescript/canvas'; +import { createProgramFromScripts } from './utils'; import { ImageSource } from '@nativescript/core'; -export function imageProcessing(canvas){ - - const vertexShader2d = { - type: 'vertex', - src: `attribute vec2 a_position; +export function imageProcessing(canvas) { + const vertexShader2d = { + type: 'vertex', + src: `attribute vec2 a_position; attribute vec2 a_texCoord; uniform vec2 u_resolution; @@ -26,11 +26,11 @@ export function imageProcessing(canvas){ // pass the texCoord to the fragment shader // The GPU will interpolate this value between points. v_texCoord = a_texCoord; - }` - }; - const fragmentShader2d = { - type: 'fragment', - src: `precision mediump float; + }`, + }; + const fragmentShader2d = { + type: 'fragment', + src: `precision mediump float; // our texture uniform sampler2D u_image; @@ -40,130 +40,125 @@ export function imageProcessing(canvas){ void main() { gl_FragColor = texture2D(u_image, v_texCoord); - }` - } - function main() { - ImageSource.fromUrl("https://webglfundamentals.org/webgl/resources/leaves.jpg") - .then(image =>{ - render(image); - }); - } - - function render(image) { - var gl = canvas.getContext("webgl"); - if (!gl) { - return; - } - - // setup GLSL program - var program = createProgramFromScripts(gl, [vertexShader2d, fragmentShader2d]); - - // look up where the vertex data needs to go. - var positionLocation = gl.getAttribLocation(program, "a_position"); - var texcoordLocation = gl.getAttribLocation(program, "a_texCoord"); - - // Create a buffer to put three 2d clip space points in - var positionBuffer = gl.createBuffer(); - - // Bind it to ARRAY_BUFFER (think of it as ARRAY_BUFFER = positionBuffer) - gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); - // Set a rectangle the same size as the image. - setRectangle(gl, 0, 0, image.width, image.height); - - // provide texture coordinates for the rectangle. - var texcoordBuffer = gl.createBuffer(); - gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer); - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ - 0.0, 0.0, - 1.0, 0.0, - 0.0, 1.0, - 0.0, 1.0, - 1.0, 0.0, - 1.0, 1.0, - ]), gl.STATIC_DRAW); - - // Create a texture. - var texture = gl.createTexture(); - gl.bindTexture(gl.TEXTURE_2D, texture); - - // Set the parameters so we can render any size image. - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); - gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); - - // Upload the image into the texture. - gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); - - // lookup uniforms - var resolutionLocation = gl.getUniformLocation(program, "u_resolution"); - - // webglUtils.resizeCanvasToDisplaySize(gl.canvas); - - // Tell WebGL how to convert from clip space to pixels - gl.viewport(0, 0, gl.drawingBufferWidth, gl.drawingBufferHeight); - - // Clear the canvas - gl.clearColor(0, 0, 0, 0); - gl.clear(gl.COLOR_BUFFER_BIT); - - // Tell it to use our program (pair of shaders) - gl.useProgram(program); - - // Turn on the position attribute - gl.enableVertexAttribArray(positionLocation); - - // Bind the position buffer. - gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); - - // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) - var size = 2; // 2 components per iteration - var type = gl.FLOAT; // the data is 32bit floats - var normalize = false; // don't normalize the data - var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position - var offset = 0; // start at the beginning of the buffer - gl.vertexAttribPointer( - positionLocation, size, type, normalize, stride, offset); - - // Turn on the teccord attribute - gl.enableVertexAttribArray(texcoordLocation); - - // Bind the position buffer. - gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer); - - // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) - var size = 2; // 2 components per iteration - var type = gl.FLOAT; // the data is 32bit floats - var normalize = false; // don't normalize the data - var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position - var offset = 0; // start at the beginning of the buffer - gl.vertexAttribPointer( - texcoordLocation, size, type, normalize, stride, offset); - - // set the resolution - gl.uniform2f(resolutionLocation, gl.drawingBufferWidth, gl.drawingBufferHeight); - - // Draw the rectangle. - var primitiveType = gl.TRIANGLES; - var offset = 0; - var count = 6; - gl.drawArrays(primitiveType, offset, count); - } - - function setRectangle(gl, x, y, width, height) { - var x1 = x; - var x2 = x + width; - var y1 = y; - var y2 = y + height; - gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([ - x1, y1, - x2, y1, - x1, y2, - x1, y2, - x2, y1, - x2, y2, - ]), gl.STATIC_DRAW); - } - - main(); + }`, + }; + function main() { + const asset = new global.ImageAsset(); + asset.fromUrl('https://webglfundamentals.org/webgl/resources/leaves.jpg').then((image) => { + // render(asset); + + // const c = Canvas.createCustomView(); + // c.width = 512; + // c.height = 512; + // const c2d = c.getContext('2d'); + // c2d.drawImage(asset, 0, 0); + + render(asset); + }); + } + + function render(image) { + var gl = canvas.getContext('webgl'); + if (!gl) { + return; + } + + // setup GLSL program + var program = createProgramFromScripts(gl, [vertexShader2d, fragmentShader2d]); + + // look up where the vertex data needs to go. + var positionLocation = gl.getAttribLocation(program, 'a_position'); + var texcoordLocation = gl.getAttribLocation(program, 'a_texCoord'); + + // Create a buffer to put three 2d clip space points in + var positionBuffer = gl.createBuffer(); + + // Bind it to ARRAY_BUFFER (think of it as ARRAY_BUFFER = positionBuffer) + gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); + // Set a rectangle the same size as the image. + setRectangle(gl, 0, 0, image.width, image.height); + + // provide texture coordinates for the rectangle. + var texcoordBuffer = gl.createBuffer(); + gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer); + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([0.0, 0.0, 1.0, 0.0, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 1.0, 1.0]), gl.STATIC_DRAW); + + // Create a texture. + var texture = gl.createTexture(); + gl.bindTexture(gl.TEXTURE_2D, texture); + + // Set the parameters so we can render any size image. + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_S, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_WRAP_T, gl.CLAMP_TO_EDGE); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MIN_FILTER, gl.NEAREST); + gl.texParameteri(gl.TEXTURE_2D, gl.TEXTURE_MAG_FILTER, gl.NEAREST); + + // Upload the image into the texture. + //(gl).texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, image.width, image.height, 0, gl.RGBA, gl.UNSIGNED_BYTE, null); + + (gl).texSubImage2D(gl.TEXTURE_2D, 0, 0, 0, gl.RGBA, gl.UNSIGNED_BYTE, image); + //gl.texImage2D(gl.TEXTURE_2D, 0, gl.RGBA, gl.RGBA, gl.UNSIGNED_BYTE, image); + + // lookup uniforms + var resolutionLocation = gl.getUniformLocation(program, 'u_resolution'); + + // webglUtils.resizeCanvasToDisplaySize(gl.canvas); + + // Tell WebGL how to convert from clip space to pixels + gl.viewport(0, 0, canvas.width, canvas.height); + + // Clear the canvas + gl.clearColor(0, 0, 0, 0); + gl.clear(gl.COLOR_BUFFER_BIT); + + // Tell it to use our program (pair of shaders) + gl.useProgram(program); + + // Turn on the position attribute + gl.enableVertexAttribArray(positionLocation); + + // Bind the position buffer. + gl.bindBuffer(gl.ARRAY_BUFFER, positionBuffer); + + // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) + var size = 2; // 2 components per iteration + var type = gl.FLOAT; // the data is 32bit floats + var normalize = false; // don't normalize the data + var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position + var offset = 0; // start at the beginning of the buffer + gl.vertexAttribPointer(positionLocation, size, type, normalize, stride, offset); + + // Turn on the teccord attribute + gl.enableVertexAttribArray(texcoordLocation); + + // Bind the position buffer. + gl.bindBuffer(gl.ARRAY_BUFFER, texcoordBuffer); + + // Tell the position attribute how to get data out of positionBuffer (ARRAY_BUFFER) + var size = 2; // 2 components per iteration + var type = gl.FLOAT; // the data is 32bit floats + var normalize = false; // don't normalize the data + var stride = 0; // 0 = move forward size * sizeof(type) each iteration to get the next position + var offset = 0; // start at the beginning of the buffer + gl.vertexAttribPointer(texcoordLocation, size, type, normalize, stride, offset); + + // set the resolution + gl.uniform2f(resolutionLocation, canvas.width, canvas.height); + + // Draw the rectangle. + var primitiveType = gl.TRIANGLES; + var offset = 0; + var count = 6; + gl.drawArrays(primitiveType, offset, count); + } + + function setRectangle(gl, x, y, width, height) { + var x1 = x; + var x2 = x + width; + var y1 = y; + var y2 = y + height; + gl.bufferData(gl.ARRAY_BUFFER, new Float32Array([x1, y1, x2, y1, x1, y2, x1, y2, x2, y1, x2, y2]), gl.STATIC_DRAW); + } + + main(); } diff --git a/tools/scripts/ios-build.sh b/tools/scripts/ios-build.sh index 2982f0376..dfb991190 100755 --- a/tools/scripts/ios-build.sh +++ b/tools/scripts/ios-build.sh @@ -83,11 +83,11 @@ fi if [[ $IS_RELEASE == true ]]; then cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios $BUILD_FLAG $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios $BUILD_FLAG $FEATURE_FLAGS -p canvas-ios cp "$IOS_ARM_64_PHONE_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" else cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios $FEATURE_FLAGS -p canvas-ios cp "$IOS_ARM_64_PHONE_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_PHONE/$OUTPUT_LIB_NAME" fi @@ -99,11 +99,11 @@ fi if [[ $IS_RELEASE == true ]]; then cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target x86_64-apple-ios $BUILD_FLAG $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target x86_64-apple-ios $BUILD_FLAG $FEATURE_FLAGS -p canvas-ios cp "$IOS_X86_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" else cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target x86_64-apple-ios $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target x86_64-apple-ios $FEATURE_FLAGS -p canvas-ios cp "$IOS_X86_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_X86_64_SIM/$OUTPUT_LIB_NAME" fi @@ -115,44 +115,44 @@ fi if [[ $IS_RELEASE == true ]]; then cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios-sim $BUILD_FLAG $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios-sim $BUILD_FLAG $FEATURE_FLAGS -p canvas-ios cp "$IOS_ARM_64_SIM_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" else cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios-sim $FEATURE_FLAGS + RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' -Z build-std-features=panic_immediate_abort --target aarch64-apple-ios-sim $FEATURE_FLAGS -p canvas-ios cp "$IOS_ARM_64_SIM_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_SIM/$OUTPUT_LIB_NAME" fi -if [[ -f "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" ]]; then - rm "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" -fi +# if [[ -f "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" ]]; then +# rm "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" +# fi -if [[ $IS_RELEASE == true ]]; then - cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target aarch64-apple-ios-macabi $BUILD_FLAG $FEATURE_FLAGS - cp "$IOS_ARM_64_MACCATALYST_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" -else - cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target aarch64-apple-ios-macabi $FEATURE_FLAGS - cp "$IOS_ARM_64_MACCATALYST_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" -fi +# if [[ $IS_RELEASE == true ]]; then +# cd "$NATIVE_SRC" +# RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target aarch64-apple-ios-macabi $BUILD_FLAG $FEATURE_FLAGS -p canvas-ios +# cp "$IOS_ARM_64_MACCATALYST_OUTPUT_RELEASE_DIR" "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" +# else +# cd "$NATIVE_SRC" +# RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target aarch64-apple-ios-macabi $FEATURE_FLAGS -p canvas-ios +# cp "$IOS_ARM_64_MACCATALYST_OUTPUT_DEBUG_DIR" "$IOS_LIB_ARM_64_MACCATALYST/$OUTPUT_LIB_NAME" +# fi -if [[ -f "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" ]]; then - rm "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" -fi +# if [[ -f "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" ]]; then +# rm "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" +# fi -if [[ $IS_RELEASE == true ]]; then - cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target x86_64-apple-ios-macabi $BUILD_FLAG $FEATURE_FLAGS - cp "$IOS_x86_64_MACCATALYST_OUTPUT_RELEASE_DIR" "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" -else - cd "$NATIVE_SRC" - RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target x86_64-apple-ios-macabi $FEATURE_FLAGS - cp "$IOS_x86_64_MACCATALYST_OUTPUT_DEBUG_DIR" "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" -fi +# if [[ $IS_RELEASE == true ]]; then +# cd "$NATIVE_SRC" +# RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target x86_64-apple-ios-macabi $BUILD_FLAG $FEATURE_FLAGS -p canvas-ios +# cp "$IOS_x86_64_MACCATALYST_OUTPUT_RELEASE_DIR" "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" +# else +# cd "$NATIVE_SRC" +# RUST_BACKTRACE=1 cargo +nightly build -Z build-std='std,panic_abort' --target x86_64-apple-ios-macabi $FEATURE_FLAGS -p canvas-ios +# cp "$IOS_x86_64_MACCATALYST_OUTPUT_DEBUG_DIR" "$IOS_LIB_X86_64_MACCATALYST/$OUTPUT_LIB_NAME" +# fi