@nativescript/canvas 2.0.0-webgpu.4 → 2.0.0-webgpu.41
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 +5 -10
- package/Canvas/common.js +61 -144
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +6 -5
- package/Canvas/index.android.js +63 -42
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +13 -3
- package/Canvas/index.ios.d.ts +9 -1
- package/Canvas/index.ios.js +117 -66
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas/utils.d.ts +3 -0
- package/Canvas/utils.js +85 -0
- package/Canvas/utils.js.map +1 -0
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +3 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js +2 -4
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Dom/Group.d.ts +1 -2
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.js +0 -1
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.d.ts +1 -1
- package/Dom/shapes/Path.d.ts +1 -1
- package/ImageAsset/index.d.ts +4 -2
- package/ImageAsset/index.js +151 -37
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +107 -20
- package/ImageBitmap/index.js.map +1 -1
- package/README.md +2 -4
- package/WebGL/WebGLRenderingContext/common.d.ts +1 -1
- package/WebGL/WebGLRenderingContext/index.js +76 -32
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +5 -5
- 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 +6 -3
- package/WebGPU/GPUAdapter.js +31 -0
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUBindGroup.d.ts +1 -0
- package/WebGPU/GPUBindGroup.js +3 -0
- package/WebGPU/GPUBindGroup.js.map +1 -1
- package/WebGPU/GPUBindGroupLayout.d.ts +1 -0
- package/WebGPU/GPUBindGroupLayout.js +3 -0
- package/WebGPU/GPUBindGroupLayout.js.map +1 -1
- package/WebGPU/GPUBuffer.js +10 -2
- package/WebGPU/GPUBuffer.js.map +1 -1
- package/WebGPU/GPUCanvasContext.d.ts +5 -3
- package/WebGPU/GPUCanvasContext.js +52 -10
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUCommandBuffer.d.ts +1 -0
- package/WebGPU/GPUCommandBuffer.js +3 -0
- package/WebGPU/GPUCommandBuffer.js.map +1 -1
- package/WebGPU/GPUCommandEncoder.d.ts +3 -9
- package/WebGPU/GPUCommandEncoder.js +94 -41
- package/WebGPU/GPUCommandEncoder.js.map +1 -1
- package/WebGPU/GPUComputePassEncoder.d.ts +1 -0
- package/WebGPU/GPUComputePassEncoder.js +3 -0
- package/WebGPU/GPUComputePassEncoder.js.map +1 -1
- package/WebGPU/GPUComputePipeline.d.ts +1 -0
- package/WebGPU/GPUComputePipeline.js +3 -0
- package/WebGPU/GPUComputePipeline.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +17 -79
- package/WebGPU/GPUDevice.js +75 -91
- package/WebGPU/GPUDevice.js.map +1 -1
- package/WebGPU/GPUExternalTexture.d.ts +1 -0
- package/WebGPU/GPUExternalTexture.js +3 -0
- package/WebGPU/GPUExternalTexture.js.map +1 -1
- package/WebGPU/GPUPipelineLayout.d.ts +1 -0
- package/WebGPU/GPUPipelineLayout.js +3 -0
- package/WebGPU/GPUPipelineLayout.js.map +1 -1
- package/WebGPU/GPUQuerySet.d.ts +1 -0
- package/WebGPU/GPUQuerySet.js +3 -0
- package/WebGPU/GPUQuerySet.js.map +1 -1
- package/WebGPU/GPUQueue.d.ts +1 -0
- package/WebGPU/GPUQueue.js +65 -14
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/GPURenderBundle.d.ts +1 -0
- package/WebGPU/GPURenderBundle.js +3 -0
- package/WebGPU/GPURenderBundle.js.map +1 -1
- package/WebGPU/GPURenderBundleEncoder.d.ts +4 -2
- package/WebGPU/GPURenderBundleEncoder.js +7 -3
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -1
- package/WebGPU/GPURenderPassEncoder.d.ts +5 -1
- package/WebGPU/GPURenderPassEncoder.js +14 -2
- package/WebGPU/GPURenderPassEncoder.js.map +1 -1
- package/WebGPU/GPURenderPipeline.d.ts +1 -0
- package/WebGPU/GPURenderPipeline.js +3 -0
- package/WebGPU/GPURenderPipeline.js.map +1 -1
- package/WebGPU/GPUSampler.d.ts +1 -0
- package/WebGPU/GPUSampler.js +3 -0
- package/WebGPU/GPUSampler.js.map +1 -1
- package/WebGPU/GPUShaderModule.d.ts +1 -1
- package/WebGPU/GPUShaderModule.js +2 -2
- package/WebGPU/GPUShaderModule.js.map +1 -1
- package/WebGPU/GPUTexture.d.ts +1 -0
- package/WebGPU/GPUTexture.js +3 -0
- package/WebGPU/GPUTexture.js.map +1 -1
- package/WebGPU/GPUTextureView.d.ts +1 -0
- package/WebGPU/GPUTextureView.js +3 -0
- package/WebGPU/GPUTextureView.js.map +1 -1
- package/WebGPU/Interfaces.d.ts +95 -4
- package/WebGPU/Types.d.ts +9 -1
- package/WebGPU/Utils.d.ts +6 -0
- package/WebGPU/Utils.js +226 -0
- package/WebGPU/Utils.js.map +1 -1
- package/angular/esm2022/index.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs.map +1 -1
- package/common.js.map +1 -1
- package/index.d.ts +2 -1
- package/index.js +3 -2
- package/index.js.map +1 -1
- 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 +61 -30
- 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 +144 -176
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +342 -72
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- 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 +1928 -630
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/NSCCanvas.nib +0 -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 +681 -644
- 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 +122 -60
- 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 +144 -176
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +342 -72
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- 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 +1928 -630
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +1928 -630
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +85 -23
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/NSCCanvas.nib +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +40 -29
- 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 +683 -646
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +736 -684
- 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 +310 -801
- package/platforms/ios/src/cpp/CanvasJSIModule.h +2 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +578 -413
- package/platforms/ios/src/cpp/ImageAssetImpl.h +7 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +60 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +10 -3
- package/platforms/ios/src/cpp/PromiseCallback.h +1 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +7 -11
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +5 -5
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +106 -1
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +6 -6
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +26 -23
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +31 -5
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +4 -1
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +26 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +41 -7
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +4 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +11 -5
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +28 -1
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +75 -79
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +4 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +56 -23
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +25 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +2 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +1606 -681
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +2 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +2 -1
- package/platforms/ios/src/cpp/webgpu/GPUImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +26 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +3 -1
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +1 -2
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +83 -14
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +66 -34
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +25 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +151 -52
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +7 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +25 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +26 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +4 -1
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +24 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +34 -8
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +2 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +26 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +3 -0
- package/platforms/ios/src/cpp/webgpu/GPUUtils.h +511 -0
- package/utils.d.ts +1 -1
|
@@ -594,6 +594,16 @@ typedef enum PaintStyleType {
|
|
|
594
594
|
PaintStyleTypePattern,
|
|
595
595
|
} PaintStyleType;
|
|
596
596
|
|
|
597
|
+
typedef enum SurfaceGetCurrentTextureStatus {
|
|
598
|
+
SurfaceGetCurrentTextureStatusSuccess = 0,
|
|
599
|
+
SurfaceGetCurrentTextureStatusTimeout = 1,
|
|
600
|
+
SurfaceGetCurrentTextureStatusOutdated = 2,
|
|
601
|
+
SurfaceGetCurrentTextureStatusLost = 3,
|
|
602
|
+
SurfaceGetCurrentTextureStatusOutOfMemory = 4,
|
|
603
|
+
SurfaceGetCurrentTextureStatusDeviceLost = 5,
|
|
604
|
+
SurfaceGetCurrentTextureStatusForce32 = 2147483647,
|
|
605
|
+
} SurfaceGetCurrentTextureStatus;
|
|
606
|
+
|
|
597
607
|
typedef enum TextBaseLine {
|
|
598
608
|
TextBaseLineTOP = 0,
|
|
599
609
|
TextBaseLineHANGING = 1,
|
|
@@ -943,7 +953,7 @@ typedef enum CanvasGPUTextureFormat_Tag {
|
|
|
943
953
|
/**
|
|
944
954
|
* Red, green, and blue channels. 11 bit float with no sign bit for RG channels. 10 bit float with no sign bit for blue channel. Float in shader.
|
|
945
955
|
*/
|
|
946
|
-
|
|
956
|
+
CanvasGPUTextureFormatRg11b10UFloat,
|
|
947
957
|
/**
|
|
948
958
|
* Red and green channels. 32 bit integer per channel. Unsigned in shader.
|
|
949
959
|
*/
|
|
@@ -1760,6 +1770,75 @@ typedef struct CanvasOrigin2d {
|
|
|
1760
1770
|
uint32_t y;
|
|
1761
1771
|
} CanvasOrigin2d;
|
|
1762
1772
|
|
|
1773
|
+
typedef struct CanvasImageCopyWebGL {
|
|
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 WebGLState *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
|
+
} CanvasImageCopyWebGL;
|
|
1795
|
+
|
|
1796
|
+
typedef struct CanvasImageCopyCanvasRenderingContext2D {
|
|
1797
|
+
/**
|
|
1798
|
+
* The texture to be copied from. The copy source data is captured at the moment
|
|
1799
|
+
* the copy is issued.
|
|
1800
|
+
*/
|
|
1801
|
+
const struct CanvasRenderingContext2D *source;
|
|
1802
|
+
/**
|
|
1803
|
+
* The base texel used for copying from the external image. Together
|
|
1804
|
+
* with the `copy_size` argument to copy functions, defines the
|
|
1805
|
+
* sub-region of the image to copy.
|
|
1806
|
+
*
|
|
1807
|
+
* Relative to the top left of the image.
|
|
1808
|
+
*
|
|
1809
|
+
* Must be [`Origin2d::ZERO`] if [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] is not supported.
|
|
1810
|
+
*/
|
|
1811
|
+
struct CanvasOrigin2d origin;
|
|
1812
|
+
/**
|
|
1813
|
+
* If the Y coordinate of the image should be flipped. Even if this is
|
|
1814
|
+
* true, `origin` is still relative to the top left.
|
|
1815
|
+
*/
|
|
1816
|
+
bool flip_y;
|
|
1817
|
+
} CanvasImageCopyCanvasRenderingContext2D;
|
|
1818
|
+
|
|
1819
|
+
typedef struct CanvasImageCopyImageAsset {
|
|
1820
|
+
/**
|
|
1821
|
+
* The texture to be copied from. The copy source data is captured at the moment
|
|
1822
|
+
* the copy is issued.
|
|
1823
|
+
*/
|
|
1824
|
+
const struct ImageAsset *source;
|
|
1825
|
+
/**
|
|
1826
|
+
* The base texel used for copying from the external image. Together
|
|
1827
|
+
* with the `copy_size` argument to copy functions, defines the
|
|
1828
|
+
* sub-region of the image to copy.
|
|
1829
|
+
*
|
|
1830
|
+
* Relative to the top left of the image.
|
|
1831
|
+
*
|
|
1832
|
+
* Must be [`Origin2d::ZERO`] if [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] is not supported.
|
|
1833
|
+
*/
|
|
1834
|
+
struct CanvasOrigin2d origin;
|
|
1835
|
+
/**
|
|
1836
|
+
* If the Y coordinate of the image should be flipped. Even if this is
|
|
1837
|
+
* true, `origin` is still relative to the top left.
|
|
1838
|
+
*/
|
|
1839
|
+
bool flip_y;
|
|
1840
|
+
} CanvasImageCopyImageAsset;
|
|
1841
|
+
|
|
1763
1842
|
typedef struct CanvasImageCopyExternalImage {
|
|
1764
1843
|
/**
|
|
1765
1844
|
* The texture to be copied from. The copy source data is captured at the moment
|
|
@@ -1807,10 +1886,21 @@ typedef struct CanvasCreateTextureViewDescriptor {
|
|
|
1807
1886
|
const struct CanvasImageSubresourceRange *range;
|
|
1808
1887
|
} CanvasCreateTextureViewDescriptor;
|
|
1809
1888
|
|
|
1889
|
+
typedef struct FileHelperMime {
|
|
1890
|
+
const char *mime_type;
|
|
1891
|
+
const char *extension;
|
|
1892
|
+
} FileHelperMime;
|
|
1893
|
+
|
|
1810
1894
|
void canvas_native_font_add_family(const char *alias,
|
|
1811
1895
|
const char *const *filenames,
|
|
1812
1896
|
uintptr_t length);
|
|
1813
1897
|
|
|
1898
|
+
void canvas_native_context_2d_test(int64_t context);
|
|
1899
|
+
|
|
1900
|
+
void canvas_native_context_2d_path_test(int64_t context);
|
|
1901
|
+
|
|
1902
|
+
void canvas_native_context_2d_conic_test(int64_t context);
|
|
1903
|
+
|
|
1814
1904
|
void canvas_native_context_release(struct CanvasRenderingContext2D *value);
|
|
1815
1905
|
|
|
1816
1906
|
#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS))
|
|
@@ -1846,11 +1936,10 @@ struct CanvasRenderingContext2D *canvas_native_context_create(float width,
|
|
|
1846
1936
|
float ppi,
|
|
1847
1937
|
uint32_t direction);
|
|
1848
1938
|
|
|
1849
|
-
struct CanvasRenderingContext2D *canvas_native_context_create_gl(
|
|
1939
|
+
struct CanvasRenderingContext2D *canvas_native_context_create_gl(void *view,
|
|
1940
|
+
float width,
|
|
1850
1941
|
float height,
|
|
1851
1942
|
float density,
|
|
1852
|
-
int64_t gl_context,
|
|
1853
|
-
int32_t samples,
|
|
1854
1943
|
bool alpha,
|
|
1855
1944
|
int32_t font_color,
|
|
1856
1945
|
float ppi,
|
|
@@ -2105,7 +2194,7 @@ struct PaintStyle *canvas_native_context_create_pattern(const struct CanvasRende
|
|
|
2105
2194
|
enum CanvasRepetition repetition);
|
|
2106
2195
|
|
|
2107
2196
|
struct PaintStyle *canvas_native_context_create_pattern_asset(struct CanvasRenderingContext2D *context,
|
|
2108
|
-
struct ImageAsset *asset,
|
|
2197
|
+
const struct ImageAsset *asset,
|
|
2109
2198
|
enum CanvasRepetition repetition);
|
|
2110
2199
|
|
|
2111
2200
|
struct PaintStyle *canvas_native_context_create_pattern_encoded(struct CanvasRenderingContext2D *context,
|
|
@@ -2198,14 +2287,14 @@ void canvas_native_context_draw_image_dx_dy_asset(struct CanvasRenderingContext2
|
|
|
2198
2287
|
float dy);
|
|
2199
2288
|
|
|
2200
2289
|
void canvas_native_context_draw_image_dx_dy_dw_dh_asset(struct CanvasRenderingContext2D *context,
|
|
2201
|
-
struct ImageAsset *asset,
|
|
2290
|
+
const struct ImageAsset *asset,
|
|
2202
2291
|
float dx,
|
|
2203
2292
|
float dy,
|
|
2204
2293
|
float d_width,
|
|
2205
2294
|
float d_height);
|
|
2206
2295
|
|
|
2207
2296
|
void canvas_native_context_draw_image_asset(struct CanvasRenderingContext2D *context,
|
|
2208
|
-
struct ImageAsset *asset,
|
|
2297
|
+
const struct ImageAsset *asset,
|
|
2209
2298
|
float sx,
|
|
2210
2299
|
float sy,
|
|
2211
2300
|
float s_width,
|
|
@@ -2286,7 +2375,7 @@ void canvas_native_context_draw_atlas_encoded(struct CanvasRenderingContext2D *c
|
|
|
2286
2375
|
int32_t blend_mode);
|
|
2287
2376
|
|
|
2288
2377
|
void canvas_native_context_draw_atlas_asset(struct CanvasRenderingContext2D *context,
|
|
2289
|
-
struct ImageAsset *asset,
|
|
2378
|
+
const struct ImageAsset *asset,
|
|
2290
2379
|
const float *xform,
|
|
2291
2380
|
uintptr_t xform_size,
|
|
2292
2381
|
const float *tex,
|
|
@@ -2490,34 +2579,34 @@ void canvas_native_image_filter_reference(const struct ImageFilter *value);
|
|
|
2490
2579
|
|
|
2491
2580
|
void canvas_native_image_filter_release(const struct ImageFilter *value);
|
|
2492
2581
|
|
|
2493
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_asset(struct ImageAsset *asset,
|
|
2494
|
-
|
|
2495
|
-
|
|
2496
|
-
|
|
2497
|
-
|
|
2498
|
-
|
|
2499
|
-
|
|
2500
|
-
|
|
2501
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(struct ImageAsset *asset,
|
|
2502
|
-
|
|
2503
|
-
|
|
2504
|
-
|
|
2505
|
-
|
|
2506
|
-
|
|
2507
|
-
|
|
2508
|
-
|
|
2509
|
-
|
|
2510
|
-
|
|
2511
|
-
|
|
2512
|
-
|
|
2513
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
|
|
2514
|
-
|
|
2515
|
-
|
|
2516
|
-
|
|
2517
|
-
|
|
2518
|
-
|
|
2519
|
-
|
|
2520
|
-
|
|
2582
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset(const struct ImageAsset *asset,
|
|
2583
|
+
bool flip_y,
|
|
2584
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2585
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2586
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2587
|
+
float resize_width,
|
|
2588
|
+
float resize_height);
|
|
2589
|
+
|
|
2590
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(const struct ImageAsset *asset,
|
|
2591
|
+
float sx,
|
|
2592
|
+
float sy,
|
|
2593
|
+
float s_width,
|
|
2594
|
+
float s_height,
|
|
2595
|
+
bool flip_y,
|
|
2596
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2597
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2598
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2599
|
+
float resize_width,
|
|
2600
|
+
float resize_height);
|
|
2601
|
+
|
|
2602
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
|
|
2603
|
+
uintptr_t size,
|
|
2604
|
+
bool flip_y,
|
|
2605
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2606
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2607
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2608
|
+
float resize_width,
|
|
2609
|
+
float resize_height);
|
|
2521
2610
|
|
|
2522
2611
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint8_t *bytes,
|
|
2523
2612
|
uintptr_t size,
|
|
@@ -2527,20 +2616,20 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint
|
|
|
2527
2616
|
enum ImageBitmapResizeQuality resize_quality,
|
|
2528
2617
|
float resize_width,
|
|
2529
2618
|
float resize_height,
|
|
2530
|
-
struct ImageAsset *output);
|
|
2531
|
-
|
|
2532
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
2533
|
-
|
|
2534
|
-
|
|
2535
|
-
|
|
2536
|
-
|
|
2537
|
-
|
|
2538
|
-
|
|
2539
|
-
|
|
2540
|
-
|
|
2541
|
-
|
|
2542
|
-
|
|
2543
|
-
|
|
2619
|
+
const struct ImageAsset *output);
|
|
2620
|
+
|
|
2621
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
2622
|
+
uintptr_t size,
|
|
2623
|
+
float sx,
|
|
2624
|
+
float sy,
|
|
2625
|
+
float s_width,
|
|
2626
|
+
float s_height,
|
|
2627
|
+
bool flip_y,
|
|
2628
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2629
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2630
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2631
|
+
float resize_width,
|
|
2632
|
+
float resize_height);
|
|
2544
2633
|
|
|
2545
2634
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(const uint8_t *bytes,
|
|
2546
2635
|
uintptr_t size,
|
|
@@ -2554,7 +2643,7 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(c
|
|
|
2554
2643
|
enum ImageBitmapResizeQuality resize_quality,
|
|
2555
2644
|
float resize_width,
|
|
2556
2645
|
float resize_height,
|
|
2557
|
-
struct ImageAsset *output);
|
|
2646
|
+
const struct ImageAsset *output);
|
|
2558
2647
|
|
|
2559
2648
|
struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height);
|
|
2560
2649
|
|
|
@@ -2876,14 +2965,20 @@ void canvas_native_webgpu_adapter_info_reference(const struct CanvasGPUAdapterIn
|
|
|
2876
2965
|
|
|
2877
2966
|
void canvas_native_webgpu_adapter_info_release(const struct CanvasGPUAdapterInfo *info);
|
|
2878
2967
|
|
|
2968
|
+
char *canvas_native_webgpu_bind_group_get_label(const struct CanvasGPUBindGroup *bind_group);
|
|
2969
|
+
|
|
2879
2970
|
void canvas_native_webgpu_bind_group_reference(const struct CanvasGPUBindGroup *bind_group);
|
|
2880
2971
|
|
|
2881
2972
|
void canvas_native_webgpu_bind_group_release(const struct CanvasGPUBindGroup *bind_group);
|
|
2882
2973
|
|
|
2974
|
+
char *canvas_native_webgpu_bind_group_layout_get_label(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2975
|
+
|
|
2883
2976
|
void canvas_native_webgpu_bind_group_layout_reference(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2884
2977
|
|
|
2885
2978
|
void canvas_native_webgpu_bind_group_layout_release(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2886
2979
|
|
|
2980
|
+
char *canvas_native_webgpu_buffer_get_label(const struct CanvasGPUBuffer *buffer);
|
|
2981
|
+
|
|
2887
2982
|
void canvas_native_webgpu_buffer_reference(const struct CanvasGPUBuffer *buffer);
|
|
2888
2983
|
|
|
2889
2984
|
void canvas_native_webgpu_buffer_release(const struct CanvasGPUBuffer *buffer);
|
|
@@ -2904,7 +2999,7 @@ void canvas_native_webgpu_buffer_map_async(const struct CanvasGPUBuffer *buffer,
|
|
|
2904
2999
|
enum GPUMapMode mode,
|
|
2905
3000
|
int64_t offset,
|
|
2906
3001
|
int64_t size,
|
|
2907
|
-
void (*callback)(char*, void*),
|
|
3002
|
+
void (*callback)(enum CanvasGPUErrorType, char*, void*),
|
|
2908
3003
|
void *callback_data);
|
|
2909
3004
|
|
|
2910
3005
|
#if defined(TARGET_OS_ANDROID)
|
|
@@ -2914,6 +3009,13 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(struct
|
|
|
2914
3009
|
uint32_t height);
|
|
2915
3010
|
#endif
|
|
2916
3011
|
|
|
3012
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3013
|
+
void canvas_native_webgpu_context_resize(struct CanvasGPUCanvasContext *context,
|
|
3014
|
+
void *window,
|
|
3015
|
+
uint32_t width,
|
|
3016
|
+
uint32_t height);
|
|
3017
|
+
#endif
|
|
3018
|
+
|
|
2917
3019
|
#if (defined(TARGET_OS_IOS) || defined(TARGET_OS_MACOS))
|
|
2918
3020
|
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(const struct CanvasWebGPUInstance *instance,
|
|
2919
3021
|
void *view,
|
|
@@ -2928,6 +3030,13 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_uiview(
|
|
|
2928
3030
|
uint32_t height);
|
|
2929
3031
|
#endif
|
|
2930
3032
|
|
|
3033
|
+
#if defined(TARGET_OS_IOS)
|
|
3034
|
+
void canvas_native_webgpu_context_resize_uiview(const struct CanvasGPUCanvasContext *context,
|
|
3035
|
+
void *view,
|
|
3036
|
+
uint32_t width,
|
|
3037
|
+
uint32_t height);
|
|
3038
|
+
#endif
|
|
3039
|
+
|
|
2931
3040
|
#if defined(TARGET_OS_MACOS)
|
|
2932
3041
|
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(const struct CanvasWebGPUInstance *instance,
|
|
2933
3042
|
void *view,
|
|
@@ -2935,13 +3044,18 @@ const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(
|
|
|
2935
3044
|
uint32_t height);
|
|
2936
3045
|
#endif
|
|
2937
3046
|
|
|
3047
|
+
#if defined(TARGET_OS_MACOS)
|
|
3048
|
+
void canvas_native_webgpu_context_resize_nsview(const struct CanvasGPUCanvasContext *context,
|
|
3049
|
+
void *view,
|
|
3050
|
+
uint32_t width,
|
|
3051
|
+
uint32_t height);
|
|
3052
|
+
#endif
|
|
3053
|
+
|
|
2938
3054
|
void canvas_native_webgpu_context_configure(const struct CanvasGPUCanvasContext *context,
|
|
2939
3055
|
const struct CanvasGPUDevice *device,
|
|
2940
3056
|
const struct CanvasGPUSurfaceConfiguration *config);
|
|
2941
3057
|
|
|
2942
|
-
void canvas_native_webgpu_context_unconfigure(const struct CanvasGPUCanvasContext *context
|
|
2943
|
-
struct CanvasGPUDevice *device,
|
|
2944
|
-
const struct CanvasGPUSurfaceConfiguration *config);
|
|
3058
|
+
void canvas_native_webgpu_context_unconfigure(const struct CanvasGPUCanvasContext *context);
|
|
2945
3059
|
|
|
2946
3060
|
const struct CanvasGPUTexture *canvas_native_webgpu_context_get_current_texture(const struct CanvasGPUCanvasContext *context);
|
|
2947
3061
|
|
|
@@ -2955,10 +3069,14 @@ void canvas_native_webgpu_context_reference(const struct CanvasGPUCanvasContext
|
|
|
2955
3069
|
|
|
2956
3070
|
void canvas_native_webgpu_context_release(const struct CanvasGPUCanvasContext *context);
|
|
2957
3071
|
|
|
3072
|
+
char *canvas_native_webgpu_command_buffer_get_label(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
3073
|
+
|
|
2958
3074
|
void canvas_native_webgpu_command_buffer_reference(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
2959
3075
|
|
|
2960
3076
|
void canvas_native_webgpu_command_buffer_release(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
2961
3077
|
|
|
3078
|
+
char *canvas_native_webgpu_command_encoder_get_label(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
3079
|
+
|
|
2962
3080
|
void canvas_native_webgpu_command_encoder_reference(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
2963
3081
|
|
|
2964
3082
|
void canvas_native_webgpu_command_encoder_release(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
@@ -3028,6 +3146,8 @@ void canvas_native_webgpu_command_encoder_write_timestamp(const struct CanvasGPU
|
|
|
3028
3146
|
const struct CanvasGPUQuerySet *query_set,
|
|
3029
3147
|
uint32_t query_index);
|
|
3030
3148
|
|
|
3149
|
+
char *canvas_native_webgpu_compute_pass_encoder_get_label(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3150
|
+
|
|
3031
3151
|
void canvas_native_webgpu_compute_pass_encoder_reference(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3032
3152
|
|
|
3033
3153
|
void canvas_native_webgpu_compute_pass_encoder_release(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
@@ -3062,6 +3182,8 @@ void canvas_native_webgpu_compute_pass_encoder_set_bind_group(const struct Canva
|
|
|
3062
3182
|
void canvas_native_webgpu_compute_pass_encoder_set_pipeline(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3063
3183
|
const struct CanvasGPUComputePipeline *pipeline);
|
|
3064
3184
|
|
|
3185
|
+
char *canvas_native_webgpu_compute_pipeline_get_label(const struct CanvasGPUComputePipeline *pipeline);
|
|
3186
|
+
|
|
3065
3187
|
void canvas_native_webgpu_compute_pipeline_reference(const struct CanvasGPUComputePipeline *pipeline);
|
|
3066
3188
|
|
|
3067
3189
|
void canvas_native_webgpu_compute_pipeline_release(const struct CanvasGPUComputePipeline *pipeline);
|
|
@@ -3069,6 +3191,8 @@ void canvas_native_webgpu_compute_pipeline_release(const struct CanvasGPUCompute
|
|
|
3069
3191
|
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_compute_pipeline_get_bind_group_layout(const struct CanvasGPUComputePipeline *pipeline,
|
|
3070
3192
|
uint32_t index);
|
|
3071
3193
|
|
|
3194
|
+
char *canvas_native_webgpu_device_get_label(const struct CanvasGPUDevice *device);
|
|
3195
|
+
|
|
3072
3196
|
struct StringBuffer *canvas_native_webgpu_device_get_features(const struct CanvasGPUDevice *device);
|
|
3073
3197
|
|
|
3074
3198
|
struct CanvasGPUSupportedLimits *canvas_native_webgpu_device_get_limits(const struct CanvasGPUDevice *device);
|
|
@@ -3177,6 +3301,8 @@ const struct CanvasGPUTexture *canvas_native_webgpu_device_create_texture(const
|
|
|
3177
3301
|
const struct CanvasGPUSampler *canvas_native_webgpu_device_create_sampler(const struct CanvasGPUDevice *device,
|
|
3178
3302
|
const struct CanvasCreateSamplerDescriptor *descriptor);
|
|
3179
3303
|
|
|
3304
|
+
char *canvas_native_webgpu_pipeline_layout_get_label(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
3305
|
+
|
|
3180
3306
|
void canvas_native_webgpu_pipeline_layout_reference(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
3181
3307
|
|
|
3182
3308
|
void canvas_native_webgpu_pipeline_layout_release(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
@@ -3193,10 +3319,27 @@ void canvas_native_webgpu_query_set_reference(const struct CanvasGPUQuerySet *qu
|
|
|
3193
3319
|
|
|
3194
3320
|
void canvas_native_webgpu_query_set_release(const struct CanvasGPUQuerySet *query_set);
|
|
3195
3321
|
|
|
3322
|
+
char *canvas_native_webgpu_queue_get_label(const struct CanvasGPUQueue *queue);
|
|
3323
|
+
|
|
3196
3324
|
void canvas_native_webgpu_queue_reference(const struct CanvasGPUQueue *queue);
|
|
3197
3325
|
|
|
3198
3326
|
void canvas_native_webgpu_queue_release(const struct CanvasGPUQueue *queue);
|
|
3199
3327
|
|
|
3328
|
+
void canvas_native_webgpu_queue_copy_webgl_to_texture(const struct CanvasGPUQueue *queue,
|
|
3329
|
+
const struct CanvasImageCopyWebGL *source,
|
|
3330
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3331
|
+
const struct CanvasExtent3d *size);
|
|
3332
|
+
|
|
3333
|
+
void canvas_native_webgpu_queue_copy_context_to_texture(const struct CanvasGPUQueue *queue,
|
|
3334
|
+
const struct CanvasImageCopyCanvasRenderingContext2D *source,
|
|
3335
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3336
|
+
const struct CanvasExtent3d *size);
|
|
3337
|
+
|
|
3338
|
+
void canvas_native_webgpu_queue_copy_image_asset_to_texture(const struct CanvasGPUQueue *queue,
|
|
3339
|
+
const struct CanvasImageCopyImageAsset *source,
|
|
3340
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3341
|
+
const struct CanvasExtent3d *size);
|
|
3342
|
+
|
|
3200
3343
|
void canvas_native_webgpu_queue_copy_external_image_to_texture(const struct CanvasGPUQueue *queue,
|
|
3201
3344
|
const struct CanvasImageCopyExternalImage *source,
|
|
3202
3345
|
const struct CanvasImageCopyTexture *destination,
|
|
@@ -3225,10 +3368,14 @@ void canvas_native_webgpu_queue_write_texture(const struct CanvasGPUQueue *queue
|
|
|
3225
3368
|
const uint8_t *buf,
|
|
3226
3369
|
uintptr_t buf_size);
|
|
3227
3370
|
|
|
3371
|
+
char *canvas_native_webgpu_render_bundle_get_label(const struct CanvasGPURenderBundle *bundle);
|
|
3372
|
+
|
|
3228
3373
|
void canvas_native_webgpu_render_bundle_reference(const struct CanvasGPURenderBundle *bundle);
|
|
3229
3374
|
|
|
3230
3375
|
void canvas_native_webgpu_render_bundle_release(const struct CanvasGPURenderBundle *bundle);
|
|
3231
3376
|
|
|
3377
|
+
char *canvas_native_webgpu_render_bundle_encoder_get_label(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3378
|
+
|
|
3232
3379
|
void canvas_native_webgpu_render_bundle_encoder_draw(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3233
3380
|
uint32_t vertex_count,
|
|
3234
3381
|
uint32_t instance_count,
|
|
@@ -3288,6 +3435,8 @@ void canvas_native_webgpu_render_bundle_encoder_reference(const struct CanvasGPU
|
|
|
3288
3435
|
|
|
3289
3436
|
void canvas_native_webgpu_render_bundle_encoder_release(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3290
3437
|
|
|
3438
|
+
char *canvas_native_webgpu_render_pass_encoder_get_label(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3439
|
+
|
|
3291
3440
|
void canvas_native_webgpu_render_pass_encoder_begin_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3292
3441
|
uint32_t query_index);
|
|
3293
3442
|
|
|
@@ -3308,10 +3457,20 @@ void canvas_native_webgpu_render_pass_encoder_draw_indexed_indirect(const struct
|
|
|
3308
3457
|
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3309
3458
|
uint64_t indirect_offset);
|
|
3310
3459
|
|
|
3460
|
+
void canvas_native_webgpu_render_pass_encoder_multi_draw_indexed_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3461
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3462
|
+
uint64_t indirect_offset,
|
|
3463
|
+
uint32_t count);
|
|
3464
|
+
|
|
3311
3465
|
void canvas_native_webgpu_render_pass_encoder_draw_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3312
3466
|
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3313
3467
|
uint64_t indirect_offset);
|
|
3314
3468
|
|
|
3469
|
+
void canvas_native_webgpu_render_pass_encoder_multi_draw_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3470
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3471
|
+
uint64_t indirect_offset,
|
|
3472
|
+
uint32_t count);
|
|
3473
|
+
|
|
3315
3474
|
void canvas_native_webgpu_render_pass_encoder_end(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3316
3475
|
|
|
3317
3476
|
void canvas_native_webgpu_render_pass_encoder_end_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
@@ -3379,13 +3538,19 @@ void canvas_native_webgpu_render_pipeline_reference(const struct CanvasGPURender
|
|
|
3379
3538
|
|
|
3380
3539
|
void canvas_native_webgpu_render_pipeline_release(const struct CanvasGPURenderPipeline *pipeline);
|
|
3381
3540
|
|
|
3541
|
+
char *canvas_native_webgpu_render_pipeline_get_label(const struct CanvasGPURenderPipeline *pipeline);
|
|
3542
|
+
|
|
3382
3543
|
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_render_pipeline_get_bind_group_layout(const struct CanvasGPURenderPipeline *pipeline,
|
|
3383
3544
|
uint32_t index);
|
|
3384
3545
|
|
|
3546
|
+
char *canvas_native_webgpu_sampler_get_label(const struct CanvasGPUSampler *sampler);
|
|
3547
|
+
|
|
3385
3548
|
void canvas_native_webgpu_sampler_reference(const struct CanvasGPUSampler *sampler);
|
|
3386
3549
|
|
|
3387
3550
|
void canvas_native_webgpu_sampler_release(const struct CanvasGPUSampler *sampler);
|
|
3388
3551
|
|
|
3552
|
+
char *canvas_native_webgpu_shader_module_get_label(const struct CanvasGPUShaderModule *shader_module);
|
|
3553
|
+
|
|
3389
3554
|
void canvas_native_webgpu_shader_module_reference(const struct CanvasGPUShaderModule *shader_module);
|
|
3390
3555
|
|
|
3391
3556
|
void canvas_native_webgpu_shader_module_release(const struct CanvasGPUShaderModule *shader_module);
|
|
@@ -3394,6 +3559,12 @@ struct CanvasGPUSupportedLimits *canvas_native_webgpu_create_limits(void);
|
|
|
3394
3559
|
|
|
3395
3560
|
void canvas_native_webgpu_limits_release(struct CanvasGPUSupportedLimits *limits);
|
|
3396
3561
|
|
|
3562
|
+
enum SurfaceGetCurrentTextureStatus canvas_native_webgpu_texture_get_status(const struct CanvasGPUTexture *texture);
|
|
3563
|
+
|
|
3564
|
+
bool canvas_native_webgpu_texture_get_suboptimal(const struct CanvasGPUTexture *texture);
|
|
3565
|
+
|
|
3566
|
+
char *canvas_native_webgpu_texture_get_label(const struct CanvasGPUTexture *texture);
|
|
3567
|
+
|
|
3397
3568
|
void canvas_native_webgpu_texture_reference(const struct CanvasGPUTexture *texture);
|
|
3398
3569
|
|
|
3399
3570
|
void canvas_native_webgpu_texture_release(const struct CanvasGPUTexture *texture);
|
|
@@ -3413,14 +3584,14 @@ struct CanvasGPUTextureFormat canvas_native_webgpu_texture_get_format(const stru
|
|
|
3413
3584
|
|
|
3414
3585
|
uint32_t canvas_native_webgpu_texture_get_usage(const struct CanvasGPUTexture *texture);
|
|
3415
3586
|
|
|
3416
|
-
char *canvas_native_webgpu_texture_get_label(const struct CanvasGPUTexture *_texture);
|
|
3417
|
-
|
|
3418
3587
|
uint32_t canvas_native_webgpu_texture_get_mip_level_count(const struct CanvasGPUTexture *texture);
|
|
3419
3588
|
|
|
3420
3589
|
uint32_t canvas_native_webgpu_texture_get_sample_count(const struct CanvasGPUTexture *texture);
|
|
3421
3590
|
|
|
3422
3591
|
void canvas_native_webgpu_texture_destroy(const struct CanvasGPUTexture *texture);
|
|
3423
3592
|
|
|
3593
|
+
char *canvas_native_webgpu_texture_view_get_label(const struct CanvasGPUTextureView *texture_view);
|
|
3594
|
+
|
|
3424
3595
|
void canvas_native_webgpu_texture_view_reference(const struct CanvasGPUTextureView *texture_view);
|
|
3425
3596
|
|
|
3426
3597
|
void canvas_native_webgpu_texture_view_release(const struct CanvasGPUTextureView *texture_view);
|
|
@@ -3473,32 +3644,50 @@ char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer
|
|
|
3473
3644
|
|
|
3474
3645
|
void canvas_native_string_buffer_release(struct StringBuffer *buffer);
|
|
3475
3646
|
|
|
3647
|
+
struct FileHelperMime *canvas_native_helper_get_mime(const uint8_t *data, uintptr_t size);
|
|
3648
|
+
|
|
3649
|
+
void canvas_native_helper_release_mime(struct FileHelperMime *mime);
|
|
3650
|
+
|
|
3476
3651
|
void canvas_native_helper_release(struct FileHelper *value);
|
|
3477
3652
|
|
|
3478
3653
|
struct FileHelper *canvas_native_helper_read_file(const char *path);
|
|
3479
3654
|
|
|
3655
|
+
char *canvas_native_helper_read_file_get_mime(struct FileHelper *file);
|
|
3656
|
+
|
|
3657
|
+
char *canvas_native_helper_read_file_get_extension(struct FileHelper *file);
|
|
3658
|
+
|
|
3480
3659
|
bool canvas_native_helper_read_file_has_error(const struct FileHelper *file);
|
|
3481
3660
|
|
|
3482
3661
|
struct U8Buffer *canvas_native_helper_read_file_get_data(struct FileHelper *file);
|
|
3483
3662
|
|
|
3663
|
+
struct U8Buffer *canvas_native_helper_read_file_take_data(struct FileHelper *file);
|
|
3664
|
+
|
|
3484
3665
|
const char *canvas_native_helper_read_file_get_error(const struct FileHelper *file);
|
|
3485
3666
|
|
|
3486
|
-
int64_t canvas_native_image_asset_get_addr(struct ImageAsset *asset);
|
|
3667
|
+
int64_t canvas_native_image_asset_get_addr(const struct ImageAsset *asset);
|
|
3668
|
+
|
|
3669
|
+
void canvas_native_image_asset_close(const struct ImageAsset *asset);
|
|
3487
3670
|
|
|
3488
|
-
struct ImageAsset *canvas_native_image_asset_create(void);
|
|
3671
|
+
const struct ImageAsset *canvas_native_image_asset_create(void);
|
|
3489
3672
|
|
|
3490
|
-
struct ImageAsset *canvas_native_image_asset_reference(struct ImageAsset *asset);
|
|
3673
|
+
const struct ImageAsset *canvas_native_image_asset_reference(const struct ImageAsset *asset);
|
|
3491
3674
|
|
|
3492
|
-
void canvas_native_image_asset_release(struct ImageAsset *asset);
|
|
3675
|
+
void canvas_native_image_asset_release(const struct ImageAsset *asset);
|
|
3493
3676
|
|
|
3494
3677
|
bool canvas_native_image_asset_load_from_fd(const struct ImageAsset *asset, int fd);
|
|
3495
3678
|
|
|
3496
3679
|
bool canvas_native_image_asset_load_from_path(const struct ImageAsset *asset, const char *path);
|
|
3497
3680
|
|
|
3498
3681
|
bool canvas_native_image_asset_load_from_raw(const struct ImageAsset *asset,
|
|
3682
|
+
uint32_t width,
|
|
3683
|
+
uint32_t height,
|
|
3499
3684
|
const uint8_t *array,
|
|
3500
3685
|
uintptr_t size);
|
|
3501
3686
|
|
|
3687
|
+
bool canvas_native_image_asset_load_from_raw_encoded(const struct ImageAsset *asset,
|
|
3688
|
+
const uint8_t *array,
|
|
3689
|
+
uintptr_t size);
|
|
3690
|
+
|
|
3502
3691
|
bool canvas_native_image_asset_load_from_url(const struct ImageAsset *asset, const char *url);
|
|
3503
3692
|
|
|
3504
3693
|
int64_t canvas_native_image_asset_addr(const struct ImageAsset *asset);
|
|
@@ -3511,8 +3700,6 @@ const char *canvas_native_image_asset_get_error(const struct ImageAsset *asset);
|
|
|
3511
3700
|
|
|
3512
3701
|
bool canvas_native_image_asset_has_error(const struct ImageAsset *asset);
|
|
3513
3702
|
|
|
3514
|
-
struct U8Buffer *canvas_native_image_asset_get_data(const struct ImageAsset *asset);
|
|
3515
|
-
|
|
3516
3703
|
void canvas_native_text_decoder_release(struct TextDecoder *value);
|
|
3517
3704
|
|
|
3518
3705
|
struct TextDecoder *canvas_native_text_decoder_create(const char *decoding);
|
|
@@ -3543,10 +3730,6 @@ struct U8Buffer *canvas_native_text_encoder_encode(const struct TextEncoder *enc
|
|
|
3543
3730
|
|
|
3544
3731
|
const char *canvas_native_text_encoder_get_encoding(const struct TextEncoder *encoder);
|
|
3545
3732
|
|
|
3546
|
-
bool canvas_native_context_gl_make_current(const struct CanvasRenderingContext2D *context);
|
|
3547
|
-
|
|
3548
|
-
bool canvas_native_context_gl_swap_buffers(const struct CanvasRenderingContext2D *context);
|
|
3549
|
-
|
|
3550
3733
|
struct PaintStyle *canvas_native_context_create_pattern_webgl(struct WebGLState *source,
|
|
3551
3734
|
struct CanvasRenderingContext2D *context,
|
|
3552
3735
|
enum CanvasRepetition repetition);
|
|
@@ -3768,7 +3951,10 @@ bool canvas_native_webgl_oes_vertex_array_object_is_vertex_array_oes(uint32_t ar
|
|
|
3768
3951
|
void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t array_object,
|
|
3769
3952
|
const struct OES_vertex_array_object *object);
|
|
3770
3953
|
|
|
3771
|
-
|
|
3954
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3955
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3956
|
+
int32_t width,
|
|
3957
|
+
int32_t height,
|
|
3772
3958
|
int32_t version,
|
|
3773
3959
|
bool alpha,
|
|
3774
3960
|
bool antialias,
|
|
@@ -3780,6 +3966,22 @@ struct WebGLState *canvas_native_webgl_create(int64_t gl_context,
|
|
|
3780
3966
|
bool stencil,
|
|
3781
3967
|
bool desynchronized,
|
|
3782
3968
|
bool xr_compatible);
|
|
3969
|
+
#endif
|
|
3970
|
+
|
|
3971
|
+
#if !defined(TARGET_OS_ANDROID)
|
|
3972
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3973
|
+
int32_t version,
|
|
3974
|
+
bool alpha,
|
|
3975
|
+
bool antialias,
|
|
3976
|
+
bool depth,
|
|
3977
|
+
bool fail_if_major_performance_caveat,
|
|
3978
|
+
int32_t power_preference,
|
|
3979
|
+
bool premultiplied_alpha,
|
|
3980
|
+
bool preserve_drawing_buffer,
|
|
3981
|
+
bool stencil,
|
|
3982
|
+
bool desynchronized,
|
|
3983
|
+
bool xr_compatible);
|
|
3984
|
+
#endif
|
|
3783
3985
|
|
|
3784
3986
|
struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
|
|
3785
3987
|
int32_t height,
|
|
@@ -4326,7 +4528,7 @@ void canvas_native_webgl_tex_image2d_image_asset(int32_t target,
|
|
|
4326
4528
|
int32_t internalformat,
|
|
4327
4529
|
int32_t format,
|
|
4328
4530
|
int32_t image_type,
|
|
4329
|
-
struct ImageAsset *image_asset,
|
|
4531
|
+
const struct ImageAsset *image_asset,
|
|
4330
4532
|
struct WebGLState *state);
|
|
4331
4533
|
|
|
4332
4534
|
void canvas_native_webgl_tex_parameterf(uint32_t target,
|
|
@@ -4345,7 +4547,7 @@ void canvas_native_webgl_tex_sub_image2d_asset(uint32_t target,
|
|
|
4345
4547
|
int32_t yoffset,
|
|
4346
4548
|
uint32_t format,
|
|
4347
4549
|
int32_t image_type,
|
|
4348
|
-
struct ImageAsset *asset,
|
|
4550
|
+
const struct ImageAsset *asset,
|
|
4349
4551
|
struct WebGLState *state);
|
|
4350
4552
|
|
|
4351
4553
|
void canvas_native_webgl_tex_sub_image2d_canvas2d(uint32_t target,
|
|
@@ -4948,8 +5150,8 @@ void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
|
|
|
4948
5150
|
int32_t xoffset,
|
|
4949
5151
|
int32_t yoffset,
|
|
4950
5152
|
int32_t zoffset,
|
|
4951
|
-
int32_t
|
|
4952
|
-
int32_t
|
|
5153
|
+
int32_t _width,
|
|
5154
|
+
int32_t _height,
|
|
4953
5155
|
int32_t depth,
|
|
4954
5156
|
uint32_t format,
|
|
4955
5157
|
uint32_t type_,
|
|
@@ -5086,4 +5288,72 @@ void canvas_native_webgl2_vertex_attrib_i4uiv(uint32_t index,
|
|
|
5086
5288
|
uintptr_t size,
|
|
5087
5289
|
struct WebGLState *state);
|
|
5088
5290
|
|
|
5291
|
+
void canvas_native_webgl2_tex_image2d_image_asset(int32_t target,
|
|
5292
|
+
int32_t level,
|
|
5293
|
+
int32_t internalformat,
|
|
5294
|
+
uint32_t width,
|
|
5295
|
+
uint32_t height,
|
|
5296
|
+
int32_t border,
|
|
5297
|
+
int32_t format,
|
|
5298
|
+
int32_t type_,
|
|
5299
|
+
const struct ImageAsset *image_asset,
|
|
5300
|
+
struct WebGLState *state);
|
|
5301
|
+
|
|
5302
|
+
void canvas_native_webgl2_tex_image2d_src_data_offset(int32_t target,
|
|
5303
|
+
int32_t level,
|
|
5304
|
+
int32_t internalformat,
|
|
5305
|
+
uint32_t width,
|
|
5306
|
+
uint32_t height,
|
|
5307
|
+
int32_t border,
|
|
5308
|
+
int32_t format,
|
|
5309
|
+
int32_t type_,
|
|
5310
|
+
const uint8_t *src_data,
|
|
5311
|
+
uintptr_t src_data_size,
|
|
5312
|
+
uint64_t offset,
|
|
5313
|
+
struct WebGLState *state);
|
|
5314
|
+
|
|
5315
|
+
void canvas_native_webgl2_tex_image2d_offset(int32_t target,
|
|
5316
|
+
int32_t level,
|
|
5317
|
+
int32_t internalformat,
|
|
5318
|
+
uint32_t width,
|
|
5319
|
+
uint32_t height,
|
|
5320
|
+
int32_t border,
|
|
5321
|
+
int32_t format,
|
|
5322
|
+
int32_t type_,
|
|
5323
|
+
uint64_t offset,
|
|
5324
|
+
struct WebGLState *state);
|
|
5325
|
+
|
|
5326
|
+
void canvas_native_webgl2_tex_image2d_webgl(int32_t target,
|
|
5327
|
+
int32_t level,
|
|
5328
|
+
int32_t internalformat,
|
|
5329
|
+
uint32_t width,
|
|
5330
|
+
uint32_t height,
|
|
5331
|
+
int32_t border,
|
|
5332
|
+
int32_t format,
|
|
5333
|
+
int32_t type_,
|
|
5334
|
+
struct WebGLState *webgl,
|
|
5335
|
+
struct WebGLState *state);
|
|
5336
|
+
|
|
5337
|
+
void canvas_native_webgl2_tex_image2d_canvas2d(int32_t target,
|
|
5338
|
+
int32_t level,
|
|
5339
|
+
int32_t internalformat,
|
|
5340
|
+
uint32_t width,
|
|
5341
|
+
uint32_t height,
|
|
5342
|
+
int32_t border,
|
|
5343
|
+
int32_t format,
|
|
5344
|
+
int32_t type_,
|
|
5345
|
+
struct CanvasRenderingContext2D *canvas,
|
|
5346
|
+
struct WebGLState *state);
|
|
5347
|
+
|
|
5348
|
+
void canvas_native_webgl2_tex_image2d_image_data(int32_t target,
|
|
5349
|
+
int32_t level,
|
|
5350
|
+
int32_t internalformat,
|
|
5351
|
+
uint32_t width,
|
|
5352
|
+
uint32_t height,
|
|
5353
|
+
int32_t border,
|
|
5354
|
+
int32_t format,
|
|
5355
|
+
int32_t type_,
|
|
5356
|
+
const struct ImageData *image_data,
|
|
5357
|
+
struct WebGLState *state);
|
|
5358
|
+
|
|
5089
5359
|
#endif /* CANVAS_C_H */
|