@nativescript/canvas 2.0.0-webgpu.30 → 2.0.0-webgpu.33
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/index.android.d.ts +6 -4
- package/Canvas/index.android.js +9 -5
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +2 -0
- package/Canvas/index.ios.d.ts +2 -0
- package/Canvas/index.ios.js +11 -13
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas/utils.js +2 -2
- package/Canvas/utils.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js +1 -0
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +22 -22
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +143 -182
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +28 -10
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +7178 -8061
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +671 -690
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +44 -44
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +143 -182
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +28 -10
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +7178 -8061
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +7178 -8061
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +24 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +39 -28
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +673 -692
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +726 -730
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +17 -55
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +6 -10
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +5 -5
|
@@ -346,23 +346,20 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
346
346
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy SWIFT_WARN_UNUSED_RESULT;
|
|
347
347
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh SWIFT_WARN_UNUSED_RESULT;
|
|
348
348
|
+ (BOOL)drawImageWithContext:(int64_t)context image:(UIImage * _Nonnull)image sx:(float)sx sy:(float)sy sw:(float)sw sh:(float)sh dx:(float)dx dy:(float)dy dw:(float)dw dh:(float)dh SWIFT_WARN_UNUSED_RESULT;
|
|
349
|
-
+ (int64_t)initWebGPUWithViewLayer:(int64_t)instance :(
|
|
350
|
-
+ (int64_t)initWebGPUWithView:(int64_t)instance :(
|
|
351
|
-
+ (void)resizeWebGPUWithView:(int64_t)context :(
|
|
352
|
-
+ (int64_t)
|
|
353
|
-
+ (int64_t)
|
|
354
|
-
+ (int64_t)initGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
355
|
-
+ (int64_t)initSharedGLWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
349
|
+
+ (int64_t)initWebGPUWithViewLayer:(int64_t)instance :(NSCCanvas * _Nonnull)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
350
|
+
+ (int64_t)initWebGPUWithView:(int64_t)instance :(NSCCanvas * _Nonnull)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
351
|
+
+ (void)resizeWebGPUWithView:(int64_t)context :(NSCCanvas * _Nonnull)view :(uint32_t)width :(uint32_t)height;
|
|
352
|
+
+ (int64_t)initWebGLWithView:(NSCCanvas * _Nonnull)view :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
353
|
+
+ (int64_t)initWebGLWithWidthAndHeight:(int32_t)width :(int32_t)height :(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)fail_if_major_performance_caveat :(int32_t)power_preference :(BOOL)premultiplied_alpha :(BOOL)preserve_drawing_buffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xr_compatible :(int32_t)version SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
356
354
|
+ (void)resize2DContext:(int64_t)context :(float)width :(float)height;
|
|
357
355
|
+ (void)flush2DContext:(int64_t)context;
|
|
358
|
-
+ (
|
|
359
|
-
+ (void)
|
|
360
|
-
+ (
|
|
361
|
-
+ (void)
|
|
362
|
-
+ (int64_t)create2DContext:(
|
|
363
|
-
+ (
|
|
364
|
-
+ (void)
|
|
365
|
-
+ (NSString * _Nonnull)testToDataURL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
|
|
356
|
+
+ (void)flush2DContextAndSyncCPU:(int64_t)context;
|
|
357
|
+
+ (void)presentDrawable:(int64_t)context;
|
|
358
|
+
+ (BOOL)flushWebGL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
|
|
359
|
+
+ (void)releaseWebGL:(int64_t)context;
|
|
360
|
+
+ (int64_t)create2DContext:(NSCCanvas * _Nonnull)view :(int32_t)width :(int32_t)height :(BOOL)alpha :(float)density :(int32_t)fontColor :(float)ppi :(int32_t)direction SWIFT_WARN_UNUSED_RESULT;
|
|
361
|
+
+ (int64_t)create2DContextMetal:(NSCCanvas * _Nonnull)view :(BOOL)alpha :(float)density :(int32_t)fontColor :(float)ppi :(int32_t)direction SWIFT_WARN_UNUSED_RESULT;
|
|
362
|
+
+ (void)updateWebGLSurfaceWithView:(int64_t)view :(int32_t)width :(int32_t)height :(int64_t)context;
|
|
366
363
|
+ (void)writeFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path :(void (^ _Nonnull)(NSString * _Nullable, NSString * _Nullable))callback;
|
|
367
364
|
+ (void)readFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSString * _Nullable, NSData * _Nullable))callback;
|
|
368
365
|
+ (void)deleteFile:(NSString * _Nonnull)path :(void (^ _Nonnull)(NSError * _Nullable, BOOL))callback;
|
|
@@ -383,15 +380,19 @@ enum CanvasFit : NSInteger;
|
|
|
383
380
|
|
|
384
381
|
SWIFT_CLASS_NAMED("NSCCanvas")
|
|
385
382
|
@interface NSCCanvas : UIView
|
|
383
|
+
SWIFT_CLASS_PROPERTY(@property (nonatomic, class) BOOL forceGL;)
|
|
384
|
+
+ (BOOL)forceGL SWIFT_WARN_UNUSED_RESULT;
|
|
385
|
+
+ (void)setForceGL:(BOOL)value;
|
|
386
386
|
@property (nonatomic) enum CanvasFit fit;
|
|
387
387
|
SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDictionary * _Nonnull store;)
|
|
388
388
|
+ (NSMutableDictionary * _Nonnull)store SWIFT_WARN_UNUSED_RESULT;
|
|
389
389
|
+ (NSMapTable<NSString *, NSCCanvas *> * _Nonnull)getViews SWIFT_WARN_UNUSED_RESULT;
|
|
390
|
-
- (void * _Nonnull)
|
|
390
|
+
- (void * _Nonnull)getGlViewPtr SWIFT_WARN_UNUSED_RESULT;
|
|
391
391
|
- (void * _Nonnull)getMtlViewPtr SWIFT_WARN_UNUSED_RESULT;
|
|
392
|
+
- (void * _Nonnull)getMtlLayerPtr SWIFT_WARN_UNUSED_RESULT;
|
|
392
393
|
@property (nonatomic) BOOL autoScale;
|
|
393
|
-
@property (nonatomic, readonly) int64_t nativeGL;
|
|
394
394
|
@property (nonatomic, readonly) int64_t nativeContext;
|
|
395
|
+
@property (nonatomic, readonly) BOOL is2D;
|
|
395
396
|
@property (nonatomic, readonly) CGFloat drawingBufferWidth;
|
|
396
397
|
@property (nonatomic, readonly) CGFloat drawingBufferHeight;
|
|
397
398
|
@property (nonatomic, readonly) float width;
|
|
@@ -401,15 +402,16 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) NSMutableDic
|
|
|
401
402
|
- (int64_t)create2DContext:(BOOL)alpha :(BOOL)antialias :(BOOL)depth :(BOOL)failIfMajorPerformanceCaveat :(int32_t)powerPreference :(BOOL)premultipliedAlpha :(BOOL)preserveDrawingBuffer :(BOOL)stencil :(BOOL)desynchronized :(BOOL)xrCompatible :(int32_t)fontColor SWIFT_WARN_UNUSED_RESULT;
|
|
402
403
|
- (UIImage * _Nullable)snapshot:(BOOL)flip SWIFT_WARN_UNUSED_RESULT;
|
|
403
404
|
- (BOOL)render;
|
|
404
|
-
- (void)context2DTest:(int64_t)context;
|
|
405
|
-
- (NSString * _Nonnull)context2DTestToDataURL:(int64_t)context SWIFT_WARN_UNUSED_RESULT;
|
|
406
405
|
@property (nonatomic, copy) void (^ _Nullable touchEventListener)(NSString * _Nonnull, UIGestureRecognizer * _Nonnull);
|
|
407
406
|
- (nullable instancetype)initWithCoder:(NSCoder * _Nonnull)coder SWIFT_UNAVAILABLE;
|
|
408
407
|
- (nonnull instancetype)initWithFrame:(CGRect)frame OBJC_DESIGNATED_INITIALIZER;
|
|
408
|
+
@property (nonatomic) BOOL ignoreTouchEvents;
|
|
409
409
|
- (void)setListener:(id <NSCCanvasListener> _Nullable)listener;
|
|
410
410
|
@property (nonatomic) NSInteger surfaceWidth;
|
|
411
411
|
@property (nonatomic) NSInteger surfaceHeight;
|
|
412
412
|
- (void)forceLayout:(CGFloat)width :(CGFloat)height;
|
|
413
|
+
- (void)context2DTest:(int64_t)context;
|
|
414
|
+
- (void)context2DPathTest:(int64_t)context;
|
|
413
415
|
- (void)layoutSubviews;
|
|
414
416
|
+ (void)getBoundingClientRect:(UIView * _Nonnull)view :(void * _Nonnull)buffer;
|
|
415
417
|
@end
|
|
@@ -453,7 +455,7 @@ SWIFT_CLASS_NAMED("NSCCanvasUtils")
|
|
|
453
455
|
+ (CVOpenGLESTextureCacheRef _Nullable)createTextureCache SWIFT_WARN_UNUSED_RESULT;
|
|
454
456
|
+ (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;
|
|
455
457
|
+ (NSCRender * _Nonnull)setupRender SWIFT_WARN_UNUSED_RESULT;
|
|
456
|
-
+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(
|
|
458
|
+
+ (void)drawFrame:(AVPlayer * _Nonnull)player :(AVPlayerItemVideoOutput * _Nonnull)output :(CGSize)videoSize :(int32_t)internalFormat :(int32_t)format :(BOOL)flipYWebGL;
|
|
457
459
|
+ (BOOL)writeToFile:(NSData * _Nonnull)data :(NSString * _Nonnull)path error:(NSError * _Nullable * _Nullable)error;
|
|
458
460
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
459
461
|
@end
|
|
@@ -480,8 +482,6 @@ SWIFT_CLASS_PROPERTY(@property (nonatomic, class, readonly, strong) dispatch_que
|
|
|
480
482
|
SWIFT_CLASS_NAMED("NSCRender")
|
|
481
483
|
@interface NSCRender : NSObject
|
|
482
484
|
- (nonnull instancetype)init OBJC_DESIGNATED_INITIALIZER;
|
|
483
|
-
- (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;
|
|
484
|
-
- (void)createSurface;
|
|
485
485
|
@end
|
|
486
486
|
|
|
487
487
|
|
package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/NSCMTLView.h
ADDED
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
//
|
|
2
|
+
// NSCMTLView.h
|
|
3
|
+
// CanvasNative
|
|
4
|
+
//
|
|
5
|
+
// Created by Osei Fortune on 08/10/2024.
|
|
6
|
+
//
|
|
7
|
+
#ifndef NSCMTLView_h
|
|
8
|
+
#define NSCMTLView_h
|
|
9
|
+
|
|
10
|
+
#import <Foundation/Foundation.h>
|
|
11
|
+
#import <UIKit/UIKit.h>
|
|
12
|
+
#import <MetalKit/MetalKit.h>
|
|
13
|
+
typedef enum {
|
|
14
|
+
kNone,
|
|
15
|
+
kPending,
|
|
16
|
+
kInvalidating
|
|
17
|
+
} NSCSurfaceState;
|
|
18
|
+
|
|
19
|
+
@interface NSCMTLView : UIView
|
|
20
|
+
@property(weak, nonatomic) UIView* canvas;
|
|
21
|
+
@property id<MTLCommandQueue> queue;
|
|
22
|
+
@property int state;
|
|
23
|
+
@property (nonatomic) CGSize drawableSize;
|
|
24
|
+
@property NSUInteger sampleCount;
|
|
25
|
+
-(void) present;
|
|
26
|
+
-(void) setup;
|
|
27
|
+
-(void*) getDevicePtr;
|
|
28
|
+
-(void*) getQueuePtr;
|
|
29
|
+
@end
|
|
30
|
+
|
|
31
|
+
|
|
32
|
+
#endif /* NSCMTLView_h */
|
package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h
CHANGED
|
@@ -8,196 +8,107 @@
|
|
|
8
8
|
#include <stdint.h>
|
|
9
9
|
#include <stdlib.h>
|
|
10
10
|
|
|
11
|
-
long long
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
11
|
+
long long canvas_native_ios_create_webgl_context(void *view,
|
|
12
|
+
bool alpha,
|
|
13
|
+
bool antialias,
|
|
14
|
+
bool depth,
|
|
15
|
+
bool fail_if_major_performance_caveat,
|
|
16
|
+
int32_t power_preference,
|
|
17
|
+
bool premultiplied_alpha,
|
|
18
|
+
bool preserve_drawing_buffer,
|
|
19
|
+
bool stencil,
|
|
20
|
+
bool desynchronized,
|
|
21
|
+
bool xr_compatible,
|
|
22
|
+
uint32_t version);
|
|
23
|
+
|
|
24
|
+
bool canvas_native_ios_flush_webgl(int64_t context);
|
|
15
25
|
|
|
16
|
-
|
|
17
|
-
long long canvas_native_init_ios_webgpu_uiview(int64_t instance,
|
|
18
|
-
int64_t view,
|
|
19
|
-
uint32_t width,
|
|
20
|
-
uint32_t height);
|
|
21
|
-
#endif
|
|
26
|
+
void canvas_native_ios_flush_2d_context(int64_t context);
|
|
22
27
|
|
|
23
|
-
|
|
24
|
-
void canvas_native_resize_ios_webgpu_uiview(int64_t context,
|
|
25
|
-
int64_t view,
|
|
26
|
-
uint32_t width,
|
|
27
|
-
uint32_t height);
|
|
28
|
-
#endif
|
|
28
|
+
void canvas_native_ios_present_drawable(int64_t context);
|
|
29
29
|
|
|
30
|
-
|
|
31
|
-
bool alpha,
|
|
32
|
-
bool antialias,
|
|
33
|
-
bool depth,
|
|
34
|
-
bool fail_if_major_performance_caveat,
|
|
35
|
-
int32_t power_preference,
|
|
36
|
-
bool premultiplied_alpha,
|
|
37
|
-
bool preserve_drawing_buffer,
|
|
38
|
-
bool stencil,
|
|
39
|
-
bool desynchronized,
|
|
40
|
-
bool xr_compatible,
|
|
41
|
-
int32_t version,
|
|
42
|
-
bool is_canvas);
|
|
43
|
-
|
|
44
|
-
long long canvas_native_init_ios_gl_with_shared_gl(int64_t view,
|
|
45
|
-
bool alpha,
|
|
46
|
-
bool antialias,
|
|
47
|
-
bool depth,
|
|
48
|
-
bool fail_if_major_performance_caveat,
|
|
49
|
-
int32_t power_preference,
|
|
50
|
-
bool premultiplied_alpha,
|
|
51
|
-
bool preserve_drawing_buffer,
|
|
52
|
-
bool stencil,
|
|
53
|
-
bool desynchronized,
|
|
54
|
-
bool xr_compatible,
|
|
55
|
-
int32_t version,
|
|
56
|
-
bool is_canvas,
|
|
57
|
-
int64_t shared_context);
|
|
58
|
-
|
|
59
|
-
long long canvas_native_init_offscreen_ios_gl(int32_t width,
|
|
60
|
-
int32_t height,
|
|
61
|
-
bool alpha,
|
|
62
|
-
bool antialias,
|
|
63
|
-
bool depth,
|
|
64
|
-
bool fail_if_major_performance_caveat,
|
|
65
|
-
int32_t power_preference,
|
|
66
|
-
bool premultiplied_alpha,
|
|
67
|
-
bool preserve_drawing_buffer,
|
|
68
|
-
bool stencil,
|
|
69
|
-
bool desynchronized,
|
|
70
|
-
bool xr_compatible,
|
|
71
|
-
int32_t version,
|
|
72
|
-
bool is_canvas);
|
|
73
|
-
|
|
74
|
-
long long canvas_native_init_offscreen_ios_gl_with_shared_gl(int32_t width,
|
|
75
|
-
int32_t height,
|
|
76
|
-
bool alpha,
|
|
77
|
-
bool antialias,
|
|
78
|
-
bool depth,
|
|
79
|
-
bool fail_if_major_performance_caveat,
|
|
80
|
-
int32_t power_preference,
|
|
81
|
-
bool premultiplied_alpha,
|
|
82
|
-
bool preserve_drawing_buffer,
|
|
83
|
-
bool stencil,
|
|
84
|
-
bool desynchronized,
|
|
85
|
-
bool xr_compatible,
|
|
86
|
-
int32_t version,
|
|
87
|
-
bool is_canvas,
|
|
88
|
-
int64_t shared_context);
|
|
89
|
-
|
|
90
|
-
bool canvas_native_ios_flush_gl(int64_t context);
|
|
30
|
+
void canvas_native_ios_flush_2d_context_and_sync_cpu(int64_t context);
|
|
91
31
|
|
|
92
|
-
void
|
|
32
|
+
void canvas_native_ios_resize_context_2d(int64_t context, float width, float height);
|
|
33
|
+
|
|
34
|
+
int64_t canvas_native_ios_create_2d_context(void *view,
|
|
35
|
+
int32_t width,
|
|
36
|
+
int32_t height,
|
|
37
|
+
bool alpha,
|
|
38
|
+
float density,
|
|
39
|
+
int32_t font_color,
|
|
40
|
+
float ppi,
|
|
41
|
+
int32_t direction);
|
|
42
|
+
|
|
43
|
+
void canvas_native_ios_update_webgl_surface(int64_t view,
|
|
44
|
+
int32_t _width,
|
|
45
|
+
int32_t _height,
|
|
46
|
+
int64_t context);
|
|
47
|
+
|
|
48
|
+
void canvas_native_ios_release_webgl(int64_t context);
|
|
49
|
+
|
|
50
|
+
void canvas_native_ios_gl_make_current(int64_t context);
|
|
93
51
|
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
int64_t
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
void canvas_native_gl_make_current(int64_t gl_context);
|
|
117
|
-
|
|
118
|
-
char *canvas_native_context_2d_test_to_data_url(int64_t context);
|
|
119
|
-
|
|
120
|
-
void canvas_native_context_2d_destroy_string(char *string);
|
|
121
|
-
|
|
122
|
-
bool canvas_native_imageasset_load_from_bytes(int64_t asset, uint8_t *bytes, uintptr_t size);
|
|
123
|
-
|
|
124
|
-
int64_t canvas_native_context_create_pattern_raw(int64_t context,
|
|
125
|
-
int32_t width,
|
|
126
|
-
int32_t height,
|
|
127
|
-
uint8_t *bytes,
|
|
128
|
-
uintptr_t size,
|
|
129
|
-
const char *repetition);
|
|
130
|
-
|
|
131
|
-
bool canvas_native_context_draw_image_dx_dy_with_bytes(int64_t context,
|
|
132
|
-
uint8_t *bytes,
|
|
133
|
-
uintptr_t size,
|
|
134
|
-
float width,
|
|
135
|
-
float height,
|
|
136
|
-
float dx,
|
|
137
|
-
float dy);
|
|
138
|
-
|
|
139
|
-
bool canvas_native_context_draw_image_dx_dy_dw_dh_with_bytes(int64_t context,
|
|
140
|
-
uint8_t *bytes,
|
|
141
|
-
uintptr_t size,
|
|
142
|
-
float width,
|
|
143
|
-
float height,
|
|
144
|
-
float dx,
|
|
145
|
-
float dy,
|
|
146
|
-
float d_width,
|
|
147
|
-
float d_height);
|
|
148
|
-
|
|
149
|
-
bool canvas_native_context_draw_image_with_bytes(int64_t context,
|
|
150
|
-
uint8_t *bytes,
|
|
151
|
-
uintptr_t size,
|
|
152
|
-
float width,
|
|
153
|
-
float height,
|
|
154
|
-
float sx,
|
|
155
|
-
float sy,
|
|
156
|
-
float s_width,
|
|
157
|
-
float s_height,
|
|
158
|
-
float dx,
|
|
159
|
-
float dy,
|
|
160
|
-
float d_width,
|
|
161
|
-
float d_height);
|
|
162
|
-
|
|
163
|
-
void canvas_native_context_custom_with_buffer_flush(int64_t context,
|
|
164
|
-
uint8_t *bytes,
|
|
165
|
-
uintptr_t size,
|
|
166
|
-
float width,
|
|
167
|
-
float height,
|
|
168
|
-
bool alpha);
|
|
169
|
-
|
|
170
|
-
long long canvas_native_context_init_context_with_custom_surface(float width,
|
|
52
|
+
bool canvas_native_ios_image_asset_load_from_bytes(int64_t asset, uint8_t *bytes, uintptr_t size);
|
|
53
|
+
|
|
54
|
+
int64_t canvas_native_ios_context_create_pattern_raw(int64_t context,
|
|
55
|
+
int32_t width,
|
|
56
|
+
int32_t height,
|
|
57
|
+
uint8_t *bytes,
|
|
58
|
+
uintptr_t size,
|
|
59
|
+
const char *repetition);
|
|
60
|
+
|
|
61
|
+
bool canvas_native_ios_context_draw_image_dx_dy_with_bytes(int64_t context,
|
|
62
|
+
uint8_t *bytes,
|
|
63
|
+
uintptr_t size,
|
|
64
|
+
float width,
|
|
65
|
+
float height,
|
|
66
|
+
float dx,
|
|
67
|
+
float dy);
|
|
68
|
+
|
|
69
|
+
bool canvas_native_ios_context_draw_image_dx_dy_dw_dh_with_bytes(int64_t context,
|
|
70
|
+
uint8_t *bytes,
|
|
71
|
+
uintptr_t size,
|
|
72
|
+
float width,
|
|
171
73
|
float height,
|
|
172
|
-
float
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
float
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
74
|
+
float dx,
|
|
75
|
+
float dy,
|
|
76
|
+
float d_width,
|
|
77
|
+
float d_height);
|
|
78
|
+
|
|
79
|
+
bool canvas_native_ios_context_draw_image_with_bytes(int64_t context,
|
|
80
|
+
uint8_t *bytes,
|
|
81
|
+
uintptr_t size,
|
|
82
|
+
float width,
|
|
83
|
+
float height,
|
|
84
|
+
float sx,
|
|
85
|
+
float sy,
|
|
86
|
+
float s_width,
|
|
87
|
+
float s_height,
|
|
88
|
+
float dx,
|
|
89
|
+
float dy,
|
|
90
|
+
float d_width,
|
|
91
|
+
float d_height);
|
|
92
|
+
|
|
93
|
+
void canvas_native_ios_context_custom_with_buffer_flush(int64_t context,
|
|
94
|
+
uint8_t *bytes,
|
|
95
|
+
uintptr_t size,
|
|
96
|
+
float width,
|
|
97
|
+
float height,
|
|
98
|
+
bool alpha);
|
|
99
|
+
|
|
100
|
+
long long canvas_native_ios_context_init_context_with_custom_surface(float width,
|
|
101
|
+
float height,
|
|
102
|
+
float density,
|
|
103
|
+
bool alpha,
|
|
104
|
+
int font_color,
|
|
105
|
+
float ppi,
|
|
106
|
+
int direction);
|
|
107
|
+
|
|
108
|
+
void canvas_native_ios_webgl_tex_image_2d(int64_t context,
|
|
197
109
|
int32_t target,
|
|
198
110
|
int32_t level,
|
|
199
|
-
int32_t
|
|
200
|
-
int32_t yoffset,
|
|
111
|
+
int32_t internalformat,
|
|
201
112
|
int32_t format,
|
|
202
113
|
int32_t type_,
|
|
203
114
|
uint8_t *bytes,
|
|
@@ -206,4 +117,54 @@ void canvas_native_webgl_tex_sub_image_2d(int64_t context,
|
|
|
206
117
|
float height,
|
|
207
118
|
bool flip_y);
|
|
208
119
|
|
|
120
|
+
void canvas_native_ios_webgl_tex_sub_image_2d(int64_t context,
|
|
121
|
+
int32_t target,
|
|
122
|
+
int32_t level,
|
|
123
|
+
int32_t xoffset,
|
|
124
|
+
int32_t yoffset,
|
|
125
|
+
int32_t format,
|
|
126
|
+
int32_t type_,
|
|
127
|
+
uint8_t *bytes,
|
|
128
|
+
uintptr_t size,
|
|
129
|
+
float width,
|
|
130
|
+
float height,
|
|
131
|
+
bool flip_y);
|
|
132
|
+
|
|
133
|
+
int64_t canvas_native_ios_create_2d_context_metal(void *view,
|
|
134
|
+
bool alpha,
|
|
135
|
+
float density,
|
|
136
|
+
uintptr_t samples,
|
|
137
|
+
int32_t font_color,
|
|
138
|
+
float ppi,
|
|
139
|
+
int32_t direction);
|
|
140
|
+
|
|
141
|
+
int64_t canvas_native_ios_create_2d_context_metal_device_queue(void *view,
|
|
142
|
+
void *device,
|
|
143
|
+
void *queue,
|
|
144
|
+
bool alpha,
|
|
145
|
+
float density,
|
|
146
|
+
uintptr_t samples,
|
|
147
|
+
int32_t font_color,
|
|
148
|
+
float ppi,
|
|
149
|
+
int32_t direction);
|
|
150
|
+
|
|
151
|
+
long long canvas_native_init_ios_webgpu(int64_t instance,
|
|
152
|
+
void *view,
|
|
153
|
+
uint32_t width,
|
|
154
|
+
uint32_t height);
|
|
155
|
+
|
|
156
|
+
#if defined(TARGET_OS_MACOS)
|
|
157
|
+
long long canvas_native_init_ios_webgpu_nsview(int64_t instance,
|
|
158
|
+
void *view,
|
|
159
|
+
uint32_t width,
|
|
160
|
+
uint32_t height);
|
|
161
|
+
#endif
|
|
162
|
+
|
|
163
|
+
#if defined(TARGET_OS_IOS)
|
|
164
|
+
void canvas_native_resize_ios_webgpu_uiview(int64_t context,
|
|
165
|
+
void *view,
|
|
166
|
+
uint32_t width,
|
|
167
|
+
uint32_t height);
|
|
168
|
+
#endif
|
|
169
|
+
|
|
209
170
|
#endif /* CANVAS_IOS_H */
|
|
@@ -1844,6 +1844,10 @@ void canvas_native_font_add_family(const char *alias,
|
|
|
1844
1844
|
const char *const *filenames,
|
|
1845
1845
|
uintptr_t length);
|
|
1846
1846
|
|
|
1847
|
+
void canvas_native_context_2d_test(int64_t context);
|
|
1848
|
+
|
|
1849
|
+
void canvas_native_context_2d_path_test(int64_t context);
|
|
1850
|
+
|
|
1847
1851
|
void canvas_native_context_release(struct CanvasRenderingContext2D *value);
|
|
1848
1852
|
|
|
1849
1853
|
#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS))
|
|
@@ -1879,11 +1883,10 @@ struct CanvasRenderingContext2D *canvas_native_context_create(float width,
|
|
|
1879
1883
|
float ppi,
|
|
1880
1884
|
uint32_t direction);
|
|
1881
1885
|
|
|
1882
|
-
struct CanvasRenderingContext2D *canvas_native_context_create_gl(
|
|
1886
|
+
struct CanvasRenderingContext2D *canvas_native_context_create_gl(void *view,
|
|
1887
|
+
float width,
|
|
1883
1888
|
float height,
|
|
1884
1889
|
float density,
|
|
1885
|
-
int64_t gl_context,
|
|
1886
|
-
int32_t samples,
|
|
1887
1890
|
bool alpha,
|
|
1888
1891
|
int32_t font_color,
|
|
1889
1892
|
float ppi,
|
|
@@ -3640,10 +3643,6 @@ struct U8Buffer *canvas_native_text_encoder_encode(const struct TextEncoder *enc
|
|
|
3640
3643
|
|
|
3641
3644
|
const char *canvas_native_text_encoder_get_encoding(const struct TextEncoder *encoder);
|
|
3642
3645
|
|
|
3643
|
-
bool canvas_native_context_gl_make_current(const struct CanvasRenderingContext2D *context);
|
|
3644
|
-
|
|
3645
|
-
bool canvas_native_context_gl_swap_buffers(const struct CanvasRenderingContext2D *context);
|
|
3646
|
-
|
|
3647
3646
|
struct PaintStyle *canvas_native_context_create_pattern_webgl(struct WebGLState *source,
|
|
3648
3647
|
struct CanvasRenderingContext2D *context,
|
|
3649
3648
|
enum CanvasRepetition repetition);
|
|
@@ -3865,7 +3864,10 @@ bool canvas_native_webgl_oes_vertex_array_object_is_vertex_array_oes(uint32_t ar
|
|
|
3865
3864
|
void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t array_object,
|
|
3866
3865
|
const struct OES_vertex_array_object *object);
|
|
3867
3866
|
|
|
3868
|
-
|
|
3867
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3868
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3869
|
+
int32_t width,
|
|
3870
|
+
int32_t height,
|
|
3869
3871
|
int32_t version,
|
|
3870
3872
|
bool alpha,
|
|
3871
3873
|
bool antialias,
|
|
@@ -3877,6 +3879,22 @@ struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
|
3877
3879
|
bool stencil,
|
|
3878
3880
|
bool desynchronized,
|
|
3879
3881
|
bool xr_compatible);
|
|
3882
|
+
#endif
|
|
3883
|
+
|
|
3884
|
+
#if !defined(TARGET_OS_ANDROID)
|
|
3885
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3886
|
+
int32_t version,
|
|
3887
|
+
bool alpha,
|
|
3888
|
+
bool antialias,
|
|
3889
|
+
bool depth,
|
|
3890
|
+
bool fail_if_major_performance_caveat,
|
|
3891
|
+
int32_t power_preference,
|
|
3892
|
+
bool premultiplied_alpha,
|
|
3893
|
+
bool preserve_drawing_buffer,
|
|
3894
|
+
bool stencil,
|
|
3895
|
+
bool desynchronized,
|
|
3896
|
+
bool xr_compatible);
|
|
3897
|
+
#endif
|
|
3880
3898
|
|
|
3881
3899
|
struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
|
|
3882
3900
|
int32_t height,
|
|
@@ -5045,8 +5063,8 @@ void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
|
|
|
5045
5063
|
int32_t xoffset,
|
|
5046
5064
|
int32_t yoffset,
|
|
5047
5065
|
int32_t zoffset,
|
|
5048
|
-
int32_t
|
|
5049
|
-
int32_t
|
|
5066
|
+
int32_t _width,
|
|
5067
|
+
int32_t _height,
|
|
5050
5068
|
int32_t depth,
|
|
5051
5069
|
uint32_t format,
|
|
5052
5070
|
uint32_t type_,
|