diff --git a/packages/canvas-babylon/package.json b/packages/canvas-babylon/package.json index 79e2a714..6e5d4b98 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.32", + "version": "2.0.0-alpha.33", "description": "", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-chartjs/package.json b/packages/canvas-chartjs/package.json index 4dbc7956..3c1768ce 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.32", + "version": "2.0.0-alpha.33", "description": "ChartJS", "main": "index", "typings": "index.d.ts", diff --git a/packages/canvas-media/package.json b/packages/canvas-media/package.json index 35bc3ca5..305a47a7 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.32", + "version": "2.0.0-alpha.33", "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 16be8018..1abdf9da 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 de6b004f..eecacd2d 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.32", + "version": "2.0.0-alpha.33", "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 7a996b2a..d466813b 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.32", + "version": "2.0.0-alpha.33", "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 d40f7aa5..2db9f97f 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.32", + "version": "2.0.0-alpha.33", "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 40fc4ba8..b5eb0f31 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.32", + "version": "2.0.0-alpha.33", "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 46c7476e..977fe456 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.32", + "version": "2.0.0-alpha.33", "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 03e84563..464303dc 100644 --- a/packages/canvas/Canvas/common.ts +++ b/packages/canvas/Canvas/common.ts @@ -532,6 +532,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 +550,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) { @@ -828,6 +830,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 +848,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) { diff --git a/packages/canvas/Canvas/index.android.ts b/packages/canvas/Canvas/index.android.ts index 22f35e4b..217e0564 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(); @@ -149,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; } @@ -270,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 cf5ad49f..502d9007 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 15283f9c..acefe2c3 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() { @@ -160,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; } @@ -243,6 +245,10 @@ export class Canvas extends CanvasBase { } _layoutNative(force: boolean = false) { + if (this._isBatch) { + return; + } + if (!this._isCustom && !force) { return; } @@ -258,6 +264,7 @@ export class Canvas extends CanvasBase { const size = this._realSize; + const width = Utils.layout.toDevicePixels(size.width || 1); const height = Utils.layout.toDevicePixels(size.height || 1); @@ -285,6 +292,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); @@ -295,6 +303,7 @@ export class Canvas extends CanvasBase { this._contextType = ContextType.Canvas; // @ts-ignore this._2dContext._type = '2d'; + this._is2D = true; } return this._2dContext; diff --git a/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts b/packages/canvas/Canvas2D/CanvasRenderingContext2D/index.ts index 5be2e463..083bd035 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; } @@ -163,6 +171,14 @@ export class CanvasRenderingContext2D { this.context.textAlign = alignment; } + get textBaseline() { + return this.context.textBaseline; + } + + set textBaseline(baseline: string) { + this.context.textBaseline = baseline; + } + get globalCompositeOperation() { return this.context.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/index.ts b/packages/canvas/WebGL/WebGLRenderingContext/index.ts index 3ee16298..ce4ee322 100644 --- a/packages/canvas/WebGL/WebGLRenderingContext/index.ts +++ b/packages/canvas/WebGL/WebGLRenderingContext/index.ts @@ -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); diff --git a/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts b/packages/canvas/WebGL2/WebGL2RenderingContext/index.ts index 227e6d6c..9d613486 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 c1df841b..1b022860 100644 --- a/packages/canvas/package.json +++ b/packages/canvas/package.json @@ -1,6 +1,6 @@ { "name": "@nativescript/canvas", - "version": "2.0.0-alpha.32", + "version": "2.0.0-alpha.33", "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 00f08bb3..2328ece9 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/Info.plist b/packages/canvas/platforms/ios/CanvasNative.xcframework/Info.plist index 2552f82e..803c127d 100644 --- a/packages/canvas/platforms/ios/CanvasNative.xcframework/Info.plist +++ b/packages/canvas/platforms/ios/CanvasNative.xcframework/Info.plist @@ -8,32 +8,32 @@ DebugSymbolsPath dSYMs LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath CanvasNative.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator DebugSymbolsPath dSYMs LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-simulator LibraryPath CanvasNative.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator CFBundlePackageType 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 a7642a6f..5d276980 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 e42cc5e8..9c1eed8f 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 5cafc106..982bd5b7 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/Info.plist b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist index d32b2e08..1b31de34 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 4ad6a7ad..3113358a 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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 a4c45629..0a331564 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 f88080d0..9226f7d5 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 a4c45629..0a331564 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 6f4a1e4a..ad4284d0 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 8fc28c15..3d40381a 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 9d0d26be..7b72b012 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 5cafc106..982bd5b7 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/Info.plist b/packages/canvas/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist index a09f02b8..da60e37b 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 b5c2f93f..2b2a8585 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 931d46e2..4916d529 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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 9ad2d485..a613a143 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 6f13e0e7..bcd93140 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 9ad2d485..a613a143 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 9ffb9b51..cd4271b3 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 95d27b3d..56404d60 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 9ffb9b51..cd4271b3 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 f4aa69d4..f95dd295 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,7 +14,7 @@ Headers/canvas_ios.h - KTxEWGEXbMkpqkl1jFw9IrlUXNk= + LPanBXKcbVunr8F1KyVxJgAshlg= Headers/canvas_native.h @@ -22,55 +22,55 @@ Info.plist - U1i9btMZtOpHf9qhXwKYLDvVNdo= + EM/hl4VHfqrUWG5WhwjIgBQydpw= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo - MINThIl7ndWVb8bIShypUSh/3go= + qSPn1Ov2ibp2XaDIBbixIwuR6Jg= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo - 9Z9FjgTKHinlXDE6k355GJQ+hDk= + JNUWH1q2inDPJ7BkPKvfGkT3Dqo= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json - a05xfoh8i4smP+ATcF26KP9w8IY= + 3ma5PFjT4Xml5NbJXZjkfgMpG78= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + YpF33cjos22C+odi1kiW+HRnnoU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc - CMMmee6VmdZfdJ0Wkbazb7dDXdQ= + 3k4ihv2rEGRfxk2bofe8XCNgmOU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + YpF33cjos22C+odi1kiW+HRnnoU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule - xwUL0+sPWQOnLRbmCRAaufNhlQg= + UpJt2D+h+ShsN0V+y+W18QnA9tg= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json - a05xfoh8i4smP+ATcF26KP9w8IY= + 3ma5PFjT4Xml5NbJXZjkfgMpG78= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + 8hFN6uPR9aaO4y9GFtU7MZcgCrE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - qIf+V6LPokPDapYCnIkzGPNTQBQ= + LhXFUgL45ajNWjn9PjgN0RRMMRI= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + 8hFN6uPR9aaO4y9GFtU7MZcgCrE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - a6dK/jYfYD3OMc+7AAdKioPdSzM= + wI0PbZtS1/3Pm9r9kWuErAGg9kU= Modules/module.modulemap @@ -87,7 +87,7 @@ hash2 - fXm+b+Qm+nCs5qVchcJ5cPoIgOfKloO3YiRF6o4KNRg= + NgdeIBmztWUdD5mFMZ3+6AuGJtG14SrQYJD64J/vSpg= Headers/CanvasNative.h @@ -101,7 +101,7 @@ hash2 - TiO6d1r0FpNodOiAuX3VSvZMqWAXTOTOJOr7ntjAfW0= + D4WQBTe9g4ZWCu0OZfSbjUBcaqYn7WDpfEaYGK/aMqQ= Headers/canvas_native.h @@ -115,84 +115,84 @@ hash2 - ++sX4p8tBMeuVFks8jongrvmbBm+PZ6z4HxEPAbLomw= + 7ff6VbXwSeoRyCiAmNaSND7h3kVQfpwVLyM3+U2bt7k= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo hash2 - rGTM5TkLTVTN8jNFgTOABzilyBCnblKehhohqojojIQ= + zVG4KwQaRWjAIGVeleEvbo/lrgMCyBS8zps0tMPXuYE= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json hash2 - ivLUd4vcB85bDIQrO24DZdQEiDa/wuC/s4UqLJoeDAs= + dDfZkjfDIcMopkv5WI7npxyqsoipcLCHuCH/QnjtRxk= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + NEs1Zh63V5aQ0+USgEGvZ4Ctov1DaYnPcRxwpRr5qOA= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc hash2 - XEwqbBhZEdrykIJcHcrifRLpaclowS2e/807PqxiO3c= + hfByW1Q/oKQfs+YO18TpacW07cK0OcnuziqQqzi0jjg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + NEs1Zh63V5aQ0+USgEGvZ4Ctov1DaYnPcRxwpRr5qOA= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule hash2 - pTosagdcfbOSk+kqEUxvwO8uiO0kDuxEPJAEzFGZvNw= + aUFrye0zvIFzyfbvh5wNZOi/RVQUbd/KabDp5br2/pE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json hash2 - ivLUd4vcB85bDIQrO24DZdQEiDa/wuC/s4UqLJoeDAs= + dDfZkjfDIcMopkv5WI7npxyqsoipcLCHuCH/QnjtRxk= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + gdGxXuI8iVdBPQUlh1VmeE2VK9UKbNjrWRIjfGJrmoo= 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= + gdGxXuI8iVdBPQUlh1VmeE2VK9UKbNjrWRIjfGJrmoo= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule hash2 - RzFPk/lsBdJedrAgG+Vzkgv6bq2WCg3BdPLGfDgwZtM= + fOmzW/5hBfpa/UTW25wHCTCstHz1Dhj2Lckmeybd8nA= 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 b8aa2fe3..5f5fb9f1 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/canvas2d/CanvasRenderingContext2DImpl.cpp b/packages/canvas/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp index 86f245a2..c7cac482 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); @@ -381,6 +386,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()); @@ -1706,12 +1766,12 @@ CanvasRenderingContext2DImpl::FillText(const v8::FunctionCallbackInfo canvas_native_context_fill_text_width( ptr->GetContext(), text.c_str(), x, y, width); - }else { + } else { canvas_native_context_fill_text( ptr->GetContext(), text.c_str(), x, y); } - + ptr->UpdateInvalidateState(); } @@ -2279,14 +2339,14 @@ CanvasRenderingContext2DImpl::StrokeText(const v8::FunctionCallbackInfo(args[3]->NumberValue(context).ToChecked()); canvas_native_context_stroke_text_width( ptr->GetContext(), text.c_str(), - x, y,maxWidth); - }else { + x, y, maxWidth); + } else { canvas_native_context_stroke_text( ptr->GetContext(), text.c_str(), x, y); } - + 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 a16dad96..e3f286b9 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/canvas/src/main/cpp/include/canvas_native.h b/packages/canvas/src-native/canvas-android/canvas/src/main/cpp/include/canvas_native.h index a180b6e6..5b6e24df 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 @@ -291,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); 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 35ccb20c..6b8fcc2a 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 93d7b855..b8b9a3fa 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 07d5dffe..cd68ab41 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 272bce24..8ea3ecae 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 d248a748..5f32abba 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)) @@ -74,7 +71,7 @@ public class NSCCanvas: UIView, GLKViewDelegate { 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 +172,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 +206,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( @@ -275,10 +270,6 @@ 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 @@ -302,6 +293,8 @@ public class NSCCanvas: UIView, GLKViewDelegate { return snapshot } + + var renderer: NSCRender? = nil @discardableResult public func render() -> Bool{ return CanvasHelpers.flushGL(nativeGL) } @@ -339,7 +332,7 @@ 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!) @@ -352,7 +345,7 @@ 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!) @@ -384,11 +377,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 5cafc106..982bd5b7 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 6802f94a..59c986a5 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 @@ -291,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); diff --git a/packages/canvas/src-native/canvas-ios/NSCRender.swift b/packages/canvas/src-native/canvas-ios/NSCRender.swift index e64858aa..d948b1b2 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/dist/CanvasNative.xcframework/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist index 2552f82e..803c127d 100644 --- a/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist +++ b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/Info.plist @@ -8,32 +8,32 @@ DebugSymbolsPath dSYMs LibraryIdentifier - ios-arm64_x86_64-simulator + ios-arm64 LibraryPath CanvasNative.framework SupportedArchitectures arm64 - x86_64 SupportedPlatform ios - SupportedPlatformVariant - simulator DebugSymbolsPath dSYMs LibraryIdentifier - ios-arm64 + ios-arm64_x86_64-simulator LibraryPath CanvasNative.framework SupportedArchitectures arm64 + x86_64 SupportedPlatform ios + SupportedPlatformVariant + simulator CFBundlePackageType 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 a7642a6f..5d276980 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 e42cc5e8..9c1eed8f 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 5cafc106..982bd5b7 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/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist index d32b2e08..1b31de34 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 4ad6a7ad..3113358a 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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 a4c45629..0a331564 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 f88080d0..9226f7d5 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 a4c45629..0a331564 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 6f4a1e4a..ad4284d0 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 8fc28c15..3d40381a 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 9d0d26be..7b72b012 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 5cafc106..982bd5b7 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/Info.plist b/packages/canvas/src-native/canvas-ios/dist/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist index a09f02b8..da60e37b 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 b5c2f93f..2b2a8585 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 931d46e2..4916d529 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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 9ad2d485..a613a143 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 6f13e0e7..bcd93140 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 9ad2d485..a613a143 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 e0b92a40..34be4c0b 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,647 @@ "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": "BooleanLiteral", - "offset": 2181, + "offset": 2051, "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": 2108, "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": 2161, "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": 2209, "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": 2279, "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": 2772, "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": 2806, "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": 2836, "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": 2889, "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": 2932, "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": 2980, "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": 3026, "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": 3059, "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": 3099, "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": 3137, "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": 3937, "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": 3993, "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": 4019, "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": 4062, "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": 4090, "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": 4115, "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": 4179, "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": 4201, "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": 4232, "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": 4265, "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": 4297, "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": 4394, "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": 4487, "length": 3, "value": "[]" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 4940, + "offset": 4815, "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": 4852, + "length": 5, + "value": "false" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 4913, "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": 5040, + "length": 4, + "value": "true" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", + "kind": "BooleanLiteral", + "offset": 5100, "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": 5136, "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": 6815, "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": 6910, "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": 7318, "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": 7322, "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": 7351, "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": 7354, "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": 7675, "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": 7680, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 8560, + "offset": 8295, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10191, + "offset": 9966, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10312, + "offset": 10081, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10685, + "offset": 10454, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10806, + "offset": 10569, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 10965, + "offset": 10728, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 11577, + "offset": 11340, "length": 5, "value": "false" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11638, + "offset": 11401, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11815, + "offset": 11501, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 11818, + "offset": 11504, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12201, + "offset": 11885, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12228, + "offset": 11912, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12260, + "offset": 11944, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12364, + "offset": 12048, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12392, + "offset": 12076, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "BooleanLiteral", - "offset": 12512, + "offset": 12196, "length": 4, "value": "true" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12623, + "offset": 12307, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12756, + "offset": 12440, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12846, + "offset": 12530, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12881, + "offset": 12565, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 12954, + "offset": 12638, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13792, + "offset": 13476, "length": 1, "value": "1" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13849, + "offset": 13533, "length": 1, "value": "2" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13907, + "offset": 13591, "length": 1, "value": "3" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 13956, + "offset": 13640, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14009, + "offset": 13693, "length": 1, "value": "5" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14063, + "offset": 13747, "length": 1, "value": "6" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14112, + "offset": 13796, "length": 1, "value": "7" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift", "kind": "IntegerLiteral", - "offset": 14274, + "offset": 13958, "length": 1, "value": "0" }, @@ -6319,413 +6419,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": 3632, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 3689, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 4917, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "offset": 4920, + "length": 1, + "value": "0" + }, + { + "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", + "kind": "IntegerLiteral", + "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": 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": 1989, + "offset": 8185, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2068, + "offset": 8264, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 2078, + "offset": 8274, "length": 1, "value": "4" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3686, + "offset": 9882, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 3802, + "offset": 9998, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "IntegerLiteral", - "offset": 4822, + "offset": 11018, "length": 1, "value": "0" }, { "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/NSCRender.swift", "kind": "StringLiteral", - "offset": 5000, + "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" }, @@ -7639,6 +7984,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 +8015,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 9ffb9b51..cd4271b3 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 95d27b3d..56404d60 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 9ffb9b51..cd4271b3 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,8 +44,7 @@ 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 @@ -83,8 +82,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 +135,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 f4aa69d4..f95dd295 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,7 +14,7 @@ Headers/canvas_ios.h - KTxEWGEXbMkpqkl1jFw9IrlUXNk= + LPanBXKcbVunr8F1KyVxJgAshlg= Headers/canvas_native.h @@ -22,55 +22,55 @@ Info.plist - U1i9btMZtOpHf9qhXwKYLDvVNdo= + EM/hl4VHfqrUWG5WhwjIgBQydpw= Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo - MINThIl7ndWVb8bIShypUSh/3go= + qSPn1Ov2ibp2XaDIBbixIwuR6Jg= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo - 9Z9FjgTKHinlXDE6k355GJQ+hDk= + JNUWH1q2inDPJ7BkPKvfGkT3Dqo= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json - a05xfoh8i4smP+ATcF26KP9w8IY= + 3ma5PFjT4Xml5NbJXZjkfgMpG78= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + YpF33cjos22C+odi1kiW+HRnnoU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc - CMMmee6VmdZfdJ0Wkbazb7dDXdQ= + 3k4ihv2rEGRfxk2bofe8XCNgmOU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface - 8Srz3VbLpqZAT9Vj0TTcMmNnFpo= + YpF33cjos22C+odi1kiW+HRnnoU= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule - xwUL0+sPWQOnLRbmCRAaufNhlQg= + UpJt2D+h+ShsN0V+y+W18QnA9tg= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json - a05xfoh8i4smP+ATcF26KP9w8IY= + 3ma5PFjT4Xml5NbJXZjkfgMpG78= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + 8hFN6uPR9aaO4y9GFtU7MZcgCrE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc - qIf+V6LPokPDapYCnIkzGPNTQBQ= + LhXFUgL45ajNWjn9PjgN0RRMMRI= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface - oGaFzJw2skR8h7F5PnUt0p1T0do= + 8hFN6uPR9aaO4y9GFtU7MZcgCrE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule - a6dK/jYfYD3OMc+7AAdKioPdSzM= + wI0PbZtS1/3Pm9r9kWuErAGg9kU= Modules/module.modulemap @@ -87,7 +87,7 @@ hash2 - fXm+b+Qm+nCs5qVchcJ5cPoIgOfKloO3YiRF6o4KNRg= + NgdeIBmztWUdD5mFMZ3+6AuGJtG14SrQYJD64J/vSpg= Headers/CanvasNative.h @@ -101,7 +101,7 @@ hash2 - TiO6d1r0FpNodOiAuX3VSvZMqWAXTOTOJOr7ntjAfW0= + D4WQBTe9g4ZWCu0OZfSbjUBcaqYn7WDpfEaYGK/aMqQ= Headers/canvas_native.h @@ -115,84 +115,84 @@ hash2 - ++sX4p8tBMeuVFks8jongrvmbBm+PZ6z4HxEPAbLomw= + 7ff6VbXwSeoRyCiAmNaSND7h3kVQfpwVLyM3+U2bt7k= Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo hash2 - rGTM5TkLTVTN8jNFgTOABzilyBCnblKehhohqojojIQ= + zVG4KwQaRWjAIGVeleEvbo/lrgMCyBS8zps0tMPXuYE= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json hash2 - ivLUd4vcB85bDIQrO24DZdQEiDa/wuC/s4UqLJoeDAs= + dDfZkjfDIcMopkv5WI7npxyqsoipcLCHuCH/QnjtRxk= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + NEs1Zh63V5aQ0+USgEGvZ4Ctov1DaYnPcRxwpRr5qOA= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc hash2 - XEwqbBhZEdrykIJcHcrifRLpaclowS2e/807PqxiO3c= + hfByW1Q/oKQfs+YO18TpacW07cK0OcnuziqQqzi0jjg= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface hash2 - NYLgbQSiXcqEGePfly2vWkVlmvpletiSTJhSSvYELy0= + NEs1Zh63V5aQ0+USgEGvZ4Ctov1DaYnPcRxwpRr5qOA= Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftmodule hash2 - pTosagdcfbOSk+kqEUxvwO8uiO0kDuxEPJAEzFGZvNw= + aUFrye0zvIFzyfbvh5wNZOi/RVQUbd/KabDp5br2/pE= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json hash2 - ivLUd4vcB85bDIQrO24DZdQEiDa/wuC/s4UqLJoeDAs= + dDfZkjfDIcMopkv5WI7npxyqsoipcLCHuCH/QnjtRxk= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface hash2 - 1OljxijU01/Dy6xtdgZ9TjaT8i0/oF9cLMQx2FhpL8w= + gdGxXuI8iVdBPQUlh1VmeE2VK9UKbNjrWRIjfGJrmoo= 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= + gdGxXuI8iVdBPQUlh1VmeE2VK9UKbNjrWRIjfGJrmoo= Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftmodule hash2 - RzFPk/lsBdJedrAgG+Vzkgv6bq2WCg3BdPLGfDgwZtM= + fOmzW/5hBfpa/UTW25wHCTCstHz1Dhj2Lckmeybd8nA= 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 b8aa2fe3..5f5fb9f1 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 4cc14365..e788323e 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", "textlayout"] } -skia-safe = { version = "0.66.3", features = ["gl", "svg", "textlayout"] } -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 38cbf00d..ada2c7c0 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/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/drawing_text/mod.rs index 75c45417..7d682d1e 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 @@ -69,7 +69,7 @@ impl Context { self.draw_text(text.as_str(), x, y, width, None, &paint); } - fn apply_shadow_offset_matrix(canvas: &mut Canvas, shadow_offset_x: f32, shadow_offset_y: f32) { + 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); @@ -102,10 +102,10 @@ impl Context { 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(0.); + 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); @@ -122,9 +122,11 @@ impl Context { 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(); 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 b3ee7a62..63a77a1c 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,9 +1,14 @@ +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::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 fill_and_stroke_styles::paint::Paint; use filter_quality::FilterQuality; @@ -14,8 +19,6 @@ use paths::path::Path; use text_styles::{ text_align::TextAlign, text_baseline::TextBaseLine, text_direction::TextDirection, }; -use crate::context::drawing_text::typography::Font; - pub mod drawing_images; pub mod drawing_text; @@ -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, @@ -91,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 { @@ -129,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. } } } @@ -245,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); } } @@ -261,14 +297,18 @@ 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(), @@ -277,14 +317,15 @@ impl Context { 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(), + ss.image_info().color_type(), + 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, ); @@ -296,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(), @@ -304,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 4d11278c..bebded78 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 3aab237c..e85cb2e0 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 a8db6132..c8a6394e 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 @@ -45,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/transformations.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/context/transformations.rs index bb192a66..60068896 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 51b93755..ca88e484 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/svg/mod.rs b/packages/canvas/src-native/canvas-native/canvas-2d/src/svg/mod.rs index 511d265b..2a2c625a 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-android/Cargo.toml b/packages/canvas/src-native/canvas-native/canvas-android/Cargo.toml index 20f5028c..27fb14ad 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 3de6880e..6ea909df 100644 --- a/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/canvas-c/Cargo.toml @@ -18,11 +18,12 @@ 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" 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 59929acf..cb447c51 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 @@ -25,6 +25,7 @@ use canvas_2d::utils::image::{ }; use canvas_core::image_asset::OutputFormat; use canvas_webgl::prelude::WebGLVersion; +use log::log; #[cfg(target_os = "android")] use once_cell::sync::OnceCell; @@ -292,6 +293,10 @@ impl CanvasRenderingContext2D { } } + pub fn reset(&mut self) { + self.context.get_context_mut().reset(); + } + pub fn render(&self) { self.gl_context.make_current(); { @@ -702,6 +707,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, @@ -7263,49 +7317,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] @@ -7492,45 +7587,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] 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 09e274c0..46962618 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" +glutin = "0.31.1" #glutin = { git = "https://github.com/triniwiz/glutin", rev = "1b2cbbe" } android_log = "0.1.3" [target.'cfg(target_os = "macos")'.dependencies] -winit = "0.28.1" -glutin-winit = "0.3.0" -glutin = "0.30.10" +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 9de35463..eb3596cb 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 5a84f51e..9df57d06 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 4e548021..ef5cd842 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 {} @@ -96,7 +99,6 @@ impl From<&mut ContextAttributes> for ConfigTemplate { .with_stencil_size(if value.get_stencil() { 8 } else { 0 }) .with_transparency(value.get_alpha()); - if !value.get_is_canvas() && value.get_antialias() { builder = builder.with_multisampling(4) } @@ -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,7 +608,6 @@ impl GLContext { width: i32, height: i32, ) -> Option { - use winit::event::{Event, WindowEvent}; use winit::event_loop::EventLoop; use winit::window::WindowBuilder; @@ -582,6 +615,7 @@ impl GLContext { 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) } @@ -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 c505de25..40c54212 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 e41bd4a6..a08ffa3b 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 ace1a392..34df20b9 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,22 @@ -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 gl_bindings::types::GLsizei; +use parking_lot::RwLock; +use std::ffi::{c_longlong, c_void, CStr, CString}; +use std::ops::DerefMut; +use std::os::raw::c_char; +use std::ptr::NonNull; + #[allow(non_camel_case_types)] pub(crate) enum iOSView { OffScreen, - OnScreen(NonNull) + OnScreen(NonNull), } #[allow(dead_code)] @@ -27,6 +27,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 +67,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 +86,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 +143,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 +159,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 +196,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 +252,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 +268,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 +330,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 +346,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 +420,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 +473,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 dadea39e..3840be32 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 366114be..6cbf73b5 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 new file mode 100644 index 00000000..59c986a5 --- /dev/null +++ b/packages/canvas/src-native/canvas-native/my_header.h @@ -0,0 +1,2721 @@ +#ifndef CANVAS_C_H +#define CANVAS_C_H + +/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */ + +#include +#include +#include +#include + +typedef enum GLConstants { + UNPACK_FLIP_Y_WEBGL = 37440, + UNPACK_PREMULTIPLY_ALPHA_WEBGL = 37441, + UNPACK_COLORSPACE_CONVERSION_WEBGL = 37443, +} GLConstants; + +typedef enum ImageBitmapColorSpaceConversion { + ImageBitmapColorSpaceConversionDefault, + ImageBitmapColorSpaceConversionNone, +} ImageBitmapColorSpaceConversion; + +typedef enum ImageBitmapPremultiplyAlpha { + ImageBitmapPremultiplyAlphaDefault, + ImageBitmapPremultiplyAlphaPremultiply, + ImageBitmapPremultiplyAlphaNone, +} ImageBitmapPremultiplyAlpha; + +typedef enum ImageBitmapResizeQuality { + ImageBitmapResizeQualityLow, + ImageBitmapResizeQualityMedium, + ImageBitmapResizeQualityHigh, + ImageBitmapResizeQualityPixelated, +} ImageBitmapResizeQuality; + +typedef enum InvalidateState { + InvalidateStateNone, + InvalidateStatePending, + InvalidateStateInvalidating, +} InvalidateState; + +typedef enum PaintStyleType { + PaintStyleTypeNone, + PaintStyleTypeColor, + PaintStyleTypeGradient, + PaintStyleTypePattern, +} PaintStyleType; + +typedef enum WebGLExtensionType { + WebGLExtensionTypeEXT_blend_minmax, + WebGLExtensionTypeEXT_color_buffer_half_float, + WebGLExtensionTypeEXT_disjoint_timer_query, + WebGLExtensionTypeEXT_sRGB, + WebGLExtensionTypeEXT_shader_texture_lod, + WebGLExtensionTypeEXT_texture_filter_anisotropic, + WebGLExtensionTypeOES_element_index_uint, + WebGLExtensionTypeOES_standard_derivatives, + WebGLExtensionTypeOES_texture_float, + WebGLExtensionTypeOES_texture_float_linear, + WebGLExtensionTypeOES_texture_half_float, + WebGLExtensionTypeOES_texture_half_float_linear, + WebGLExtensionTypeOES_vertex_array_object, + WebGLExtensionTypeWEBGL_color_buffer_float, + WebGLExtensionTypeWEBGL_compressed_texture_atc, + WebGLExtensionTypeWEBGL_compressed_texture_etc1, + WebGLExtensionTypeWEBGL_compressed_texture_s3tc, + WebGLExtensionTypeWEBGL_compressed_texture_s3tc_srgb, + WebGLExtensionTypeWEBGL_compressed_texture_etc, + WebGLExtensionTypeWEBGL_compressed_texture_pvrtc, + WebGLExtensionTypeWEBGL_lose_context, + WebGLExtensionTypeANGLE_instanced_arrays, + WebGLExtensionTypeWEBGL_depth_texture, + WebGLExtensionTypeWEBGL_draw_buffers, + WebGLExtensionTypeOES_fbo_render_mipmap, + WebGLExtensionTypeNone, +} WebGLExtensionType; + +typedef enum WebGLResultType { + WebGLResultTypeBoolean, + WebGLResultTypeI32Array, + WebGLResultTypeU32Array, + WebGLResultTypeF32Array, + WebGLResultTypeBooleanArray, + WebGLResultTypeU32, + WebGLResultTypeI32, + WebGLResultTypeF32, + WebGLResultTypeString, + WebGLResultTypeNone, +} WebGLResultType; + +typedef struct ANGLE_instanced_arrays ANGLE_instanced_arrays; + +typedef struct CCow CCow; + +typedef struct CanvasRenderingContext2D CanvasRenderingContext2D; + +typedef struct ContextAttributes ContextAttributes; + +typedef struct EXT_blend_minmax EXT_blend_minmax; + +typedef struct EXT_color_buffer_half_float EXT_color_buffer_half_float; + +typedef struct EXT_disjoint_timer_query EXT_disjoint_timer_query; + +typedef struct EXT_shader_texture_lod EXT_shader_texture_lod; + +typedef struct EXT_texture_filter_anisotropic EXT_texture_filter_anisotropic; + +typedef struct F32Buffer F32Buffer; + +typedef struct FileHelper FileHelper; + +typedef struct I32Buffer I32Buffer; + +typedef struct ImageAsset ImageAsset; + +typedef struct ImageData ImageData; + +typedef struct ImageFilter ImageFilter; + +typedef struct Matrix Matrix; + +typedef struct OES_element_index_uint OES_element_index_uint; + +typedef struct OES_standard_derivatives OES_standard_derivatives; + +typedef struct OES_texture_float OES_texture_float; + +typedef struct OES_texture_float_linear OES_texture_float_linear; + +typedef struct OES_texture_half_float OES_texture_half_float; + +typedef struct OES_texture_half_float_linear OES_texture_half_float_linear; + +typedef struct OES_vertex_array_object OES_vertex_array_object; + +typedef struct PaintStyle PaintStyle; + +typedef struct Path Path; + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +typedef struct Raf Raf; +#endif + +#if ((defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) && defined(TARGET_OS_ANDROID)) +typedef struct Raf Raf; +#endif + +#if ((defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) && defined(TARGET_OS_IOS)) +typedef struct Raf Raf; +#endif + +typedef struct StringBuffer StringBuffer; + +typedef struct TextDecoder TextDecoder; + +typedef struct TextEncoder TextEncoder; + +typedef struct TextMetrics TextMetrics; + +typedef struct U16Buffer U16Buffer; + +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; + +typedef struct WEBGL_compressed_texture_etc WEBGL_compressed_texture_etc; + +typedef struct WEBGL_compressed_texture_etc1 WEBGL_compressed_texture_etc1; + +typedef struct WEBGL_compressed_texture_pvrtc WEBGL_compressed_texture_pvrtc; + +typedef struct WEBGL_compressed_texture_s3tc WEBGL_compressed_texture_s3tc; + +typedef struct WEBGL_compressed_texture_s3tc_srgb WEBGL_compressed_texture_s3tc_srgb; + +typedef struct WEBGL_depth_texture WEBGL_depth_texture; + +typedef struct WEBGL_draw_buffers WEBGL_draw_buffers; + +typedef struct WEBGL_lose_context WEBGL_lose_context; + +typedef struct WebGLActiveInfo WebGLActiveInfo; + +typedef struct WebGLExtension WebGLExtension; + +typedef struct WebGLFramebufferAttachmentParameter WebGLFramebufferAttachmentParameter; + +typedef struct WebGLIndexedParameter WebGLIndexedParameter; + +typedef struct WebGLResult WebGLResult; + +typedef struct WebGLShaderPrecisionFormat WebGLShaderPrecisionFormat; + +typedef struct WebGLState WebGLState; + +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); + +bool canvas_native_helper_read_file_has_error(const struct FileHelper *file); + +struct U8Buffer *canvas_native_helper_read_file_get_data(struct FileHelper *file); + +const char *canvas_native_helper_read_file_get_error(const struct FileHelper *file); + +void canvas_native_text_encoder_destroy(struct TextEncoder *value); + +void canvas_native_text_decoder_destroy(struct TextDecoder *value); + +void canvas_native_context_destroy(struct CanvasRenderingContext2D *value); + +void canvas_native_paint_style_destroy(struct PaintStyle *value); + +void canvas_native_text_metrics_destroy(struct TextMetrics *value); + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +struct Raf *canvas_native_raf_create(intptr_t callback, void (*on_frame_callback)(intptr_t callback, + int64_t ts)); +#endif + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +void canvas_native_raf_destroy(struct Raf *value); +#endif + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +void canvas_native_raf_start(struct Raf *raf); +#endif + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +void canvas_native_raf_stop(struct Raf *raf); +#endif + +#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS)) +bool canvas_native_raf_get_started(const struct Raf *raf); +#endif + +struct CanvasRenderingContext2D *canvas_native_context_create_with_wrapper(int64_t context, + int64_t gl_context); + +void canvas_native_context_resize(struct CanvasRenderingContext2D *context, + float width, + float height); + +struct CanvasRenderingContext2D *canvas_native_context_create(float width, + float height, + float density, + bool alpha, + int32_t font_color, + float ppi, + uint32_t direction); + +struct CanvasRenderingContext2D *canvas_native_context_create_gl(float width, + float height, + float density, + int64_t gl_context, + int32_t samples, + bool alpha, + int32_t font_color, + float ppi, + uint32_t direction); + +struct CanvasRenderingContext2D *canvas_native_context_create_with_pointer(int64_t pointer); + +struct CanvasRenderingContext2D *canvas_native_context_create_gl_no_window(float width, + float height, + float density, + int32_t font_color, + float ppi, + uint32_t direction, + bool alpha); + +const char *canvas_native_context_get_filter(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_filter(struct CanvasRenderingContext2D *context, const char *filter); + +const char *canvas_native_context_get_font(const struct CanvasRenderingContext2D *context); + +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); + +bool canvas_native_context_get_image_smoothing_enabled(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_image_smoothing_enabled(struct CanvasRenderingContext2D *context, + bool enabled); + +const char *canvas_native_context_get_image_smoothing_quality(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_image_smoothing_quality(struct CanvasRenderingContext2D *context, + const char *quality); + +const char *canvas_native_context_get_line_join(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_line_join(struct CanvasRenderingContext2D *context, + const char *join); + +const char *canvas_native_context_get_line_cap(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_line_cap(struct CanvasRenderingContext2D *context, const char *cap); + +float canvas_native_context_get_miter_limit(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_miter_limit(struct CanvasRenderingContext2D *context, float limit); + +const char *canvas_native_context_get_shadow_color(const struct CanvasRenderingContext2D *context); + +struct U8Buffer *canvas_native_context_get_shadow_color_buf(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_get_shadow_color_rgba(const struct CanvasRenderingContext2D *context, + uint8_t *r, + uint8_t *g, + uint8_t *b, + uint8_t *a); + +void canvas_native_context_set_shadow_color(struct CanvasRenderingContext2D *context, + const char *color); + +void canvas_native_context_set_shadow_color_rgba(struct CanvasRenderingContext2D *context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); + +float canvas_native_context_get_shadow_blur(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_shadow_blur(struct CanvasRenderingContext2D *context, float blur); + +float canvas_native_context_get_shadow_offset_x(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_shadow_offset_x(struct CanvasRenderingContext2D *context, float x); + +float canvas_native_context_get_shadow_offset_y(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_shadow_offset_y(struct CanvasRenderingContext2D *context, float y); + +const char *canvas_native_context_get_text_align(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_text_align(struct CanvasRenderingContext2D *context, + const char *alignment); + +const char *canvas_native_context_get_global_composition(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_global_composition(struct CanvasRenderingContext2D *context, + const char *composition); + +void canvas_native_paint_style_set_fill_color_with_c_string(struct CanvasRenderingContext2D *context, + const char *color); + +void canvas_native_paint_style_set_stroke_color_with_c_string(struct CanvasRenderingContext2D *context, + const char *color); + +void canvas_native_paint_style_set_stroke_color_with_rgba(struct CanvasRenderingContext2D *context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); + +void canvas_native_paint_style_set_fill_color_with_rgba(struct CanvasRenderingContext2D *context, + uint8_t r, + uint8_t g, + uint8_t b, + uint8_t a); + +bool canvas_native_parse_css_color_rgba(const char *value, + uint8_t *r, + uint8_t *g, + uint8_t *b, + uint8_t *a); + +const char *canvas_native_paint_style_get_color_string(const struct PaintStyle *color); + +const char *canvas_native_paint_style_get_current_stroke_color_string(const struct CanvasRenderingContext2D *context); + +struct U8Buffer *canvas_native_paint_style_get_current_stroke_color_buf(const struct CanvasRenderingContext2D *context); + +void canvas_native_paint_style_get_current_stroke_color_r_g_b_a(const struct CanvasRenderingContext2D *context, + uint8_t *r, + uint8_t *g, + uint8_t *b, + uint8_t *a); + +void canvas_native_paint_style_get_current_fill_color_r_g_b_a(const struct CanvasRenderingContext2D *context, + uint8_t *r, + uint8_t *g, + uint8_t *b, + uint8_t *a); + +const char *canvas_native_paint_style_get_current_fill_color_string(const struct CanvasRenderingContext2D *context); + +struct U8Buffer *canvas_native_paint_style_get_current_fill_color_buf(struct CanvasRenderingContext2D *context); + +enum PaintStyleType canvas_native_context_get_style_type(const struct PaintStyle *style); + +enum PaintStyleType canvas_native_context_get_current_fill_style_type(struct CanvasRenderingContext2D *context); + +enum PaintStyleType canvas_native_context_get_current_stroke_style_type(struct CanvasRenderingContext2D *context); + +struct PaintStyle *canvas_native_context_get_fill_style(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_fill_style(struct CanvasRenderingContext2D *context, + const struct PaintStyle *style); + +struct PaintStyle *canvas_native_context_get_stroke_style(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_stroke_style(struct CanvasRenderingContext2D *context, + const struct PaintStyle *style); + +float canvas_native_context_get_line_width(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_line_width(struct CanvasRenderingContext2D *context, float width); + +float canvas_native_context_get_line_dash_offset(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_line_dash_offset(struct CanvasRenderingContext2D *context, + float offset); + +struct F32Buffer *canvas_native_context_get_line_dash(const struct CanvasRenderingContext2D *context); + +void canvas_native_context_set_line_dash(struct CanvasRenderingContext2D *context, + const float *dash, + uintptr_t size); + +void canvas_native_context_arc(struct CanvasRenderingContext2D *context, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anticlockwise); + +void canvas_native_context_arc_to(struct CanvasRenderingContext2D *context, + float x1, + float y1, + float x2, + float y2, + float radius); + +void canvas_native_context_begin_path(struct CanvasRenderingContext2D *context); + +void canvas_native_context_bezier_curve_to(struct CanvasRenderingContext2D *context, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); + +void canvas_native_context_clear_rect(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + float height); + +void canvas_native_context_clip(struct CanvasRenderingContext2D *context, + struct Path *path, + const char *rule); + +void canvas_native_context_clip_rule(struct CanvasRenderingContext2D *context, const char *rule); + +void canvas_native_context_close_path(struct CanvasRenderingContext2D *context); + +struct ImageData *canvas_native_context_create_image_data(int32_t width, int32_t height); + +struct ImageData *canvas_native_context_create_image_data_with_data(int32_t width, + int32_t height, + const uint8_t *data, + uintptr_t size); + +struct PaintStyle *canvas_native_context_create_linear_gradient(struct CanvasRenderingContext2D *context, + float x0, + float y0, + float x1, + float y1); + +struct PaintStyle *canvas_native_context_create_conic_gradient(struct CanvasRenderingContext2D *context, + float start_angle, + float x, + float y); + +struct PaintStyle *canvas_native_context_create_pattern(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + int32_t width, + int32_t height, + const char *repetition); + +struct PaintStyle *canvas_native_context_create_pattern_asset(struct CanvasRenderingContext2D *context, + struct ImageAsset *asset, + const char *repetition); + +struct PaintStyle *canvas_native_context_create_pattern_encoded(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + const char *repetition); + +struct PaintStyle *canvas_native_context_create_pattern_canvas2d(struct CanvasRenderingContext2D *source, + struct CanvasRenderingContext2D *context, + const char *repetition); + +struct PaintStyle *canvas_native_context_create_radial_gradient(struct CanvasRenderingContext2D *context, + float x0, + float y0, + float r0, + float x1, + float y1, + float r1); + +void canvas_native_context_draw_paint(struct CanvasRenderingContext2D *context, const char *color); + +void canvas_native_context_draw_point(struct CanvasRenderingContext2D *context, float x, float y); + +void canvas_native_context_draw_points(struct CanvasRenderingContext2D *context, + int32_t mode, + const float *points, + uintptr_t size); + +void canvas_native_context_draw_image_dx_dy(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float width, + float height, + float dx, + float dy); + +void canvas_native_context_draw_image_dx_dy_dw_dh(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float width, + float height, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float width, + float height, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_encoded_dx_dy(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float dx, + float dy); + +void canvas_native_context_draw_image_encoded_dx_dy_dw_dh(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_encoded(struct CanvasRenderingContext2D *context, + const uint8_t *data, + uintptr_t size, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_dx_dy_asset(struct CanvasRenderingContext2D *context, + struct ImageAsset *asset, + float dx, + float dy); + +void canvas_native_context_draw_image_dx_dy_dw_dh_asset(struct CanvasRenderingContext2D *context, + struct ImageAsset *asset, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_asset(struct CanvasRenderingContext2D *context, + struct ImageAsset *asset, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_dx_dy_context(struct CanvasRenderingContext2D *context, + struct CanvasRenderingContext2D *source, + float dx, + float dy); + +void canvas_native_context_draw_image_dx_dy_dw_dh_context(struct CanvasRenderingContext2D *context, + struct CanvasRenderingContext2D *source, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_draw_image_context(struct CanvasRenderingContext2D *context, + struct CanvasRenderingContext2D *source, + float sx, + float sy, + float s_width, + float s_height, + float dx, + float dy, + float d_width, + float d_height); + +void canvas_native_context_ellipse(struct CanvasRenderingContext2D *context, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); + +void canvas_native_context_fill(struct CanvasRenderingContext2D *context, const char *rule); + +void canvas_native_context_fill_with_path(struct CanvasRenderingContext2D *context, + struct Path *path, + const char *rule); + +void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + 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, + float width); + +struct ImageData *canvas_native_context_get_image_data(struct CanvasRenderingContext2D *context, + float sx, + float sy, + float sw, + float sh); + +struct Matrix *canvas_native_context_get_transform(struct CanvasRenderingContext2D *context); + +bool canvas_native_context_is_point_in_path(struct CanvasRenderingContext2D *context, + float x, + float y, + const char *rule); + +bool canvas_native_context_is_point_in_path_with_path(struct CanvasRenderingContext2D *context, + struct Path *path, + float x, + float y, + const char *rule); + +bool canvas_native_context_is_point_in_stroke(struct CanvasRenderingContext2D *context, + float x, + float y); + +bool canvas_native_context_is_point_in_stroke_with_path(struct CanvasRenderingContext2D *context, + struct Path *path, + float x, + float y); + +void canvas_native_context_line_to(struct CanvasRenderingContext2D *context, float x, float y); + +struct TextMetrics *canvas_native_context_measure_text(struct CanvasRenderingContext2D *context, + const char *text); + +void canvas_native_context_move_to(struct CanvasRenderingContext2D *context, float x, float y); + +void canvas_native_context_put_image_data(struct CanvasRenderingContext2D *context, + struct ImageData *image_data, + float dx, + float dy, + float dirty_x, + float dirty_y, + float dirty_width, + float dirty_height); + +void canvas_native_context_quadratic_curve_to(struct CanvasRenderingContext2D *context, + float cpx, + float cpy, + float x, + float y); + +void canvas_native_context_rect(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + float height); + +void canvas_native_context_round_rect(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + float height, + const float *radii, + uintptr_t size); + +void canvas_native_context_round_rect_tl_tr_br_bl(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + float height, + float top_left, + float top_right, + float bottom_right, + float bottom_left); + +void canvas_native_context_reset_transform(struct CanvasRenderingContext2D *context); + +void canvas_native_context_restore(struct CanvasRenderingContext2D *context); + +void canvas_native_context_rotate(struct CanvasRenderingContext2D *context, float angle); + +void canvas_native_context_save(struct CanvasRenderingContext2D *context); + +void canvas_native_context_scale(struct CanvasRenderingContext2D *context, float x, float y); + +void canvas_native_context_set_transform(struct CanvasRenderingContext2D *context, + float a, + float b, + float c, + float d, + float e, + float f); + +void canvas_native_context_set_transform_matrix(struct CanvasRenderingContext2D *context, + struct Matrix *matrix); + +void canvas_native_context_stroke(struct CanvasRenderingContext2D *context); + +void canvas_native_context_stroke_with_path(struct CanvasRenderingContext2D *context, + struct Path *path); + +void canvas_native_context_stroke_rect(struct CanvasRenderingContext2D *context, + float x, + float y, + float width, + 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, + float width); + +void canvas_native_context_transform(struct CanvasRenderingContext2D *context, + float a, + float b, + float c, + float d, + float e, + float f); + +void canvas_native_context_translate(struct CanvasRenderingContext2D *context, float x, float y); + +void canvas_native_context_flush(struct CanvasRenderingContext2D *context); + +void canvas_native_context_render(const struct CanvasRenderingContext2D *context); + +const char *canvas_native_to_data_url(struct CanvasRenderingContext2D *context, + const char *format, + uint32_t quality); + +struct ImageAsset *canvas_native_image_bitmap_create_from_asset(struct ImageAsset *asset, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height); + +struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(struct ImageAsset *asset, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height); + +struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes, + uintptr_t size, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height); + +bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint8_t *bytes, + uintptr_t size, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height, + struct ImageAsset *output); + +struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes, + uintptr_t size, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height); + +bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(const uint8_t *bytes, + uintptr_t size, + float sx, + float sy, + float s_width, + float s_height, + bool flip_y, + enum ImageBitmapPremultiplyAlpha premultiply_alpha, + enum ImageBitmapColorSpaceConversion color_space_conversion, + enum ImageBitmapResizeQuality resize_quality, + float resize_width, + float resize_height, + struct ImageAsset *output); + +void canvas_native_path_add_path(struct Path *path, const struct Path *path_to_add); + +struct Path *canvas_native_path_create(void); + +struct Path *canvas_native_path_create_with_path(const struct Path *path); + +struct Path *canvas_native_path_create_with_string(const char *string); + +void canvas_native_path_close_path(struct Path *path); + +void canvas_native_path_move_to(struct Path *path, float x, float y); + +void canvas_native_path_line_to(struct Path *path, float x, float y); + +void canvas_native_path_bezier_curve_to(struct Path *path, + float cp1x, + float cp1y, + float cp2x, + float cp2y, + float x, + float y); + +void canvas_native_path_quadratic_curve_to(struct Path *path, + float cpx, + float cpy, + float x, + float y); + +void canvas_native_path_arc(struct Path *path, + float x, + float y, + float radius, + float start_angle, + float end_angle, + bool anti_clockwise); + +void canvas_native_path_arc_to(struct Path *path, + float x1, + float y1, + float x2, + float y2, + float radius); + +void canvas_native_path_ellipse(struct Path *path, + float x, + float y, + float radius_x, + float radius_y, + float rotation, + float start_angle, + float end_angle, + bool anticlockwise); + +void canvas_native_path_rect(struct Path *path, float x, float y, float width, float height); + +void canvas_native_path_round_rect(struct Path *path, + float x, + float y, + float width, + float height, + const float *radii, + uintptr_t size); + +void canvas_native_path_round_rect_tl_tr_br_bl(struct Path *path, + float x, + float y, + float width, + float height, + float top_left, + float top_right, + float bottom_right, + float bottom_left); + +const char *canvas_native_path_to_string(const struct Path *path); + +struct Matrix *canvas_native_matrix_create(void); + +void canvas_native_matrix_update(struct Matrix *matrix, const float *slice, uintptr_t size); + +void canvas_native_matrix_update_3d(struct Matrix *matrix, const float *slice, uintptr_t size); + +float canvas_native_matrix_get_a(const struct Matrix *matrix); + +void canvas_native_matrix_set_a(struct Matrix *matrix, float a); + +float canvas_native_matrix_get_b(const struct Matrix *matrix); + +void canvas_native_matrix_set_b(struct Matrix *matrix, float b); + +float canvas_native_matrix_get_c(const struct Matrix *matrix); + +void canvas_native_matrix_set_c(struct Matrix *matrix, float c); + +float canvas_native_matrix_get_d(const struct Matrix *matrix); + +void canvas_native_matrix_set_d(struct Matrix *matrix, float d); + +float canvas_native_matrix_get_e(const struct Matrix *matrix); + +void canvas_native_matrix_set_e(struct Matrix *matrix, float e); + +float canvas_native_matrix_get_f(const struct Matrix *matrix); + +void canvas_native_matrix_set_f(struct Matrix *matrix, float f); + +float canvas_native_matrix_get_m11(const struct Matrix *matrix); + +void canvas_native_matrix_set_m11(struct Matrix *matrix, float m11); + +float canvas_native_matrix_get_m12(const struct Matrix *matrix); + +void canvas_native_matrix_set_m12(struct Matrix *matrix, float m12); + +float canvas_native_matrix_get_m13(const struct Matrix *matrix); + +void canvas_native_matrix_set_m13(struct Matrix *matrix, float m13); + +float canvas_native_matrix_get_m14(const struct Matrix *matrix); + +void canvas_native_matrix_set_m14(struct Matrix *matrix, float m14); + +float canvas_native_matrix_get_m21(const struct Matrix *matrix); + +void canvas_native_matrix_set_m21(struct Matrix *matrix, float m21); + +float canvas_native_matrix_get_m22(const struct Matrix *matrix); + +void canvas_native_matrix_set_m22(struct Matrix *matrix, float m22); + +float canvas_native_matrix_get_m23(const struct Matrix *matrix); + +void canvas_native_matrix_set_m23(struct Matrix *matrix, float m23); + +float canvas_native_matrix_get_m24(const struct Matrix *matrix); + +void canvas_native_matrix_set_m24(struct Matrix *matrix, float m24); + +float canvas_native_matrix_get_m31(const struct Matrix *matrix); + +void canvas_native_matrix_set_m31(struct Matrix *matrix, float m31); + +float canvas_native_matrix_get_m32(const struct Matrix *matrix); + +void canvas_native_matrix_set_m32(struct Matrix *matrix, float m32); + +float canvas_native_matrix_get_m33(const struct Matrix *matrix); + +void canvas_native_matrix_set_m33(struct Matrix *matrix, float m33); + +float canvas_native_matrix_get_m34(const struct Matrix *matrix); + +void canvas_native_matrix_set_m34(struct Matrix *matrix, float m34); + +float canvas_native_matrix_get_m41(const struct Matrix *matrix); + +void canvas_native_matrix_set_m41(struct Matrix *matrix, float m41); + +float canvas_native_matrix_get_m42(const struct Matrix *matrix); + +void canvas_native_matrix_set_m42(struct Matrix *matrix, float m42); + +float canvas_native_matrix_get_m43(const struct Matrix *matrix); + +void canvas_native_matrix_set_m43(struct Matrix *matrix, float m43); + +float canvas_native_matrix_get_m44(const struct Matrix *matrix); + +void canvas_native_matrix_set_m44(struct Matrix *matrix, float m44); + +struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height); + +int32_t canvas_native_image_data_get_width(const struct ImageData *image_data); + +int32_t canvas_native_image_data_get_height(const struct ImageData *image_data); + +struct U8Buffer *canvas_native_image_data_get_data(struct ImageData *image_data); + +struct ImageData *canvas_native_image_data_get_shared_instance(struct ImageData *image_data); + +struct ImageAsset *canvas_native_image_asset_create(void); + +struct ImageAsset *canvas_native_image_asset_shared_clone(struct ImageAsset *asset); + +bool canvas_native_image_asset_load_from_fd(struct ImageAsset *asset, int fd); + +bool canvas_native_image_asset_load_from_path(struct ImageAsset *asset, const char *path); + +bool canvas_native_image_asset_load_from_raw(struct ImageAsset *asset, + const uint8_t *array, + uintptr_t size); + +bool canvas_native_image_asset_load_from_url(struct ImageAsset *asset, const char *url); + +int64_t canvas_native_image_asset_addr(struct ImageAsset *asset); + +uint32_t canvas_native_image_asset_width(struct ImageAsset *asset); + +uint32_t canvas_native_image_asset_height(struct ImageAsset *asset); + +const char *canvas_native_image_asset_get_error(struct ImageAsset *asset); + +bool canvas_native_image_asset_has_error(struct ImageAsset *asset); + +bool canvas_native_image_asset_scale(struct ImageAsset *asset, uint32_t x, uint32_t y); + +bool canvas_native_image_asset_save_path(struct ImageAsset *asset, + const char *path, + uint32_t format); + +float canvas_native_text_metrics_get_width(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_actual_bounding_box_left(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_actual_bounding_box_right(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_actual_bounding_box_ascent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_actual_bounding_box_descent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_font_bounding_box_ascent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_font_bounding_box_descent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_em_height_ascent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_em_height_descent(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_hanging_baseline(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_alphabetic_baseline(const struct TextMetrics *metrics); + +float canvas_native_text_metrics_get_ideographic_baseline(const struct TextMetrics *metrics); + +struct PaintStyle *canvas_native_paint_style_from_bytes(const struct CanvasRenderingContext2D *context, + int32_t repetition, + int32_t width, + int32_t height, + const uint8_t *bytes, + uintptr_t size); + +struct PaintStyle *canvas_native_pattern_from_ptr(int64_t ptr); + +struct PaintStyle *canvas_native_paint_style_empty(void); + +void canvas_native_gradient_add_color_stop(struct PaintStyle *style, float stop, const char *color); + +void canvas_native_pattern_set_transform(struct PaintStyle *pattern, const struct Matrix *matrix); + +struct TextDecoder *canvas_native_text_decoder_create(const char *decoding); + +const char *canvas_native_text_decoder_decode(const struct TextDecoder *decoder, + const uint8_t *data, + uintptr_t size); + +void canvas_native_ccow_destroy(struct CCow *cow); + +const uint8_t *canvas_native_ccow_get_bytes(const struct CCow *cow); + +uintptr_t canvas_native_ccow_get_length(const struct CCow *cow); + +struct CCow *canvas_native_text_decoder_decode_as_cow(const struct TextDecoder *decoder, + const uint8_t *data, + uintptr_t size); + +struct U8Buffer *canvas_native_text_decoder_decode_as_bytes(const struct TextDecoder *decoder, + const uint8_t *data, + uintptr_t size); + +const char *canvas_native_text_decoder_decode_c_string(const struct TextDecoder *decoder, + const char *data); + +const char *canvas_native_text_decoder_get_encoding(const struct TextDecoder *decoder); + +struct TextEncoder *canvas_native_text_encoder_create(const char *encoding); + +struct U8Buffer *canvas_native_text_encoder_encode(const struct TextEncoder *encoder, + const char *text); + +const char *canvas_native_text_encoder_get_encoding(const struct TextEncoder *encoder); + +bool canvas_native_context_gl_make_current(const struct CanvasRenderingContext2D *context); + +bool canvas_native_context_gl_swap_buffers(const struct CanvasRenderingContext2D *context); + +struct PaintStyle *canvas_native_context_create_pattern_webgl(struct WebGLState *source, + struct CanvasRenderingContext2D *context, + const char *repetition); + +bool canvas_native_webgl_make_current(struct WebGLState *state); + +bool canvas_native_webgl_swap_buffers(struct WebGLState *state); + +void canvas_native_webgl_resized(struct WebGLState *_state); + +const char *canvas_native_webgl_to_data_url(struct WebGLState *state, + const char *format, + uint32_t quality); + +void canvas_native_webgl_state_destroy(struct WebGLState *state); + +void canvas_native_webgl_active_info_destroy(struct WebGLActiveInfo *info); + +void canvas_native_context_attributes_destroy(struct ContextAttributes *attr); + +void canvas_native_webgl_framebuffer_attachment_parameter_destroy(struct WebGLFramebufferAttachmentParameter *parameter); + +void canvas_native_webgl_shader_precision_format_destroy(struct WebGLShaderPrecisionFormat *value); + +void canvas_native_webgl_extension_destroy(struct WebGLExtension *value); + +void canvas_native_webgl_EXT_blend_minmax_destroy(struct EXT_blend_minmax *value); + +void canvas_native_webgl_EXT_color_buffer_half_float_destroy(struct EXT_color_buffer_half_float *value); + +void canvas_native_webgl_EXT_disjoint_timer_query_destroy(struct EXT_disjoint_timer_query *value); + +void canvas_native_webgl_EXT_sRGB_destroy(struct EXT_disjoint_timer_query *value); + +void canvas_native_webgl_EXT_shader_texture_lod_destroy(struct EXT_shader_texture_lod *value); + +void canvas_native_webgl_EXT_texture_filter_anisotropic_destroy(struct EXT_texture_filter_anisotropic *value); + +void canvas_native_webgl_OES_element_index_uint_destroy(struct OES_element_index_uint *value); + +void canvas_native_webgl_OES_standard_derivatives_destroy(struct OES_standard_derivatives *value); + +void canvas_native_webgl_OES_texture_float_destroy(struct OES_texture_float *value); + +void canvas_native_webgl_OES_texture_float_linear_destroy(struct OES_texture_float_linear *value); + +void canvas_native_webgl_OES_texture_half_float_destroy(struct OES_texture_half_float *value); + +void canvas_native_webgl_OES_texture_half_float_linear_destroy(struct OES_texture_half_float_linear *value); + +void canvas_native_webgl_OES_vertex_array_object_destroy(struct OES_vertex_array_object *value); + +void canvas_native_webgl_WEBGL_color_buffer_float_destroy(struct WEBGL_color_buffer_float *value); + +void canvas_native_webgl_WEBGL_compressed_texture_atc_destroy(struct WEBGL_compressed_texture_atc *value); + +void canvas_native_webgl_WEBGL_compressed_texture_etc1_destroy(struct WEBGL_compressed_texture_etc1 *value); + +void canvas_native_webgl_WEBGL_compressed_texture_s3tc_destroy(struct WEBGL_compressed_texture_s3tc *value); + +void canvas_native_webgl_WEBGL_compressed_texture_s3tc_srgb_destroy(struct WEBGL_compressed_texture_s3tc_srgb *value); + +void canvas_native_webgl_WEBGL_compressed_texture_etc_destroy(struct WEBGL_compressed_texture_etc *value); + +void canvas_native_webgl_WEBGL_compressed_texture_pvrtc_destroy(struct WEBGL_compressed_texture_pvrtc *value); + +void canvas_native_webgl_WEBGL_lose_context_destroy(struct WEBGL_lose_context *value); + +void canvas_native_webgl_ANGLE_instanced_arrays_destroy(struct ANGLE_instanced_arrays *value); + +void canvas_native_webgl_WEBGL_depth_texture_destroy(struct WEBGL_depth_texture *value); + +void canvas_native_webgl_WEBGL_draw_buffers_destroy(struct WEBGL_draw_buffers *value); + +void canvas_native_webgl_WebGLResult_destroy(struct WebGLResult *value); + +const char *canvas_native_webgl_active_info_get_name(const struct WebGLActiveInfo *info); + +int32_t canvas_native_webgl_active_info_get_size(const struct WebGLActiveInfo *info); + +uint32_t canvas_native_webgl_active_info_get_type(const struct WebGLActiveInfo *info); + +bool canvas_native_webgl_active_info_get_is_empty(const struct WebGLActiveInfo *info); + +int32_t canvas_native_webgl_shader_precision_format_get_range_min(const struct WebGLShaderPrecisionFormat *shader); + +int32_t canvas_native_webgl_shader_precision_format_get_range_max(const struct WebGLShaderPrecisionFormat *shader); + +int32_t canvas_native_webgl_shader_precision_format_get_precision(const struct WebGLShaderPrecisionFormat *shader); + +bool canvas_native_webgl_context_attribute_get_get_alpha(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_antialias(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_depth(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_fail_if_major_performance_caveat(const struct ContextAttributes *attr); + +const char *canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_premultiplied_alpha(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_preserve_drawing_buffer(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_stencil(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_desynchronized(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_attribute_get_get_xr_compatible(const struct ContextAttributes *attr); + +bool canvas_native_webgl_context_extension_is_none(const struct WebGLExtension *extension); + +enum WebGLExtensionType canvas_native_webgl_context_extension_get_type(const struct WebGLExtension *extension); + +struct EXT_disjoint_timer_query *canvas_native_webgl_context_extension_to_ext_disjoint_timer_query(struct WebGLExtension *extension); + +struct ANGLE_instanced_arrays *canvas_native_webgl_context_extension_to_angle_instanced_arrays(struct WebGLExtension *extension); + +struct WEBGL_lose_context *canvas_native_webgl_context_extension_to_lose_context(struct WebGLExtension *extension); + +struct WEBGL_draw_buffers *canvas_native_webgl_context_extension_to_draw_buffers(struct WebGLExtension *extension); + +struct OES_vertex_array_object *canvas_native_webgl_context_extension_to_oes_vertex_array_object(struct WebGLExtension *extension); + +enum WebGLResultType canvas_native_webgl_result_get_type(const struct WebGLResult *result); + +bool canvas_native_webgl_result_get_bool(const struct WebGLResult *result); + +struct I32Buffer *canvas_native_webgl_result_get_i32_array(const struct WebGLResult *result); + +struct U32Buffer *canvas_native_webgl_result_get_u32_array(const struct WebGLResult *result); + +struct F32Buffer *canvas_native_webgl_result_get_f32_array(const struct WebGLResult *result); + +struct U8Buffer *canvas_native_webgl_result_get_bool_array(const struct WebGLResult *result); + +uint32_t canvas_native_webgl_result_get_u32(const struct WebGLResult *result); + +int32_t canvas_native_webgl_result_get_i32(const struct WebGLResult *result); + +float canvas_native_webgl_result_get_f32(const struct WebGLResult *result); + +const char *canvas_native_webgl_result_get_string(const struct WebGLResult *result); + +bool canvas_native_webgl_result_get_is_none(const struct WebGLResult *result); + +int32_t canvas_native_webgl_state_get_unpack_colorspace_conversion_webgl(struct WebGLState *state); + +bool canvas_native_webgl_state_get_flip_y(struct WebGLState *state); + +bool canvas_native_webgl_state_get_premultiplied_alpha(struct WebGLState *state); + +int32_t canvas_native_webgl_state_get_drawing_buffer_width(struct WebGLState *state); + +int32_t canvas_native_webgl_state_get_drawing_buffer_height(struct WebGLState *state); + +uint32_t canvas_native_webgl_ext_disjoint_timer_query_create_query_ext(const struct EXT_disjoint_timer_query *query); + +void canvas_native_webgl_ext_disjoint_timer_query_delete_query_ext(uint32_t value, + const struct EXT_disjoint_timer_query *query); + +bool canvas_native_webgl_ext_disjoint_timer_query_is_query_ext(uint32_t value, + const struct EXT_disjoint_timer_query *query); + +void canvas_native_webgl_ext_disjoint_timer_query_begin_query_ext(uint32_t target, + uint32_t value, + const struct EXT_disjoint_timer_query *query); + +void canvas_native_webgl_ext_disjoint_timer_query_end_query_ext(uint32_t target, + const struct EXT_disjoint_timer_query *query); + +void canvas_native_webgl_ext_disjoint_timer_query_query_counter_ext(uint32_t value, + uint32_t target, + const struct EXT_disjoint_timer_query *query); + +int32_t canvas_native_webgl_ext_disjoint_timer_query_get_query_ext(uint32_t target, + uint32_t pname, + const struct EXT_disjoint_timer_query *query); + +struct WebGLResult *canvas_native_webgl_ext_disjoint_timer_query_get_query_object_ext(uint32_t target, + uint32_t pname, + const struct EXT_disjoint_timer_query *query); + +void canvas_native_webgl_angle_instanced_arrays_draw_arrays_instanced_angle(uint32_t mode, + int32_t first, + int32_t count, + int32_t primcount, + const struct ANGLE_instanced_arrays *arrays); + +void canvas_native_webgl_angle_instanced_arrays_draw_elements_instanced_angle(uint32_t mode, + int32_t count, + uint32_t type_, + int32_t offset, + int32_t primcount, + const struct ANGLE_instanced_arrays *arrays); + +void canvas_native_webgl_angle_instanced_arrays_vertex_attrib_divisor_angle(uint32_t index, + uint32_t divisor, + const struct ANGLE_instanced_arrays *arrays); + +void canvas_native_webgl_lose_context_lose_context(const struct WEBGL_lose_context *context); + +void canvas_native_webgl_lose_context_restore_context(const struct WEBGL_lose_context *context); + +void canvas_native_webgl_draw_buffers_draw_buffers_webgl(const uint32_t *buffers, + uintptr_t size, + const struct WEBGL_draw_buffers *context); + +uint32_t canvas_native_webgl_oes_vertex_array_object_create_vertex_array_oes(const struct OES_vertex_array_object *object); + +void canvas_native_webgl_oes_vertex_array_object_delete_vertex_array_oes(uint32_t array_object, + const struct OES_vertex_array_object *object); + +bool canvas_native_webgl_oes_vertex_array_object_is_vertex_array_oes(uint32_t array_object, + const struct OES_vertex_array_object *object); + +void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t array_object, + const struct OES_vertex_array_object *object); + +struct WebGLState *canvas_native_webgl_create(int64_t gl_context, + const char *version, + bool alpha, + bool antialias, + bool depth, + bool fail_if_major_performance_caveat, + const char *power_preference, + bool premultiplied_alpha, + bool preserve_drawing_buffer, + bool stencil, + bool desynchronized, + bool xr_compatible); + +struct WebGLState *canvas_native_webgl_create_no_window(int32_t width, + int32_t height, + const char *version, + bool alpha, + bool antialias, + bool depth, + bool fail_if_major_performance_caveat, + const char *power_preference, + bool premultiplied_alpha, + bool preserve_drawing_buffer, + bool stencil, + bool desynchronized, + bool xr_compatible, + bool is_canvas); + +void canvas_native_webgl_active_texture(uint32_t texture, struct WebGLState *state); + +void canvas_native_webgl_attach_shader(uint32_t program, uint32_t shader, struct WebGLState *state); + +void canvas_native_webgl_bind_attrib_location(uint32_t program, + uint32_t index, + const char *name, + struct WebGLState *state); + +void canvas_native_webgl_bind_buffer(uint32_t target, uint32_t buffer, struct WebGLState *state); + +void canvas_native_webgl_bind_frame_buffer(uint32_t target, + uint32_t framebuffer, + struct WebGLState *state); + +void canvas_native_webgl_bind_render_buffer(uint32_t target, + uint32_t renderbuffer, + struct WebGLState *state); + +void canvas_native_webgl_bind_texture(uint32_t target, uint32_t texture, struct WebGLState *state); + +void canvas_native_webgl_blend_color(float red, + float green, + float blue, + float alpha, + struct WebGLState *state); + +void canvas_native_webgl_blend_equation_separate(uint32_t mode_rgb, + uint32_t mode_alpha, + struct WebGLState *state); + +void canvas_native_webgl_blend_equation(uint32_t mode, struct WebGLState *state); + +void canvas_native_webgl_blend_func_separate(uint32_t src_rgb, + uint32_t dst_rgb, + uint32_t src_alpha, + uint32_t dst_alpha, + struct WebGLState *state); + +void canvas_native_webgl_blend_func(uint32_t sfactor, uint32_t dfactor, struct WebGLState *state); + +void canvas_native_webgl_buffer_data(uint32_t target, + const uint8_t *src_data, + uintptr_t size, + uint32_t usage, + struct WebGLState *state); + +void canvas_native_webgl_buffer_data_u16(uint32_t target, + const uint16_t *src_data, + uintptr_t size, + uint32_t usage, + struct WebGLState *state); + +void canvas_native_webgl_buffer_data_f32(uint32_t target, + const float *src_data, + uintptr_t size, + uint32_t usage, + struct WebGLState *state); + +void canvas_native_webgl_buffer_data_none(uint32_t target, + intptr_t size, + uint32_t usage, + struct WebGLState *state); + +void canvas_native_webgl_buffer_sub_data(uint32_t target, + intptr_t offset, + const uint8_t *src_data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_buffer_sub_data_none(uint32_t target, + intptr_t offset, + struct WebGLState *state); + +uint32_t canvas_native_webgl_check_frame_buffer_status(uint32_t target, struct WebGLState *state); + +void canvas_native_webgl_clear(uint32_t mask, struct WebGLState *state); + +void canvas_native_webgl_clear_color(float red, + float green, + float blue, + float alpha, + struct WebGLState *state); + +void canvas_native_webgl_clear_depth(float depth, struct WebGLState *state); + +void canvas_native_webgl_clear_stencil(int32_t stencil, struct WebGLState *state); + +void canvas_native_webgl_color_mask(bool red, + bool green, + bool blue, + bool alpha, + struct WebGLState *state); + +void canvas_native_webgl_commit(struct WebGLState*); + +void canvas_native_webgl_compile_shader(uint32_t shader, struct WebGLState *state); + +void canvas_native_webgl_compressed_tex_image2d(uint32_t target, + int32_t level, + uint32_t internalformat, + int32_t width, + int32_t height, + int32_t border, + const uint8_t *pixels, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_compressed_tex_image2d_none(uint32_t target, + int32_t level, + uint32_t internalformat, + int32_t width, + int32_t height, + int32_t border, + struct WebGLState *state); + +void canvas_native_webgl_compressed_tex_sub_image2d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t width, + int32_t height, + uint32_t format, + const uint8_t *pixels, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_copy_tex_image2d(uint32_t target, + int32_t level, + uint32_t internalformat, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + int32_t border, + struct WebGLState *state); + +void canvas_native_webgl_copy_tex_sub_image2d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + struct WebGLState *state); + +uint32_t canvas_native_webgl_create_buffer(struct WebGLState *state); + +uint32_t canvas_native_webgl_create_framebuffer(struct WebGLState *state); + +uint32_t canvas_native_webgl_create_program(struct WebGLState *state); + +uint32_t canvas_native_webgl_create_renderbuffer(struct WebGLState *state); + +uint32_t canvas_native_webgl_create_shader(uint32_t shader_type, struct WebGLState *state); + +uint32_t canvas_native_webgl_create_texture(struct WebGLState *state); + +void canvas_native_webgl_cull_face(uint32_t mode, struct WebGLState *state); + +void canvas_native_webgl_delete_buffer(uint32_t buffer, struct WebGLState *state); + +void canvas_native_webgl_delete_framebuffer(uint32_t frame_buffer, struct WebGLState *state); + +void canvas_native_webgl_delete_program(uint32_t program, struct WebGLState *state); + +void canvas_native_webgl_delete_renderbuffer(uint32_t render_buffer, struct WebGLState *state); + +void canvas_native_webgl_delete_shader(uint32_t shader, struct WebGLState *state); + +void canvas_native_webgl_delete_texture(uint32_t texture, struct WebGLState *state); + +void canvas_native_webgl_depth_func(uint32_t func, struct WebGLState *state); + +void canvas_native_webgl_depth_mask(bool flag, struct WebGLState *state); + +void canvas_native_webgl_depth_range(float z_near, float z_far, struct WebGLState *state); + +void canvas_native_webgl_detach_shader(uint32_t program, uint32_t shader, struct WebGLState *state); + +void canvas_native_webgl_disable(uint32_t cap, struct WebGLState *state); + +void canvas_native_webgl_disable_vertex_attrib_array(uint32_t index, struct WebGLState *state); + +void canvas_native_webgl_draw_arrays(uint32_t mode, + int32_t first, + int32_t count, + struct WebGLState *state); + +void canvas_native_webgl_draw_elements(uint32_t mode, + int32_t count, + uint32_t element_type, + intptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl_enable(uint32_t cap, struct WebGLState *state); + +void canvas_native_webgl_enable_vertex_attrib_array(uint32_t index, struct WebGLState *state); + +void canvas_native_webgl_finish(struct WebGLState *state); + +void canvas_native_webgl_flush(struct WebGLState *state); + +void canvas_native_webgl_framebuffer_renderbuffer(uint32_t target, + uint32_t attachment, + uint32_t renderbuffertarget, + uint32_t renderbuffer, + struct WebGLState *state); + +void canvas_native_webgl_framebuffer_texture2d(uint32_t target, + uint32_t attachment, + uint32_t textarget, + uint32_t texture, + int32_t level, + struct WebGLState *state); + +void canvas_native_webgl_front_face(uint32_t mode, struct WebGLState *state); + +void canvas_native_webgl_generate_mipmap(uint32_t target, struct WebGLState *state); + +struct WebGLActiveInfo *canvas_native_webgl_get_active_attrib(uint32_t program, + uint32_t index, + struct WebGLState *state); + +struct WebGLActiveInfo *canvas_native_webgl_get_active_uniform(uint32_t program, + uint32_t index, + struct WebGLState *state); + +struct U32Buffer *canvas_native_webgl_get_attached_shaders(uint32_t program, + struct WebGLState *state); + +int32_t canvas_native_webgl_get_attrib_location(uint32_t program, + const char *name, + struct WebGLState *state); + +int32_t canvas_native_webgl_get_buffer_parameter(uint32_t target, + uint32_t pname, + struct WebGLState *state); + +struct ContextAttributes *canvas_native_webgl_get_context_attributes(struct WebGLState *state); + +uint32_t canvas_native_webgl_get_error(struct WebGLState *state); + +struct WebGLExtension *canvas_native_webgl_get_extension(const char *name, + struct WebGLState *state); + +struct WebGLFramebufferAttachmentParameter *canvas_native_webgl_get_framebuffer_attachment_parameter(uint32_t target, + uint32_t attachment, + uint32_t pname, + struct WebGLState *state); + +bool canvas_native_webgl_framebuffer_attachment_parameter_get_is_texture(const struct WebGLFramebufferAttachmentParameter *param); + +bool canvas_native_webgl_framebuffer_attachment_parameter_get_is_renderbuffer(const struct WebGLFramebufferAttachmentParameter *param); + +int32_t canvas_native_webgl_framebuffer_attachment_parameter_get_value(const struct WebGLFramebufferAttachmentParameter *param); + +struct WebGLResult *canvas_native_webgl_get_parameter(uint32_t pname, struct WebGLState *state); + +const char *canvas_native_webgl_get_program_info_log(uint32_t program, struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl_get_program_parameter(uint32_t program, + uint32_t pname, + struct WebGLState *state); + +int32_t canvas_native_webgl_get_renderbuffer_parameter(uint32_t target, + uint32_t pname, + struct WebGLState *state); + +const char *canvas_native_webgl_get_shader_info_log(uint32_t shader, struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl_get_shader_parameter(uint32_t shader, + uint32_t pname, + struct WebGLState *state); + +struct WebGLShaderPrecisionFormat *canvas_native_webgl_get_shader_precision_format(uint32_t shader_type, + uint32_t precision_type, + struct WebGLState *state); + +const char *canvas_native_webgl_get_shader_source(uint32_t shader, struct WebGLState *state); + +struct StringBuffer *canvas_native_webgl_get_supported_extensions(struct WebGLState *state); + +const char *canvas_native_webgl_get_supported_extensions_to_string(struct WebGLState *state); + +int32_t canvas_native_webgl_get_tex_parameter(uint32_t target, + uint32_t pname, + struct WebGLState *state); + +int32_t canvas_native_webgl_get_uniform_location(uint32_t program, + const char *name, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl_get_uniform(uint32_t program, + int32_t location, + struct WebGLState *state); + +uintptr_t canvas_native_webgl_get_vertex_attrib_offset(uint32_t index, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl_get_vertex_attrib(uint32_t index, + uint32_t pname, + struct WebGLState *state); + +bool canvas_native_webgl_get_is_context_lost(struct WebGLState*); + +void canvas_native_webgl_hint(uint32_t target, uint32_t mode, struct WebGLState *state); + +bool canvas_native_webgl_is_buffer(uint32_t buffer, struct WebGLState *state); + +bool canvas_native_webgl_is_enabled(uint32_t cap, struct WebGLState *state); + +bool canvas_native_webgl_is_framebuffer(uint32_t framebuffer, struct WebGLState *state); + +bool canvas_native_webgl_is_program(uint32_t program, struct WebGLState *state); + +bool canvas_native_webgl_is_renderbuffer(uint32_t renderbuffer, struct WebGLState *state); + +bool canvas_native_webgl_is_shader(uint32_t shader, struct WebGLState *state); + +bool canvas_native_webgl_is_texture(uint32_t texture, struct WebGLState *state); + +void canvas_native_webgl_line_width(float width, struct WebGLState *state); + +void canvas_native_webgl_link_program(uint32_t program, struct WebGLState *state); + +void canvas_native_webgl_pixel_storei(uint32_t pname, int32_t param, struct WebGLState *state); + +void canvas_native_webgl_polygon_offset(float factor, float units, struct WebGLState *state); + +void canvas_native_webgl_read_pixels_u8(int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t format, + uint32_t pixel_type, + uint8_t *pixels, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_read_pixels_u16(int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t format, + uint32_t pixel_type, + uint16_t *pixels, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_read_pixels_f32(int32_t x, + int32_t y, + int32_t width, + int32_t height, + uint32_t format, + uint32_t pixel_type, + float *pixels, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_renderbuffer_storage(uint32_t target, + uint32_t internal_format, + int32_t width, + int32_t height, + struct WebGLState *state); + +void canvas_native_webgl_sample_coverage(float value, bool invert, struct WebGLState *state); + +void canvas_native_webgl_scissor(int32_t x, + int32_t y, + int32_t width, + int32_t height, + struct WebGLState *state); + +void canvas_native_webgl_shader_source(uint32_t shader, + const char *source, + struct WebGLState *state); + +void canvas_native_webgl_stencil_func(uint32_t func, + int32_t reference, + uint32_t mask, + struct WebGLState *state); + +void canvas_native_webgl_stencil_func_separate(uint32_t face, + uint32_t func, + int32_t reference, + uint32_t mask, + struct WebGLState *state); + +void canvas_native_webgl_stencil_mask(uint32_t mask, struct WebGLState *state); + +void canvas_native_webgl_stencil_mask_separate(uint32_t face, + uint32_t mask, + struct WebGLState *state); + +void canvas_native_webgl_stencil_op(uint32_t fail, + uint32_t zfail, + uint32_t zpass, + struct WebGLState *state); + +void canvas_native_webgl_stencil_op_separate(uint32_t face, + uint32_t fail, + uint32_t zfail, + uint32_t zpass, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d_image_none(int32_t target, + int32_t level, + int32_t internalformat, + int32_t format, + int32_t image_type, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d_canvas2d(int32_t target, + int32_t level, + int32_t internalformat, + int32_t format, + int32_t image_type, + struct CanvasRenderingContext2D *canvas, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d_webgl(int32_t target, + int32_t level, + int32_t _internalformat, + int32_t _format, + int32_t _image_type, + struct WebGLState *webgl, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d(int32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t border, + int32_t format, + int32_t image_type, + const uint8_t *buf, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d_none(int32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t border, + int32_t format, + int32_t image_type, + struct WebGLState *state); + +void canvas_native_webgl_tex_image2d_image_asset(int32_t target, + int32_t level, + int32_t internalformat, + int32_t format, + int32_t image_type, + struct ImageAsset *image_asset, + struct WebGLState *state); + +void canvas_native_webgl_tex_parameterf(uint32_t target, + uint32_t pname, + float param, + struct WebGLState *state); + +void canvas_native_webgl_tex_parameteri(uint32_t target, + uint32_t pname, + int32_t param, + struct WebGLState *state); + +void canvas_native_webgl_tex_sub_image2d_asset(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + uint32_t format, + int32_t image_type, + struct ImageAsset *asset, + struct WebGLState *state); + +void canvas_native_webgl_tex_sub_image2d_canvas2d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + uint32_t format, + int32_t image_type, + struct CanvasRenderingContext2D *canvas, + struct WebGLState *state); + +void canvas_native_webgl_tex_sub_image2d_webgl(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + uint32_t _format, + int32_t _image_type, + struct WebGLState *webgl, + struct WebGLState *state); + +void canvas_native_webgl_tex_sub_image2d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t width, + int32_t height, + uint32_t format, + int32_t image_type, + const uint8_t *buf, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform1f(int32_t location, float v0, struct WebGLState *state); + +void canvas_native_webgl_uniform1fv(int32_t location, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform1i(int32_t location, int32_t v0, struct WebGLState *state); + +void canvas_native_webgl_uniform1iv(int32_t location, + const int32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform2f(int32_t location, float v0, float v1, struct WebGLState *state); + +void canvas_native_webgl_uniform2fv(int32_t location, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform2i(int32_t location, + int32_t v0, + int32_t v1, + struct WebGLState *state); + +void canvas_native_webgl_uniform2iv(int32_t location, + const int32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform3f(int32_t location, + float v0, + float v1, + float v2, + struct WebGLState *state); + +void canvas_native_webgl_uniform3fv(int32_t location, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform3i(int32_t location, + int32_t v0, + int32_t v1, + int32_t v2, + struct WebGLState *state); + +void canvas_native_webgl_uniform3iv(int32_t location, + const int32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform4f(int32_t location, + float v0, + float v1, + float v2, + float v3, + struct WebGLState *state); + +void canvas_native_webgl_uniform4fv(int32_t location, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform4i(int32_t location, + int32_t v0, + int32_t v1, + int32_t v2, + int32_t v3, + struct WebGLState *state); + +void canvas_native_webgl_uniform4iv(int32_t location, + const int32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform_matrix2fv(int32_t location, + bool transpose, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform_matrix3fv(int32_t location, + bool transpose, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_uniform_matrix4fv(int32_t location, + bool transpose, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_use_program(uint32_t program, struct WebGLState *state); + +void canvas_native_webgl_validate_program(uint32_t program, struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib1f(uint32_t index, float v0, struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib1fv(uint32_t index, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib2f(uint32_t index, + float v0, + float v1, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib2fv(uint32_t index, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib3f(uint32_t index, + float v0, + float v1, + float v2, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib3fv(uint32_t index, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib4f(uint32_t index, + float v0, + float v1, + float v2, + float v3, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib4fv(uint32_t index, + const float *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl_vertex_attrib_pointer(uint32_t index, + int32_t size, + uint32_t d_type, + bool normalized, + int32_t stride, + intptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl_viewport(int32_t x, + int32_t y, + int32_t width, + int32_t height, + struct WebGLState *state); + +intptr_t canvas_native_webgl2_indexed_parameter_get_value(const struct WebGLIndexedParameter *param); + +intptr_t canvas_native_webgl2_indexed_parameter_get_buffer_value(const struct WebGLIndexedParameter *param); + +bool canvas_native_webgl2_indexed_parameter_get_is_buffer(const struct WebGLIndexedParameter *param); + +void canvas_native_webgl2_begin_query(uint32_t target, uint32_t id, struct WebGLState *state); + +void canvas_native_webgl2_begin_transform_feedback(uint32_t primitive_mode, + struct WebGLState *state); + +void canvas_native_webgl2_bind_buffer_base(uint32_t target, + uint32_t index, + uint32_t buffer, + struct WebGLState *state); + +void canvas_native_webgl2_bind_buffer_range(uint32_t target, + uint32_t index, + uint32_t buffer, + intptr_t offset, + intptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_bind_sampler(uint32_t unit, uint32_t sampler, struct WebGLState *state); + +void canvas_native_webgl2_bind_transform_feedback(uint32_t target, + uint32_t transform_feedback, + struct WebGLState *state); + +void canvas_native_webgl2_bind_vertex_array(uint32_t vertex_array, struct WebGLState *state); + +void canvas_native_webgl2_blit_framebuffer(int32_t src_x0, + int32_t src_y0, + int32_t src_x1, + int32_t src_y1, + int32_t dst_x0, + int32_t dst_y0, + int32_t dst_x1, + int32_t dst_y1, + uint32_t mask, + uint32_t filter, + struct WebGLState *state); + +void canvas_native_webgl2_clear_bufferfi(uint32_t buffer, + int32_t drawbuffer, + float depth, + int32_t stencil, + struct WebGLState *state); + +void canvas_native_webgl2_clear_bufferfv(uint32_t buffer, + int32_t drawbuffer, + const float *values, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_clear_bufferiv(uint32_t buffer, + int32_t drawbuffer, + const int32_t *values, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_clear_bufferuiv(uint32_t buffer, + int32_t drawbuffer, + const uint32_t *values, + uintptr_t size, + struct WebGLState *state); + +uint32_t canvas_native_webgl2_client_wait_sync(const struct WebGLSync *sync, + uint32_t flags, + intptr_t timeout, + struct WebGLState *state); + +void canvas_native_webgl2_compressed_tex_sub_image3d_none(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + int32_t image_size, + int32_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_compressed_tex_sub_image3d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + const uint8_t *src, + uintptr_t size, + uintptr_t src_offset, + uintptr_t src_length_override, + struct WebGLState *state); + +void canvas_native_webgl2_copy_buffer_sub_data(uint32_t read_target, + uint32_t write_target, + intptr_t read_offset, + intptr_t write_offset, + intptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_copy_tex_sub_image3d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + struct WebGLState *state); + +uint32_t canvas_native_webgl2_create_query(struct WebGLState *state); + +uint32_t canvas_native_webgl2_create_sampler(struct WebGLState *state); + +uint32_t canvas_native_webgl2_create_transform_feedback(struct WebGLState *state); + +uint32_t canvas_native_webgl2_create_vertex_array(struct WebGLState *state); + +void canvas_native_webgl2_delete_query_with_query(uint32_t id, struct WebGLState *state); + +void canvas_native_webgl2_delete_sampler_with_sampler(uint32_t sampler, struct WebGLState *state); + +void canvas_native_webgl2_delete_sync_with_sync(const struct WebGLSync *sync, + struct WebGLState *state); + +void canvas_native_webgl2_delete_transform_feedback(uint32_t transform_feedback, + struct WebGLState *state); + +void canvas_native_webgl2_delete_vertex_array_with_vertex_array(uint32_t vertex_array, + struct WebGLState *state); + +void canvas_native_webgl2_draw_arrays_instanced(uint32_t mode, + int32_t first, + int32_t count, + int32_t instance_count, + struct WebGLState *state); + +void canvas_native_webgl2_draw_buffers(const uint32_t *buffers, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_draw_elements_instanced(uint32_t mode, + int32_t count, + uint32_t type_, + intptr_t offset, + int32_t instance_count, + struct WebGLState *state); + +void canvas_native_webgl2_draw_range_elements(uint32_t mode, + uint32_t start, + uint32_t end, + int32_t count, + uint32_t type_, + intptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_end_query(uint32_t target, struct WebGLState *state); + +void canvas_native_webgl2_end_transform_feedback(struct WebGLState *state); + +struct WebGLSync *canvas_native_webgl2_fence_sync(uint32_t condition, + uint32_t flags, + struct WebGLState *state); + +void canvas_native_webgl2_framebuffer_texture_layer(uint32_t target, + uint32_t attachment, + uint32_t texture, + int32_t level, + int32_t layer, + struct WebGLState *state); + +const char *canvas_native_webgl2_get_active_uniform_block_name(uint32_t program, + uint32_t uniform_block_index, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_active_uniform_block_parameter(uint32_t program, + uint32_t uniform_block_index, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_active_uniforms(uint32_t program, + const uint32_t *uniform_indices, + uintptr_t size, + uint32_t pname, + struct WebGLState *state); + +void canvas_native_webgl2_get_buffer_sub_data(uint32_t target, + intptr_t src_byte_offset, + uint8_t *dst_data, + uintptr_t size, + uintptr_t dst_offset, + uintptr_t length, + struct WebGLState *state); + +int32_t canvas_native_webgl2_get_frag_data_location(uint32_t program, + const char *name, + struct WebGLState *state); + +struct WebGLIndexedParameter *canvas_native_webgl2_get_indexed_parameter(uint32_t target, + uint32_t index, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_internalformat_parameter(uint32_t target, + uint32_t internalformat, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_parameter(uint32_t pname, struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_query_parameter(uint32_t query, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_query(uint32_t target, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_sampler_parameter(uint32_t sampler, + uint32_t pname, + struct WebGLState *state); + +struct WebGLResult *canvas_native_webgl2_get_sync_parameter(const struct WebGLSync *sync, + uint32_t pname, + struct WebGLState *state); + +struct WebGLActiveInfo *canvas_native_webgl2_get_transform_feedback_varying(uint32_t program, + uint32_t index, + struct WebGLState *state); + +uint32_t canvas_native_webgl2_get_uniform_block_index(uint32_t program, + const char *uniform_block_name, + struct WebGLState *state); + +struct U32Buffer *canvas_native_webgl2_get_uniform_indices(uint32_t program, + const char *const *uniform_names, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_invalidate_framebuffer(uint32_t target, + const uint32_t *attachments, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_invalidate_sub_framebuffer(uint32_t target, + const uint32_t *attachments, + uintptr_t size, + int32_t x, + int32_t y, + int32_t width, + int32_t height, + struct WebGLState *state); + +bool canvas_native_webgl2_is_query(uint32_t query, struct WebGLState *state); + +bool canvas_native_webgl2_is_sampler(uint32_t sampler, struct WebGLState *state); + +bool canvas_native_webgl2_is_sync(const struct WebGLSync *sync, struct WebGLState *state); + +bool canvas_native_webgl2_is_transform_feedback(uint32_t transform_feedback, + struct WebGLState *state); + +bool canvas_native_webgl2_is_vertex_array(uint32_t vertex_array, struct WebGLState *state); + +void canvas_native_webgl2_pause_transform_feedback(struct WebGLState *state); + +void canvas_native_webgl2_read_buffer(uint32_t src, struct WebGLState *state); + +void canvas_native_webgl2_renderbuffer_storage_multisample(uint32_t target, + int32_t samples, + uint32_t internal_format, + int32_t width, + int32_t height, + struct WebGLState *state); + +void canvas_native_webgl2_resume_transform_feedback(struct WebGLState *state); + +void canvas_native_webgl2_sampler_parameterf(uint32_t sampler, + uint32_t pname, + float param, + struct WebGLState *state); + +void canvas_native_webgl2_sampler_parameteri(uint32_t sampler, + uint32_t pname, + int32_t param, + struct WebGLState *state); + +void canvas_native_webgl2_tex_image3d_none(uint32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t depth, + int32_t border, + uint32_t format, + uint32_t type_, + uintptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_tex_image3d_asset(uint32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t depth, + int32_t border, + uint32_t format, + uint32_t type_, + const struct ImageAsset *asset, + struct WebGLState *state); + +void canvas_native_webgl2_tex_image3d(uint32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t depth, + int32_t border, + uint32_t format, + uint32_t type_, + const uint8_t *buf, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_tex_image3d_offset(uint32_t target, + int32_t level, + int32_t internalformat, + int32_t width, + int32_t height, + int32_t depth, + int32_t border, + uint32_t format, + uint32_t type_, + const uint8_t *buf, + uintptr_t size, + uintptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_tex_storage2d(uint32_t target, + int32_t levels, + uint32_t internalformat, + int32_t width, + int32_t height, + struct WebGLState *state); + +void canvas_native_webgl2_tex_storage3d(uint32_t target, + int32_t levels, + uint32_t internalformat, + int32_t width, + int32_t height, + int32_t depth, + struct WebGLState *state); + +void canvas_native_webgl2_tex_sub_image3d_none(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + uint32_t type_, + uintptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_tex_sub_image3d(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + uint32_t type_, + const uint8_t *buf, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_tex_sub_image3d_asset(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + uint32_t type_, + const struct ImageAsset *asset, + struct WebGLState *state); + +void canvas_native_webgl2_tex_sub_image3d_offset(uint32_t target, + int32_t level, + int32_t xoffset, + int32_t yoffset, + int32_t zoffset, + int32_t width, + int32_t height, + int32_t depth, + uint32_t format, + uint32_t type_, + const uint8_t *buf, + uintptr_t size, + uintptr_t offset, + struct WebGLState *state); + +void canvas_native_webgl2_transform_feedback_varyings(uint32_t program, + const char *const *varyings, + uintptr_t size, + uint32_t buffer_mode, + struct WebGLState *state); + +void canvas_native_webgl2_uniform1ui(int32_t location, uint32_t v0, struct WebGLState *state); + +void canvas_native_webgl2_uniform1uiv(int32_t location, + const uint32_t *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform2ui(int32_t location, + uint32_t v0, + uint32_t v1, + struct WebGLState *state); + +void canvas_native_webgl2_uniform2uiv(int32_t location, + const uint32_t *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform3ui(int32_t location, + uint32_t v0, + uint32_t v1, + uint32_t v2, + struct WebGLState *state); + +void canvas_native_webgl2_uniform3uiv(int32_t location, + const uint32_t *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform4ui(int32_t location, + uint32_t v0, + uint32_t v1, + uint32_t v2, + uint32_t v3, + struct WebGLState *state); + +void canvas_native_webgl2_uniform4uiv(int32_t location, + const uint32_t *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_block_binding(uint32_t program, + uint32_t uniform_block_index, + uint32_t uniform_block_binding, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix2x3fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix2x4fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix3x2fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix3x4fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix4x2fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_uniform_matrix4x3fv(int32_t location, + bool transpose, + const float *data, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_vertex_attrib_divisor(uint32_t index, + uint32_t divisor, + struct WebGLState *state); + +void canvas_native_webgl2_vertex_attrib_i4i(uint32_t index, + int32_t x, + int32_t y, + int32_t z, + int32_t w, + struct WebGLState *state); + +void canvas_native_webgl2_vertex_attrib_i4iv(uint32_t index, + const int32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_webgl2_vertex_attrib_i4ui(uint32_t index, + uint32_t x, + uint32_t y, + uint32_t z, + uint32_t w, + struct WebGLState *state); + +void canvas_native_webgl2_vertex_attrib_i4uiv(uint32_t index, + const uint32_t *value, + uintptr_t size, + struct WebGLState *state); + +void canvas_native_image_asset_destroy(struct ImageAsset *asset); + +void canvas_native_string_destroy(char *value); + +void canvas_native_image_data_destroy(struct ImageData *value); + +void canvas_native_matrix_destroy(struct Matrix *value); + +void canvas_native_path_destroy(struct Path *value); + +const uint8_t *canvas_native_u8_buffer_get_bytes(const struct U8Buffer *buffer); + +uint8_t *canvas_native_u8_buffer_get_bytes_mut(struct U8Buffer *buffer); + +void canvas_native_u8_buffer_destroy(struct U8Buffer *buffer); + +uintptr_t canvas_native_u8_buffer_mut_get_length(const struct U8Buffer *buffer); + +uintptr_t canvas_native_u8_buffer_get_length(const struct U8Buffer *buffer); + +const uint16_t *canvas_native_u16_buffer_get_bytes(const struct U16Buffer *buffer); + +uint16_t *canvas_native_u16_buffer_get_bytes_mut(struct U16Buffer *buffer); + +void canvas_native_u16_buffer_destroy(struct U16Buffer *buffer); + +uintptr_t canvas_native_u16_buffer_mut_get_length(const struct U16Buffer *buffer); + +uintptr_t canvas_native_u16_buffer_get_length(const struct U16Buffer *buffer); + +const uint32_t *canvas_native_u32_buffer_get_bytes(const struct U32Buffer *buffer); + +uint32_t *canvas_native_u32_buffer_get_bytes_mut(struct U32Buffer *buffer); + +void canvas_native_u32_buffer_destroy(struct U32Buffer *buffer); + +uintptr_t canvas_native_u32_buffer_mut_get_length(const struct U32Buffer *buffer); + +uintptr_t canvas_native_u32_buffer_get_length(const struct U32Buffer *buffer); + +const int32_t *canvas_native_i32_buffer_get_bytes(const struct I32Buffer *buffer); + +int32_t *canvas_native_i32_buffer_get_bytes_mut(struct I32Buffer *buffer); + +void canvas_native_i32_buffer_destroy(struct I32Buffer *buffer); + +uintptr_t canvas_native_i32_buffer_mut_get_length(const struct I32Buffer *buffer); + +uintptr_t canvas_native_i32_buffer_get_length(const struct I32Buffer *buffer); + +const float *canvas_native_f32_buffer_get_bytes(const struct F32Buffer *buffer); + +float *canvas_native_f32_buffer_get_bytes_mut(struct F32Buffer *buffer); + +void canvas_native_f32_buffer_destroy(struct F32Buffer *buffer); + +uintptr_t canvas_native_f32_buffer_mut_get_length(const struct F32Buffer *buffer); + +uintptr_t canvas_native_f32_buffer_get_length(const struct F32Buffer *buffer); + +uintptr_t canvas_native_string_buffer_get_length(const struct StringBuffer *buffer); + +char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer, uintptr_t index); + +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 8ba27317..25484a3f 100644 --- a/packages/canvas/src-native/canvas-native/playground/Cargo.toml +++ b/packages/canvas/src-native/canvas-native/playground/Cargo.toml @@ -7,6 +7,7 @@ edition = "2021" canvas-core = { path = "../canvas-core" } canvas-webgl = { path = "../canvas-webgl" } canvas-2d = { path = "../canvas-2d", features = ["gl"] } +gl-bindings = { path = "../gl-bindings" } raw-window-handle = "0.5.2" rand = "0.8.5" reqwest = { version = "0.11.14", features = ["blocking"] } 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 00000000..b37f1ccc --- /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 afc4ebbf..dcde5f17 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,12 +27,517 @@ 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::{Context, ContextWrapper}; 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(); @@ -45,39 +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, + &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(); @@ -141,6 +659,34 @@ 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(); + + 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, + value, + 0., + canvas_2d::context::text_styles::text_direction::TextDirection::LTR, + )); + event_loop.run(move |event, target, control_flow| { control_flow.set_wait(); match event { @@ -169,16 +715,21 @@ fn main() { } } 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, - // ); + if !done { + window.request_redraw(); + + canvas_native_webgl_clear_color(1., 1., 1., 1., &mut gl_state); - window.request_redraw(); + canvas_native_webgl_clear(16384, &mut gl_state); + + // test(&mut gl_state, &mut gl_state_other, &mut ctx_2d); + + leaves(&mut gl_state, &mut gl_state_other, &mut ctx_2d); + + done = true; + + gl_state.swap_buffers(); + } // rainbow_octopus(&mut ctx_2d, &mut ro); @@ -194,8 +745,9 @@ fn main() { // colorRain(&mut ctx_2d, &mut colors, &mut dots, &mut dots_vel); - if let Some(color) = PaintStyle::new_color_str("red") { + /* + 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); @@ -203,11 +755,10 @@ fn main() { 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.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.); @@ -216,25 +767,25 @@ fn main() { ctx.set_font("15px Arial"); -// Show the different textAlign values + // 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.fill_text("textAlign = end", 150., 80., None); ctx.set_text_align(TextAlign::LEFT); - ctx.fill_text("textAlign = left", 150., 100.,None); + 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.fill_text("textAlign = right", 150., 140., None); ctx.flush(); } - // println!("{}", canvas_2d::to_data_url(&mut ctx_2d, "image/jpg", 100)) - + // 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(); @@ -251,7 +802,7 @@ fn main() { // canvas_webgl::webgl::canvas_native_webgl_draw_arrays(canvas_webgl::webgl::POINTS, 0, 1, &mut gl_state); - gl_state.swap_buffers(); + // gl_state.swap_buffers(); } Event::Resumed => {} _ => {} @@ -1058,3 +1609,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 00000000..daa561d6 --- /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 2084b85b..2c8a6b9d 100644 --- a/tools/demo/canvas-three/index.ts +++ b/tools/demo/canvas-three/index.ts @@ -72,7 +72,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { // (canvas as any).scaleX = -1; //this.group(this.canvas); //this.geoTextShapes(this.canvas); - //this.geoColors(this.canvas); + this.geoColors(this.canvas); //this.threeDepth(this.canvas); //this.threeCrate(this.canvas); //this.skinningAndMorphing(this.canvas); @@ -1275,10 +1275,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)'); @@ -1286,10 +1287,12 @@ export class DemoSharedCanvasThree extends DemoSharedBase { context.fillStyle = gradient; context.fillRect(0, 0, shadow.width, shadow.height); + + 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; @@ -1309,6 +1312,7 @@ export class DemoSharedCanvasThree extends DemoSharedBase { shadowMesh.position.x = 400; shadowMesh.rotation.x = -Math.PI / 2; scene.add(shadowMesh); + var radius = 200; @@ -1365,9 +1369,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/index.ts b/tools/demo/canvas/index.ts index 3ab652ee..d792b312 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; @@ -566,7 +567,7 @@ export class DemoSharedCanvas extends DemoSharedBase { //shadowOffsetY(this.canvas); //strokeStyle(this.canvas); //multiStrokeStyle(this.canvas); - textAlign(this.canvas) + //textAlign(this.canvas) //arc(this.canvas); //arcMultiple(this.canvas); //arcTo(this.canvas); @@ -629,6 +630,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); @@ -665,6 +670,38 @@ export class DemoSharedCanvas extends DemoSharedBase { // console.timeEnd('getBoundingClientRect'); } + 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) { const width = Screen.mainScreen.widthPixels; const height = Screen.mainScreen.heightPixels; diff --git a/tools/demo/canvas/webgl/cube-example.ts b/tools/demo/canvas/webgl/cube-example.ts index c28ae4c1..2a343e78 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 00000000..201e3cad --- /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 26fd7ed1..eb0eaa94 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(); }