@nativescript/canvas 2.0.0-webgpu.11 → 2.0.0-webgpu.13
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/common.d.ts +3 -1
- package/Canvas/common.js +10 -0
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.js +7 -7
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +11 -3
- package/Canvas/index.ios.js +14 -3
- package/Canvas/index.ios.js.map +1 -1
- package/ImageAsset/index.js +39 -17
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +18 -21
- package/ImageBitmap/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js +74 -31
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +4 -4
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/GPU.js +4 -3
- package/WebGPU/GPU.js.map +1 -1
- package/WebGPU/GPUAdapter.d.ts +3 -2
- package/WebGPU/GPUAdapter.js +28 -0
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUCanvasContext.d.ts +1 -0
- package/WebGPU/GPUCanvasContext.js +17 -0
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +3 -3
- package/WebGPU/GPUDevice.js +53 -13
- package/WebGPU/GPUDevice.js.map +1 -1
- package/angular/esm2022/index.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -0
- 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 +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +7 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +170 -55
- 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 +6146 -6699
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +1 -0
- 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 +647 -645
- 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 +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +7 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +170 -55
- 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 +6146 -6699
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +6146 -6699
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +26 -26
- 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 +649 -647
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +687 -685
- package/platforms/ios/src/NSOperationQueueWrapper.h +1 -1
- package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
- package/platforms/ios/src/cpp/AsyncCallback.h +16 -8
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +116 -44
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +16 -24
- package/platforms/ios/src/cpp/ImageAssetImpl.h +3 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +22 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +6 -3
- package/platforms/ios/src/cpp/PromiseCallback.h +1 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +106 -1
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +7 -6
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +437 -439
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +35 -55
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +2 -1
- package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +23 -9
|
Binary file
|
|
@@ -347,6 +347,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
347
347
|
+ (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;
|
|
348
348
|
+ (int64_t)initWebGPUWithViewLayer:(int64_t)instance :(int64_t)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
349
349
|
+ (int64_t)initWebGPUWithView:(int64_t)instance :(int64_t)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
350
|
+
+ (void)resizeWebGPUWithView:(int64_t)context :(int64_t)view :(uint32_t)width :(uint32_t)height;
|
|
350
351
|
+ (int64_t)initGLWithView:(int64_t)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 :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
351
352
|
+ (int64_t)initSharedGLWithView:(int64_t)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 :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
352
353
|
+ (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;
|
|
@@ -849,6 +850,7 @@ SWIFT_CLASS_NAMED("CanvasHelpers")
|
|
|
849
850
|
+ (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;
|
|
850
851
|
+ (int64_t)initWebGPUWithViewLayer:(int64_t)instance :(int64_t)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
851
852
|
+ (int64_t)initWebGPUWithView:(int64_t)instance :(int64_t)view :(uint32_t)width :(uint32_t)height SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
853
|
+
+ (void)resizeWebGPUWithView:(int64_t)context :(int64_t)view :(uint32_t)width :(uint32_t)height;
|
|
852
854
|
+ (int64_t)initGLWithView:(int64_t)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 :(BOOL)is_canvas SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
853
855
|
+ (int64_t)initSharedGLWithView:(int64_t)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 :(BOOL)is_canvas :(int64_t)shared_context SWIFT_METHOD_FAMILY(none) SWIFT_WARN_UNUSED_RESULT;
|
|
854
856
|
+ (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;
|
|
@@ -20,6 +20,13 @@ long long canvas_native_init_ios_webgpu_uiview(int64_t instance,
|
|
|
20
20
|
uint32_t height);
|
|
21
21
|
#endif
|
|
22
22
|
|
|
23
|
+
#if defined(TARGET_OS_IOS)
|
|
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
|
|
29
|
+
|
|
23
30
|
long long canvas_native_init_ios_gl(int64_t view,
|
|
24
31
|
bool alpha,
|
|
25
32
|
bool antialias,
|
|
@@ -1770,6 +1770,29 @@ typedef struct CanvasOrigin2d {
|
|
|
1770
1770
|
uint32_t y;
|
|
1771
1771
|
} CanvasOrigin2d;
|
|
1772
1772
|
|
|
1773
|
+
typedef struct CanvasImageCopyImageAsset {
|
|
1774
|
+
/**
|
|
1775
|
+
* The texture to be copied from. The copy source data is captured at the moment
|
|
1776
|
+
* the copy is issued.
|
|
1777
|
+
*/
|
|
1778
|
+
const struct ImageAsset *source;
|
|
1779
|
+
/**
|
|
1780
|
+
* The base texel used for copying from the external image. Together
|
|
1781
|
+
* with the `copy_size` argument to copy functions, defines the
|
|
1782
|
+
* sub-region of the image to copy.
|
|
1783
|
+
*
|
|
1784
|
+
* Relative to the top left of the image.
|
|
1785
|
+
*
|
|
1786
|
+
* Must be [`Origin2d::ZERO`] if [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] is not supported.
|
|
1787
|
+
*/
|
|
1788
|
+
struct CanvasOrigin2d origin;
|
|
1789
|
+
/**
|
|
1790
|
+
* If the Y coordinate of the image should be flipped. Even if this is
|
|
1791
|
+
* true, `origin` is still relative to the top left.
|
|
1792
|
+
*/
|
|
1793
|
+
bool flip_y;
|
|
1794
|
+
} CanvasImageCopyImageAsset;
|
|
1795
|
+
|
|
1773
1796
|
typedef struct CanvasImageCopyExternalImage {
|
|
1774
1797
|
/**
|
|
1775
1798
|
* The texture to be copied from. The copy source data is captured at the moment
|
|
@@ -2115,7 +2138,7 @@ struct PaintStyle *canvas_native_context_create_pattern(const struct CanvasRende
|
|
|
2115
2138
|
enum CanvasRepetition repetition);
|
|
2116
2139
|
|
|
2117
2140
|
struct PaintStyle *canvas_native_context_create_pattern_asset(struct CanvasRenderingContext2D *context,
|
|
2118
|
-
struct ImageAsset *asset,
|
|
2141
|
+
const struct ImageAsset *asset,
|
|
2119
2142
|
enum CanvasRepetition repetition);
|
|
2120
2143
|
|
|
2121
2144
|
struct PaintStyle *canvas_native_context_create_pattern_encoded(struct CanvasRenderingContext2D *context,
|
|
@@ -2208,14 +2231,14 @@ void canvas_native_context_draw_image_dx_dy_asset(struct CanvasRenderingContext2
|
|
|
2208
2231
|
float dy);
|
|
2209
2232
|
|
|
2210
2233
|
void canvas_native_context_draw_image_dx_dy_dw_dh_asset(struct CanvasRenderingContext2D *context,
|
|
2211
|
-
struct ImageAsset *asset,
|
|
2234
|
+
const struct ImageAsset *asset,
|
|
2212
2235
|
float dx,
|
|
2213
2236
|
float dy,
|
|
2214
2237
|
float d_width,
|
|
2215
2238
|
float d_height);
|
|
2216
2239
|
|
|
2217
2240
|
void canvas_native_context_draw_image_asset(struct CanvasRenderingContext2D *context,
|
|
2218
|
-
struct ImageAsset *asset,
|
|
2241
|
+
const struct ImageAsset *asset,
|
|
2219
2242
|
float sx,
|
|
2220
2243
|
float sy,
|
|
2221
2244
|
float s_width,
|
|
@@ -2296,7 +2319,7 @@ void canvas_native_context_draw_atlas_encoded(struct CanvasRenderingContext2D *c
|
|
|
2296
2319
|
int32_t blend_mode);
|
|
2297
2320
|
|
|
2298
2321
|
void canvas_native_context_draw_atlas_asset(struct CanvasRenderingContext2D *context,
|
|
2299
|
-
struct ImageAsset *asset,
|
|
2322
|
+
const struct ImageAsset *asset,
|
|
2300
2323
|
const float *xform,
|
|
2301
2324
|
uintptr_t xform_size,
|
|
2302
2325
|
const float *tex,
|
|
@@ -2500,34 +2523,34 @@ void canvas_native_image_filter_reference(const struct ImageFilter *value);
|
|
|
2500
2523
|
|
|
2501
2524
|
void canvas_native_image_filter_release(const struct ImageFilter *value);
|
|
2502
2525
|
|
|
2503
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_asset(struct ImageAsset *asset,
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(struct ImageAsset *asset,
|
|
2512
|
-
|
|
2513
|
-
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2521
|
-
|
|
2522
|
-
|
|
2523
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
|
|
2524
|
-
|
|
2525
|
-
|
|
2526
|
-
|
|
2527
|
-
|
|
2528
|
-
|
|
2529
|
-
|
|
2530
|
-
|
|
2526
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset(const struct ImageAsset *asset,
|
|
2527
|
+
bool flip_y,
|
|
2528
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2529
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2530
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2531
|
+
float resize_width,
|
|
2532
|
+
float resize_height);
|
|
2533
|
+
|
|
2534
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(const struct ImageAsset *asset,
|
|
2535
|
+
float sx,
|
|
2536
|
+
float sy,
|
|
2537
|
+
float s_width,
|
|
2538
|
+
float s_height,
|
|
2539
|
+
bool flip_y,
|
|
2540
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2541
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2542
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2543
|
+
float resize_width,
|
|
2544
|
+
float resize_height);
|
|
2545
|
+
|
|
2546
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
|
|
2547
|
+
uintptr_t size,
|
|
2548
|
+
bool flip_y,
|
|
2549
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2550
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2551
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2552
|
+
float resize_width,
|
|
2553
|
+
float resize_height);
|
|
2531
2554
|
|
|
2532
2555
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint8_t *bytes,
|
|
2533
2556
|
uintptr_t size,
|
|
@@ -2537,20 +2560,20 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint
|
|
|
2537
2560
|
enum ImageBitmapResizeQuality resize_quality,
|
|
2538
2561
|
float resize_width,
|
|
2539
2562
|
float resize_height,
|
|
2540
|
-
struct ImageAsset *output);
|
|
2541
|
-
|
|
2542
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
2543
|
-
|
|
2544
|
-
|
|
2545
|
-
|
|
2546
|
-
|
|
2547
|
-
|
|
2548
|
-
|
|
2549
|
-
|
|
2550
|
-
|
|
2551
|
-
|
|
2552
|
-
|
|
2553
|
-
|
|
2563
|
+
const struct ImageAsset *output);
|
|
2564
|
+
|
|
2565
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
2566
|
+
uintptr_t size,
|
|
2567
|
+
float sx,
|
|
2568
|
+
float sy,
|
|
2569
|
+
float s_width,
|
|
2570
|
+
float s_height,
|
|
2571
|
+
bool flip_y,
|
|
2572
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2573
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2574
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2575
|
+
float resize_width,
|
|
2576
|
+
float resize_height);
|
|
2554
2577
|
|
|
2555
2578
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(const uint8_t *bytes,
|
|
2556
2579
|
uintptr_t size,
|
|
@@ -2564,7 +2587,7 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(c
|
|
|
2564
2587
|
enum ImageBitmapResizeQuality resize_quality,
|
|
2565
2588
|
float resize_width,
|
|
2566
2589
|
float resize_height,
|
|
2567
|
-
struct ImageAsset *output);
|
|
2590
|
+
const struct ImageAsset *output);
|
|
2568
2591
|
|
|
2569
2592
|
struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height);
|
|
2570
2593
|
|
|
@@ -2930,6 +2953,11 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(struct
|
|
|
2930
2953
|
uint32_t height);
|
|
2931
2954
|
#endif
|
|
2932
2955
|
|
|
2956
|
+
void canvas_native_webgpu_context_resize(struct CanvasGPUCanvasContext *context,
|
|
2957
|
+
void *window,
|
|
2958
|
+
uint32_t width,
|
|
2959
|
+
uint32_t height);
|
|
2960
|
+
|
|
2933
2961
|
#if (defined(TARGET_OS_IOS) || defined(TARGET_OS_MACOS))
|
|
2934
2962
|
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(const struct CanvasWebGPUInstance *instance,
|
|
2935
2963
|
void *view,
|
|
@@ -2944,6 +2972,13 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_uiview(
|
|
|
2944
2972
|
uint32_t height);
|
|
2945
2973
|
#endif
|
|
2946
2974
|
|
|
2975
|
+
#if defined(TARGET_OS_IOS)
|
|
2976
|
+
void canvas_native_webgpu_context_resize_uiview(const struct CanvasGPUCanvasContext *context,
|
|
2977
|
+
void *view,
|
|
2978
|
+
uint32_t width,
|
|
2979
|
+
uint32_t height);
|
|
2980
|
+
#endif
|
|
2981
|
+
|
|
2947
2982
|
#if defined(TARGET_OS_MACOS)
|
|
2948
2983
|
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(const struct CanvasWebGPUInstance *instance,
|
|
2949
2984
|
void *view,
|
|
@@ -2951,6 +2986,13 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(
|
|
|
2951
2986
|
uint32_t height);
|
|
2952
2987
|
#endif
|
|
2953
2988
|
|
|
2989
|
+
#if defined(TARGET_OS_MACOS)
|
|
2990
|
+
void canvas_native_webgpu_context_resize_nsview(const struct CanvasGPUCanvasContext *context,
|
|
2991
|
+
void *view,
|
|
2992
|
+
uint32_t width,
|
|
2993
|
+
uint32_t height);
|
|
2994
|
+
#endif
|
|
2995
|
+
|
|
2954
2996
|
void canvas_native_webgpu_context_configure(const struct CanvasGPUCanvasContext *context,
|
|
2955
2997
|
const struct CanvasGPUDevice *device,
|
|
2956
2998
|
const struct CanvasGPUSurfaceConfiguration *config);
|
|
@@ -3227,6 +3269,11 @@ void canvas_native_webgpu_queue_reference(const struct CanvasGPUQueue *queue);
|
|
|
3227
3269
|
|
|
3228
3270
|
void canvas_native_webgpu_queue_release(const struct CanvasGPUQueue *queue);
|
|
3229
3271
|
|
|
3272
|
+
void canvas_native_webgpu_queue_copy_image_asset_to_texture(const struct CanvasGPUQueue *queue,
|
|
3273
|
+
const struct CanvasImageCopyImageAsset *source,
|
|
3274
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3275
|
+
const struct CanvasExtent3d *size);
|
|
3276
|
+
|
|
3230
3277
|
void canvas_native_webgpu_queue_copy_external_image_to_texture(const struct CanvasGPUQueue *queue,
|
|
3231
3278
|
const struct CanvasImageCopyExternalImage *source,
|
|
3232
3279
|
const struct CanvasImageCopyTexture *destination,
|
|
@@ -3531,13 +3578,15 @@ struct U8Buffer *canvas_native_helper_read_file_get_data(struct FileHelper *file
|
|
|
3531
3578
|
|
|
3532
3579
|
const char *canvas_native_helper_read_file_get_error(const struct FileHelper *file);
|
|
3533
3580
|
|
|
3534
|
-
int64_t canvas_native_image_asset_get_addr(struct ImageAsset *asset);
|
|
3581
|
+
int64_t canvas_native_image_asset_get_addr(const struct ImageAsset *asset);
|
|
3582
|
+
|
|
3583
|
+
void canvas_native_image_asset_close(const struct ImageAsset *asset);
|
|
3535
3584
|
|
|
3536
|
-
struct ImageAsset *canvas_native_image_asset_create(void);
|
|
3585
|
+
const struct ImageAsset *canvas_native_image_asset_create(void);
|
|
3537
3586
|
|
|
3538
|
-
struct ImageAsset *canvas_native_image_asset_reference(struct ImageAsset *asset);
|
|
3587
|
+
const struct ImageAsset *canvas_native_image_asset_reference(const struct ImageAsset *asset);
|
|
3539
3588
|
|
|
3540
|
-
void canvas_native_image_asset_release(struct ImageAsset *asset);
|
|
3589
|
+
void canvas_native_image_asset_release(const struct ImageAsset *asset);
|
|
3541
3590
|
|
|
3542
3591
|
bool canvas_native_image_asset_load_from_fd(const struct ImageAsset *asset, int fd);
|
|
3543
3592
|
|
|
@@ -3559,8 +3608,6 @@ const char *canvas_native_image_asset_get_error(const struct ImageAsset *asset);
|
|
|
3559
3608
|
|
|
3560
3609
|
bool canvas_native_image_asset_has_error(const struct ImageAsset *asset);
|
|
3561
3610
|
|
|
3562
|
-
struct U8Buffer *canvas_native_image_asset_get_data(const struct ImageAsset *asset);
|
|
3563
|
-
|
|
3564
3611
|
void canvas_native_text_decoder_release(struct TextDecoder *value);
|
|
3565
3612
|
|
|
3566
3613
|
struct TextDecoder *canvas_native_text_decoder_create(const char *decoding);
|
|
@@ -4374,7 +4421,7 @@ void canvas_native_webgl_tex_image2d_image_asset(int32_t target,
|
|
|
4374
4421
|
int32_t internalformat,
|
|
4375
4422
|
int32_t format,
|
|
4376
4423
|
int32_t image_type,
|
|
4377
|
-
struct ImageAsset *image_asset,
|
|
4424
|
+
const struct ImageAsset *image_asset,
|
|
4378
4425
|
struct WebGLState *state);
|
|
4379
4426
|
|
|
4380
4427
|
void canvas_native_webgl_tex_parameterf(uint32_t target,
|
|
@@ -4393,7 +4440,7 @@ void canvas_native_webgl_tex_sub_image2d_asset(uint32_t target,
|
|
|
4393
4440
|
int32_t yoffset,
|
|
4394
4441
|
uint32_t format,
|
|
4395
4442
|
int32_t image_type,
|
|
4396
|
-
struct ImageAsset *asset,
|
|
4443
|
+
const struct ImageAsset *asset,
|
|
4397
4444
|
struct WebGLState *state);
|
|
4398
4445
|
|
|
4399
4446
|
void canvas_native_webgl_tex_sub_image2d_canvas2d(uint32_t target,
|
|
@@ -5134,4 +5181,72 @@ void canvas_native_webgl2_vertex_attrib_i4uiv(uint32_t index,
|
|
|
5134
5181
|
uintptr_t size,
|
|
5135
5182
|
struct WebGLState *state);
|
|
5136
5183
|
|
|
5184
|
+
void canvas_native_webgl2_tex_image2d_image_asset(int32_t target,
|
|
5185
|
+
int32_t level,
|
|
5186
|
+
int32_t internalformat,
|
|
5187
|
+
uint32_t width,
|
|
5188
|
+
uint32_t height,
|
|
5189
|
+
int32_t border,
|
|
5190
|
+
int32_t format,
|
|
5191
|
+
int32_t type_,
|
|
5192
|
+
const struct ImageAsset *image_asset,
|
|
5193
|
+
struct WebGLState *state);
|
|
5194
|
+
|
|
5195
|
+
void canvas_native_webgl2_tex_image2d_src_data_offset(int32_t target,
|
|
5196
|
+
int32_t level,
|
|
5197
|
+
int32_t internalformat,
|
|
5198
|
+
uint32_t width,
|
|
5199
|
+
uint32_t height,
|
|
5200
|
+
int32_t border,
|
|
5201
|
+
int32_t format,
|
|
5202
|
+
int32_t type_,
|
|
5203
|
+
const uint8_t *src_data,
|
|
5204
|
+
uintptr_t src_data_size,
|
|
5205
|
+
uint64_t offset,
|
|
5206
|
+
struct WebGLState *state);
|
|
5207
|
+
|
|
5208
|
+
void canvas_native_webgl2_tex_image2d_offset(int32_t target,
|
|
5209
|
+
int32_t level,
|
|
5210
|
+
int32_t internalformat,
|
|
5211
|
+
uint32_t width,
|
|
5212
|
+
uint32_t height,
|
|
5213
|
+
int32_t border,
|
|
5214
|
+
int32_t format,
|
|
5215
|
+
int32_t type_,
|
|
5216
|
+
uint64_t offset,
|
|
5217
|
+
struct WebGLState *state);
|
|
5218
|
+
|
|
5219
|
+
void canvas_native_webgl2_tex_image2d_webgl(int32_t target,
|
|
5220
|
+
int32_t level,
|
|
5221
|
+
int32_t internalformat,
|
|
5222
|
+
uint32_t width,
|
|
5223
|
+
uint32_t height,
|
|
5224
|
+
int32_t border,
|
|
5225
|
+
int32_t format,
|
|
5226
|
+
int32_t type_,
|
|
5227
|
+
struct WebGLState *webgl,
|
|
5228
|
+
struct WebGLState *state);
|
|
5229
|
+
|
|
5230
|
+
void canvas_native_webgl2_tex_image2d_canvas2d(int32_t target,
|
|
5231
|
+
int32_t level,
|
|
5232
|
+
int32_t internalformat,
|
|
5233
|
+
uint32_t width,
|
|
5234
|
+
uint32_t height,
|
|
5235
|
+
int32_t border,
|
|
5236
|
+
int32_t format,
|
|
5237
|
+
int32_t type_,
|
|
5238
|
+
struct CanvasRenderingContext2D *canvas,
|
|
5239
|
+
struct WebGLState *state);
|
|
5240
|
+
|
|
5241
|
+
void canvas_native_webgl2_tex_image2d_image_data(int32_t target,
|
|
5242
|
+
int32_t level,
|
|
5243
|
+
int32_t internalformat,
|
|
5244
|
+
uint32_t width,
|
|
5245
|
+
uint32_t height,
|
|
5246
|
+
int32_t border,
|
|
5247
|
+
int32_t format,
|
|
5248
|
+
int32_t type_,
|
|
5249
|
+
const struct ImageData *image_data,
|
|
5250
|
+
struct WebGLState *state);
|
|
5251
|
+
|
|
5137
5252
|
#endif /* CANVAS_C_H */
|
|
Binary file
|