@nativescript/canvas 2.0.0-webgpu.11 → 2.0.0-webgpu.12

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.
Files changed (74) hide show
  1. package/Canvas/common.d.ts +3 -1
  2. package/Canvas/common.js +10 -0
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.js +7 -7
  5. package/Canvas/index.android.js.map +1 -1
  6. package/Canvas/index.d.ts +11 -3
  7. package/Canvas/index.ios.js +14 -3
  8. package/Canvas/index.ios.js.map +1 -1
  9. package/ImageAsset/index.js +39 -17
  10. package/ImageAsset/index.js.map +1 -1
  11. package/ImageBitmap/index.js +18 -21
  12. package/ImageBitmap/index.js.map +1 -1
  13. package/WebGL/WebGLRenderingContext/index.js +74 -31
  14. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  15. package/WebGL2/WebGL2RenderingContext/index.js +4 -4
  16. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  17. package/WebGPU/GPU.js +4 -3
  18. package/WebGPU/GPU.js.map +1 -1
  19. package/WebGPU/GPUAdapter.d.ts +3 -2
  20. package/WebGPU/GPUAdapter.js +6 -0
  21. package/WebGPU/GPUAdapter.js.map +1 -1
  22. package/WebGPU/GPUCanvasContext.d.ts +1 -0
  23. package/WebGPU/GPUCanvasContext.js +17 -0
  24. package/WebGPU/GPUCanvasContext.js.map +1 -1
  25. package/WebGPU/GPUDevice.d.ts +3 -3
  26. package/WebGPU/GPUDevice.js +77 -15
  27. package/WebGPU/GPUDevice.js.map +1 -1
  28. package/angular/esm2022/index.mjs +4 -4
  29. package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
  30. package/package.json +1 -1
  31. package/platforms/android/canvas-release.aar +0 -0
  32. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  33. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +1 -0
  34. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +7 -0
  35. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +170 -55
  36. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  37. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +67 -20
  38. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -0
  39. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +1 -0
  40. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  41. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +647 -645
  42. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  43. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +2 -0
  44. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +7 -0
  45. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +170 -55
  46. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  47. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  48. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +67 -20
  49. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -0
  50. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
  51. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +67 -20
  52. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -0
  53. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -0
  54. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +26 -26
  55. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  56. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +649 -647
  57. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +687 -685
  58. package/platforms/ios/src/NSOperationQueueWrapper.h +1 -1
  59. package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
  60. package/platforms/ios/src/cpp/AsyncCallback.h +16 -8
  61. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +116 -44
  62. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +16 -24
  63. package/platforms/ios/src/cpp/ImageAssetImpl.h +3 -3
  64. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +22 -3
  65. package/platforms/ios/src/cpp/ImageBitmapImpl.h +6 -3
  66. package/platforms/ios/src/cpp/PromiseCallback.h +1 -2
  67. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +3 -3
  68. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +106 -1
  69. package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +7 -6
  70. package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +437 -439
  71. package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +35 -55
  72. package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +2 -1
  73. package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
  74. package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +23 -9
@@ -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
- bool flip_y,
2505
- enum ImageBitmapPremultiplyAlpha premultiply_alpha,
2506
- enum ImageBitmapColorSpaceConversion color_space_conversion,
2507
- enum ImageBitmapResizeQuality resize_quality,
2508
- float resize_width,
2509
- float resize_height);
2510
-
2511
- struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(struct ImageAsset *asset,
2512
- float sx,
2513
- float sy,
2514
- float s_width,
2515
- float s_height,
2516
- bool flip_y,
2517
- enum ImageBitmapPremultiplyAlpha premultiply_alpha,
2518
- enum ImageBitmapColorSpaceConversion color_space_conversion,
2519
- enum ImageBitmapResizeQuality resize_quality,
2520
- float resize_width,
2521
- float resize_height);
2522
-
2523
- struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
2524
- uintptr_t size,
2525
- bool flip_y,
2526
- enum ImageBitmapPremultiplyAlpha premultiply_alpha,
2527
- enum ImageBitmapColorSpaceConversion color_space_conversion,
2528
- enum ImageBitmapResizeQuality resize_quality,
2529
- float resize_width,
2530
- float resize_height);
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
- uintptr_t size,
2544
- float sx,
2545
- float sy,
2546
- float s_width,
2547
- float s_height,
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);
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 */
@@ -474,6 +474,53 @@
474
474
  ],
475
475
  "funcSelfKind": "NonMutating"
476
476
  },
477
+ {
478
+ "kind": "Function",
479
+ "name": "resizeWebGPUWithView",
480
+ "printedName": "resizeWebGPUWithView(_:_:_:_:)",
481
+ "children": [
482
+ {
483
+ "kind": "TypeNominal",
484
+ "name": "Void",
485
+ "printedName": "()"
486
+ },
487
+ {
488
+ "kind": "TypeNominal",
489
+ "name": "Int64",
490
+ "printedName": "Swift.Int64",
491
+ "usr": "s:s5Int64V"
492
+ },
493
+ {
494
+ "kind": "TypeNominal",
495
+ "name": "Int64",
496
+ "printedName": "Swift.Int64",
497
+ "usr": "s:s5Int64V"
498
+ },
499
+ {
500
+ "kind": "TypeNominal",
501
+ "name": "UInt32",
502
+ "printedName": "Swift.UInt32",
503
+ "usr": "s:s6UInt32V"
504
+ },
505
+ {
506
+ "kind": "TypeNominal",
507
+ "name": "UInt32",
508
+ "printedName": "Swift.UInt32",
509
+ "usr": "s:s6UInt32V"
510
+ }
511
+ ],
512
+ "declKind": "Func",
513
+ "usr": "c:@M@CanvasNative@objc(cs)NSSCanvasHelpers(cm)resizeWebGPUWithView::::",
514
+ "mangledName": "$s12CanvasNative0A7HelpersC20resizeWebGPUWithViewyys5Int64V_AFs6UInt32VAHtFZ",
515
+ "moduleName": "CanvasNative",
516
+ "static": true,
517
+ "declAttributes": [
518
+ "Final",
519
+ "AccessControl",
520
+ "ObjC"
521
+ ],
522
+ "funcSelfKind": "NonMutating"
523
+ },
477
524
  {
478
525
  "kind": "Function",
479
526
  "name": "initGLWithView",
@@ -6398,140 +6445,140 @@
6398
6445
  {
6399
6446
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6400
6447
  "kind": "IntegerLiteral",
6401
- "offset": 3696,
6448
+ "offset": 3709,
6402
6449
  "length": 1,
6403
6450
  "value": "1"
6404
6451
  },
6405
6452
  {
6406
6453
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6407
6454
  "kind": "BooleanLiteral",
6408
- "offset": 3599,
6455
+ "offset": 3612,
6409
6456
  "length": 4,
6410
6457
  "value": "true"
6411
6458
  },
6412
6459
  {
6413
6460
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6414
6461
  "kind": "IntegerLiteral",
6415
- "offset": 3875,
6462
+ "offset": 3888,
6416
6463
  "length": 1,
6417
6464
  "value": "0"
6418
6465
  },
6419
6466
  {
6420
6467
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6421
6468
  "kind": "IntegerLiteral",
6422
- "offset": 3933,
6469
+ "offset": 3946,
6423
6470
  "length": 1,
6424
6471
  "value": "0"
6425
6472
  },
6426
6473
  {
6427
6474
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6428
6475
  "kind": "IntegerLiteral",
6429
- "offset": 3986,
6476
+ "offset": 3999,
6430
6477
  "length": 1,
6431
6478
  "value": "0"
6432
6479
  },
6433
6480
  {
6434
6481
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6435
6482
  "kind": "BooleanLiteral",
6436
- "offset": 4017,
6483
+ "offset": 4030,
6437
6484
  "length": 5,
6438
6485
  "value": "false"
6439
6486
  },
6440
6487
  {
6441
6488
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6442
6489
  "kind": "BooleanLiteral",
6443
- "offset": 5290,
6490
+ "offset": 5303,
6444
6491
  "length": 4,
6445
6492
  "value": "true"
6446
6493
  },
6447
6494
  {
6448
6495
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6449
6496
  "kind": "BooleanLiteral",
6450
- "offset": 5324,
6497
+ "offset": 5337,
6451
6498
  "length": 4,
6452
6499
  "value": "true"
6453
6500
  },
6454
6501
  {
6455
6502
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6456
6503
  "kind": "BooleanLiteral",
6457
- "offset": 5354,
6504
+ "offset": 5367,
6458
6505
  "length": 4,
6459
6506
  "value": "true"
6460
6507
  },
6461
6508
  {
6462
6509
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6463
6510
  "kind": "BooleanLiteral",
6464
- "offset": 5407,
6511
+ "offset": 5420,
6465
6512
  "length": 5,
6466
6513
  "value": "false"
6467
6514
  },
6468
6515
  {
6469
6516
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6470
6517
  "kind": "IntegerLiteral",
6471
- "offset": 5449,
6518
+ "offset": 5462,
6472
6519
  "length": 1,
6473
6520
  "value": "0"
6474
6521
  },
6475
6522
  {
6476
6523
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6477
6524
  "kind": "BooleanLiteral",
6478
- "offset": 5489,
6525
+ "offset": 5502,
6479
6526
  "length": 4,
6480
6527
  "value": "true"
6481
6528
  },
6482
6529
  {
6483
6530
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6484
6531
  "kind": "BooleanLiteral",
6485
- "offset": 5535,
6532
+ "offset": 5548,
6486
6533
  "length": 5,
6487
6534
  "value": "false"
6488
6535
  },
6489
6536
  {
6490
6537
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6491
6538
  "kind": "BooleanLiteral",
6492
- "offset": 5568,
6539
+ "offset": 5581,
6493
6540
  "length": 5,
6494
6541
  "value": "false"
6495
6542
  },
6496
6543
  {
6497
6544
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6498
6545
  "kind": "BooleanLiteral",
6499
- "offset": 5608,
6546
+ "offset": 5621,
6500
6547
  "length": 5,
6501
6548
  "value": "false"
6502
6549
  },
6503
6550
  {
6504
6551
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6505
6552
  "kind": "BooleanLiteral",
6506
- "offset": 5646,
6553
+ "offset": 5659,
6507
6554
  "length": 5,
6508
6555
  "value": "false"
6509
6556
  },
6510
6557
  {
6511
6558
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6512
6559
  "kind": "BooleanLiteral",
6513
- "offset": 14877,
6560
+ "offset": 14890,
6514
6561
  "length": 5,
6515
6562
  "value": "false"
6516
6563
  },
6517
6564
  {
6518
6565
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6519
6566
  "kind": "BooleanLiteral",
6520
- "offset": 15312,
6567
+ "offset": 15325,
6521
6568
  "length": 5,
6522
6569
  "value": "false"
6523
6570
  },
6524
6571
  {
6525
6572
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6526
6573
  "kind": "IntegerLiteral",
6527
- "offset": 15358,
6574
+ "offset": 15372,
6528
6575
  "length": 3,
6529
6576
  "value": "300"
6530
6577
  },
6531
6578
  {
6532
6579
  "filePath": "\/Users\/triniwiz\/Documents\/GitHub\/canvas\/packages\/canvas\/src-native\/canvas-ios\/CanvasNative\/Source\/NSCCanvas.swift",
6533
6580
  "kind": "IntegerLiteral",
6534
- "offset": 15532,
6581
+ "offset": 15549,
6535
6582
  "length": 3,
6536
6583
  "value": "150"
6537
6584
  },
@@ -26,6 +26,7 @@ import _SwiftConcurrencyShims
26
26
  @objc public static func drawImage(context: Swift.Int64, image: UIKit.UIImage, sx: Swift.Float, sy: Swift.Float, sw: Swift.Float, sh: Swift.Float, dx: Swift.Float, dy: Swift.Float, dw: Swift.Float, dh: Swift.Float) -> Swift.Bool
27
27
  @objc public static func initWebGPUWithViewLayer(_ instance: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32) -> Swift.Int64
28
28
  @objc public static func initWebGPUWithView(_ instance: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32) -> Swift.Int64
29
+ @objc public static func resizeWebGPUWithView(_ context: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32)
29
30
  @objc public static func initGLWithView(_ view: Swift.Int64, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool) -> Swift.Int64
30
31
  @objc public static func initSharedGLWithView(_ view: Swift.Int64, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool, _ shared_context: Swift.Int64) -> Swift.Int64
31
32
  @objc public static func initGLWithWidthAndHeight(_ width: Swift.Int32, _ height: Swift.Int32, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool) -> Swift.Int64
@@ -26,6 +26,7 @@ import _SwiftConcurrencyShims
26
26
  @objc public static func drawImage(context: Swift.Int64, image: UIKit.UIImage, sx: Swift.Float, sy: Swift.Float, sw: Swift.Float, sh: Swift.Float, dx: Swift.Float, dy: Swift.Float, dw: Swift.Float, dh: Swift.Float) -> Swift.Bool
27
27
  @objc public static func initWebGPUWithViewLayer(_ instance: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32) -> Swift.Int64
28
28
  @objc public static func initWebGPUWithView(_ instance: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32) -> Swift.Int64
29
+ @objc public static func resizeWebGPUWithView(_ context: Swift.Int64, _ view: Swift.Int64, _ width: Swift.UInt32, _ height: Swift.UInt32)
29
30
  @objc public static func initGLWithView(_ view: Swift.Int64, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool) -> Swift.Int64
30
31
  @objc public static func initSharedGLWithView(_ view: Swift.Int64, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool, _ shared_context: Swift.Int64) -> Swift.Int64
31
32
  @objc public static func initGLWithWidthAndHeight(_ width: Swift.Int32, _ height: Swift.Int32, _ alpha: Swift.Bool, _ antialias: Swift.Bool, _ depth: Swift.Bool, _ fail_if_major_performance_caveat: Swift.Bool, _ power_preference: Swift.Int32, _ premultiplied_alpha: Swift.Bool, _ preserve_drawing_buffer: Swift.Bool, _ stencil: Swift.Bool, _ desynchronized: Swift.Bool, _ xr_compatible: Swift.Bool, _ version: Swift.Int32, _ is_canvas: Swift.Bool) -> Swift.Int64