@nativescript/canvas 2.0.0-beta.9 → 2.0.0-rc.0
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 +15 -24
- package/Canvas/common.js +147 -203
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +13 -15
- package/Canvas/index.android.js +152 -151
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +23 -11
- package/Canvas/index.ios.d.ts +14 -6
- package/Canvas/index.ios.js +213 -124
- 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 +4 -2
- package/Canvas2D/CanvasRenderingContext2D/index.js +79 -85
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.d.ts +14 -0
- package/Canvas2D/DOMMatrix/index.js +62 -0
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +4 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Dom.js +8 -1
- package/Dom/Dom.js.map +1 -1
- package/Dom/Group.d.ts +1 -2
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.d.ts +4 -1
- package/Dom/Image.js +15 -2
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.d.ts +1 -1
- package/Dom/Paint.js.map +1 -1
- package/Dom/Text.js.map +1 -1
- package/Dom/shaders/LinearGradient.js.map +1 -1
- package/Dom/shaders/TwoPointConicalGradient.js.map +1 -1
- package/Dom/shapes/Atlas.js.map +1 -1
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Line.js.map +1 -1
- package/Dom/shapes/Oval.js.map +1 -1
- package/Dom/shapes/Path.d.ts +1 -1
- package/Dom/shapes/Path.js.map +1 -1
- package/Dom/shapes/Rect.js.map +1 -1
- package/Dom/shapes/RoundedRect.js.map +1 -1
- package/Dom/shapes/index.js.map +1 -1
- package/Fonts/FontFace.android.d.ts +46 -0
- package/Fonts/FontFace.android.js +197 -0
- package/Fonts/FontFace.android.js.map +1 -0
- package/Fonts/FontFace.ios.d.ts +45 -0
- package/Fonts/FontFace.ios.js +169 -0
- package/Fonts/FontFace.ios.js.map +1 -0
- package/Fonts/FontFaceSet.android.d.ts +31 -0
- package/Fonts/FontFaceSet.android.js +119 -0
- package/Fonts/FontFaceSet.android.js.map +1 -0
- package/Fonts/FontFaceSet.ios.d.ts +31 -0
- package/Fonts/FontFaceSet.ios.js +109 -0
- package/Fonts/FontFaceSet.ios.js.map +1 -0
- package/Fonts/index.d.ts +2 -0
- package/Fonts/index.js +3 -0
- package/Fonts/index.js.map +1 -0
- package/ImageAsset/index.d.ts +8 -3
- package/ImageAsset/index.js +206 -11
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +110 -23
- package/ImageBitmap/index.js.map +1 -1
- package/README.md +62 -3
- package/TextDecoder/index.js +3 -3
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.js +3 -3
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.js +5 -5
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +1 -1
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +1 -0
- package/WebGL/WebGLRenderingContext/index.js +144 -46
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -0
- package/WebGL2/WebGL2RenderingContext/index.js +7 -8
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/Constants.d.ts +36 -0
- package/WebGPU/Constants.js +42 -0
- package/WebGPU/Constants.js.map +1 -0
- package/WebGPU/Errors.d.ts +18 -0
- package/WebGPU/Errors.js +21 -0
- package/WebGPU/Errors.js.map +1 -0
- package/WebGPU/GPU.d.ts +13 -0
- package/WebGPU/GPU.js +36 -0
- package/WebGPU/GPU.js.map +1 -0
- package/WebGPU/GPUAdapter.d.ts +26 -0
- package/WebGPU/GPUAdapter.js +93 -0
- package/WebGPU/GPUAdapter.js.map +1 -0
- package/WebGPU/GPUAdapterInfo.d.ts +9 -0
- package/WebGPU/GPUAdapterInfo.js +24 -0
- package/WebGPU/GPUAdapterInfo.js.map +1 -0
- package/WebGPU/GPUBindGroup.d.ts +6 -0
- package/WebGPU/GPUBindGroup.js +15 -0
- package/WebGPU/GPUBindGroup.js.map +1 -0
- package/WebGPU/GPUBindGroupLayout.d.ts +6 -0
- package/WebGPU/GPUBindGroupLayout.js +15 -0
- package/WebGPU/GPUBindGroupLayout.js.map +1 -0
- package/WebGPU/GPUBuffer.d.ts +15 -0
- package/WebGPU/GPUBuffer.js +66 -0
- package/WebGPU/GPUBuffer.js.map +1 -0
- package/WebGPU/GPUCanvasContext.d.ts +42 -0
- package/WebGPU/GPUCanvasContext.js +149 -0
- package/WebGPU/GPUCanvasContext.js.map +1 -0
- package/WebGPU/GPUCommandBuffer.d.ts +6 -0
- package/WebGPU/GPUCommandBuffer.js +15 -0
- package/WebGPU/GPUCommandBuffer.js.map +1 -0
- package/WebGPU/GPUCommandEncoder.d.ts +35 -0
- package/WebGPU/GPUCommandEncoder.js +163 -0
- package/WebGPU/GPUCommandEncoder.js.map +1 -0
- package/WebGPU/GPUComputePassEncoder.d.ts +17 -0
- package/WebGPU/GPUComputePassEncoder.js +53 -0
- package/WebGPU/GPUComputePassEncoder.js.map +1 -0
- package/WebGPU/GPUComputePipeline.d.ts +8 -0
- package/WebGPU/GPUComputePipeline.js +19 -0
- package/WebGPU/GPUComputePipeline.js.map +1 -0
- package/WebGPU/GPUDevice.d.ts +111 -0
- package/WebGPU/GPUDevice.js +341 -0
- package/WebGPU/GPUDevice.js.map +1 -0
- package/WebGPU/GPUDeviceLostInfo.d.ts +1 -0
- package/WebGPU/GPUDeviceLostInfo.js +10 -0
- package/WebGPU/GPUDeviceLostInfo.js.map +1 -0
- package/WebGPU/GPUExternalTexture.d.ts +6 -0
- package/WebGPU/GPUExternalTexture.js +15 -0
- package/WebGPU/GPUExternalTexture.js.map +1 -0
- package/WebGPU/GPUPipelineLayout.d.ts +6 -0
- package/WebGPU/GPUPipelineLayout.js +15 -0
- package/WebGPU/GPUPipelineLayout.js.map +1 -0
- package/WebGPU/GPUQuerySet.d.ts +6 -0
- package/WebGPU/GPUQuerySet.js +15 -0
- package/WebGPU/GPUQuerySet.js.map +1 -0
- package/WebGPU/GPUQueue.d.ts +15 -0
- package/WebGPU/GPUQueue.js +128 -0
- package/WebGPU/GPUQueue.js.map +1 -0
- package/WebGPU/GPURenderBundle.d.ts +6 -0
- package/WebGPU/GPURenderBundle.js +15 -0
- package/WebGPU/GPURenderBundle.js.map +1 -0
- package/WebGPU/GPURenderBundleEncoder.d.ts +22 -0
- package/WebGPU/GPURenderBundleEncoder.js +65 -0
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -0
- package/WebGPU/GPURenderPassEncoder.d.ts +33 -0
- package/WebGPU/GPURenderPassEncoder.js +106 -0
- package/WebGPU/GPURenderPassEncoder.js.map +1 -0
- package/WebGPU/GPURenderPipeline.d.ts +8 -0
- package/WebGPU/GPURenderPipeline.js +19 -0
- package/WebGPU/GPURenderPipeline.js.map +1 -0
- package/WebGPU/GPUSampler.d.ts +6 -0
- package/WebGPU/GPUSampler.js +15 -0
- package/WebGPU/GPUSampler.js.map +1 -0
- package/WebGPU/GPUShaderModule.d.ts +6 -0
- package/WebGPU/GPUShaderModule.js +15 -0
- package/WebGPU/GPUShaderModule.js.map +1 -0
- package/WebGPU/GPUTexture.d.ts +18 -0
- package/WebGPU/GPUTexture.js +47 -0
- package/WebGPU/GPUTexture.js.map +1 -0
- package/WebGPU/GPUTextureView.d.ts +6 -0
- package/WebGPU/GPUTextureView.js +15 -0
- package/WebGPU/GPUTextureView.js.map +1 -0
- package/WebGPU/Interfaces.d.ts +246 -0
- package/WebGPU/Interfaces.js +2 -0
- package/WebGPU/Interfaces.js.map +1 -0
- package/WebGPU/Types.d.ts +47 -0
- package/WebGPU/Types.js +2 -0
- package/WebGPU/Types.js.map +1 -0
- package/WebGPU/Utils.d.ts +7 -0
- package/WebGPU/Utils.js +301 -0
- package/WebGPU/Utils.js.map +1 -0
- package/WebGPU/index.d.ts +28 -0
- package/WebGPU/index.js +29 -0
- package/WebGPU/index.js.map +1 -0
- package/angular/{esm2020 → esm2022}/index.mjs +5 -5
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs +4 -4
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs.map +1 -1
- package/angular/package.json +4 -10
- package/common.d.ts +0 -3
- package/common.js +1 -5
- package/common.js.map +1 -1
- package/helpers.js.map +1 -1
- package/index.d.ts +4 -2
- package/index.js +37 -3
- package/index.js.map +1 -1
- package/package.json +2 -5
- 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 +194 -56
- 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 +152 -151
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2901 -411
- 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 +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +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 +994 -663
- 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 +388 -112
- 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 +152 -151
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2901 -411
- 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 +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +10901 -8099
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +259 -52
- 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 +259 -52
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +143 -33
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +0 -0
- 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 +993 -662
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +1037 -641
- package/platforms/ios/build.xcconfig +3 -1
- package/platforms/ios/src/NSOperationQueueWrapper.h +3 -1
- package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
- package/platforms/ios/src/cpp/AsyncCallback.h +214 -0
- package/platforms/ios/src/cpp/Caches.h +69 -1
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +647 -1166
- package/platforms/ios/src/cpp/CanvasJSIModule.h +11 -1
- package/platforms/ios/src/cpp/Helpers.h +2 -129
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +600 -437
- package/platforms/ios/src/cpp/ImageAssetImpl.h +18 -10
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +63 -6
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +12 -4
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +4 -4
- package/platforms/ios/src/cpp/NativeType.h +87 -0
- package/platforms/ios/src/cpp/ObjectWrapperImpl.h +50 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +2 -2
- package/platforms/ios/src/cpp/PromiseCallback.h +197 -0
- package/platforms/ios/src/cpp/RafImpl.h +2 -2
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +0 -6
- package/platforms/ios/src/cpp/TextDecoderImpl.h +3 -3
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +1 -1
- package/platforms/ios/src/cpp/TextEncoderImpl.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +8 -7
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +1 -11
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +193 -90
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +77 -23
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +5 -6
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +4 -4
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +409 -3
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +29 -2
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +6 -3
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +7 -7
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +247 -160
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +6 -6
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +1 -1
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +5 -5
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +3 -2
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +5 -5
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +2 -2
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +1067 -960
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +371 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.h +63 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.cpp +174 -0
- package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.h +58 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +277 -0
- package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +63 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +379 -0
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.h +57 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +81 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +1217 -0
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +73 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +293 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +65 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +109 -0
- package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +51 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +3701 -0
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +97 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +200 -0
- package/platforms/ios/src/cpp/webgpu/GPUImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +80 -0
- package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +49 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +136 -0
- package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +55 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +605 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +59 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +501 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +74 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +78 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +723 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +92 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +109 -0
- package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +52 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +80 -0
- package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.cpp +1304 -0
- package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.h +288 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +386 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +77 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +79 -0
- package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +48 -0
- package/platforms/ios/src/cpp/webgpu/GPUUtils.h +756 -0
- package/react/index.d.ts +1 -1
- package/utils.d.ts +1 -1
- package/utils.js.map +1 -1
- package/SVG/Circle.d.ts +0 -11
- package/SVG/Circle.js +0 -21
- package/SVG/Circle.js.map +0 -1
- package/SVG/ClipPath.d.ts +0 -4
- package/SVG/ClipPath.js +0 -9
- package/SVG/ClipPath.js.map +0 -1
- package/SVG/Defs.d.ts +0 -4
- package/SVG/Defs.js +0 -9
- package/SVG/Defs.js.map +0 -1
- package/SVG/Ellipse.d.ts +0 -13
- package/SVG/Ellipse.js +0 -26
- package/SVG/Ellipse.js.map +0 -1
- package/SVG/G.d.ts +0 -7
- package/SVG/G.js +0 -9
- package/SVG/G.js.map +0 -1
- package/SVG/Image.d.ts +0 -11
- package/SVG/Image.js +0 -40
- package/SVG/Image.js.map +0 -1
- package/SVG/Line.d.ts +0 -13
- package/SVG/Line.js +0 -26
- package/SVG/Line.js.map +0 -1
- package/SVG/LinearGradient.d.ts +0 -10
- package/SVG/LinearGradient.js +0 -13
- package/SVG/LinearGradient.js.map +0 -1
- package/SVG/Path.d.ts +0 -7
- package/SVG/Path.js +0 -14
- package/SVG/Path.js.map +0 -1
- package/SVG/Pattern.d.ts +0 -4
- package/SVG/Pattern.js +0 -9
- package/SVG/Pattern.js.map +0 -1
- package/SVG/Polygon.d.ts +0 -7
- package/SVG/Polygon.js +0 -14
- package/SVG/Polygon.js.map +0 -1
- package/SVG/Polyline.d.ts +0 -7
- package/SVG/Polyline.js +0 -14
- package/SVG/Polyline.js.map +0 -1
- package/SVG/Rect.d.ts +0 -8
- package/SVG/Rect.js +0 -13
- package/SVG/Rect.js.map +0 -1
- package/SVG/SVG.d.ts +0 -32
- package/SVG/SVG.js +0 -204
- package/SVG/SVG.js.map +0 -1
- package/SVG/SVGItem.d.ts +0 -5
- package/SVG/SVGItem.js +0 -8
- package/SVG/SVGItem.js.map +0 -1
- package/SVG/Stop.d.ts +0 -5
- package/SVG/Stop.js +0 -9
- package/SVG/Stop.js.map +0 -1
- package/SVG/Symbol.d.ts +0 -4
- package/SVG/Symbol.js +0 -9
- package/SVG/Symbol.js.map +0 -1
- package/SVG/Text.d.ts +0 -14
- package/SVG/Text.js +0 -26
- package/SVG/Text.js.map +0 -1
- package/SVG/Use.d.ts +0 -4
- package/SVG/Use.js +0 -9
- package/SVG/Use.js.map +0 -1
- package/SVG/index.d.ts +0 -18
- package/SVG/index.js +0 -19
- package/SVG/index.js.map +0 -1
- package/angular/fesm2020/nativescript-canvas-angular.mjs +0 -24
- package/angular/fesm2020/nativescript-canvas-angular.mjs.map +0 -1
- package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
- package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
- package/platforms/ios/src/cpp/URLImpl.cpp +0 -464
- package/platforms/ios/src/cpp/URLImpl.h +0 -121
- package/typings/objc!CanvasNative.d.ts +0 -2038
- package/typings/objc!CanvasNative.js +0 -1
- package/typings/objc!CanvasNative.js.map +0 -1
- /package/angular/{esm2020 → esm2022}/nativescript-canvas-angular.mjs +0 -0
|
@@ -8,12 +8,562 @@
|
|
|
8
8
|
#include <stdint.h>
|
|
9
9
|
#include <stdlib.h>
|
|
10
10
|
|
|
11
|
+
#define CanvasGPUTextureUsageCopySrc (1 << 0)
|
|
12
|
+
|
|
13
|
+
#define CanvasGPUTextureUsageCopyDst (1 << 1)
|
|
14
|
+
|
|
15
|
+
#define CanvasGPUTextureUsageTextureBinding (1 << 2)
|
|
16
|
+
|
|
17
|
+
#define CanvasGPUTextureUsageStorageBinding (1 << 3)
|
|
18
|
+
|
|
19
|
+
#define CanvasGPUTextureUsageRenderAttachment (1 << 4)
|
|
20
|
+
|
|
21
|
+
typedef enum CanvasAddressMode {
|
|
22
|
+
/**
|
|
23
|
+
* Clamp the value to the edge of the texture
|
|
24
|
+
*
|
|
25
|
+
* -0.25 -> 0.0
|
|
26
|
+
* 1.25 -> 1.0
|
|
27
|
+
*/
|
|
28
|
+
CanvasAddressModeClampToEdge = 0,
|
|
29
|
+
/**
|
|
30
|
+
* Repeat the texture in a tiling fashion
|
|
31
|
+
*
|
|
32
|
+
* -0.25 -> 0.75
|
|
33
|
+
* 1.25 -> 0.25
|
|
34
|
+
*/
|
|
35
|
+
CanvasAddressModeRepeat = 1,
|
|
36
|
+
/**
|
|
37
|
+
* Repeat the texture, mirroring it every repeat
|
|
38
|
+
*
|
|
39
|
+
* -0.25 -> 0.25
|
|
40
|
+
* 1.25 -> 0.75
|
|
41
|
+
*/
|
|
42
|
+
CanvasAddressModeMirrorRepeat = 2,
|
|
43
|
+
/**
|
|
44
|
+
* Clamp the value to the border of the texture
|
|
45
|
+
* Requires feature [`Features::ADDRESS_MODE_CLAMP_TO_BORDER`]
|
|
46
|
+
*
|
|
47
|
+
* -0.25 -> border
|
|
48
|
+
* 1.25 -> border
|
|
49
|
+
*/
|
|
50
|
+
CanvasAddressModeClampToBorder = 3,
|
|
51
|
+
} CanvasAddressMode;
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* ASTC block dimensions
|
|
55
|
+
*/
|
|
56
|
+
typedef enum CanvasAstcBlock {
|
|
57
|
+
/**
|
|
58
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px).
|
|
59
|
+
*/
|
|
60
|
+
CanvasAstcBlockB4x4,
|
|
61
|
+
/**
|
|
62
|
+
* 5x4 block compressed texture. 16 bytes per block (6.4 bit/px).
|
|
63
|
+
*/
|
|
64
|
+
CanvasAstcBlockB5x4,
|
|
65
|
+
/**
|
|
66
|
+
* 5x5 block compressed texture. 16 bytes per block (5.12 bit/px).
|
|
67
|
+
*/
|
|
68
|
+
CanvasAstcBlockB5x5,
|
|
69
|
+
/**
|
|
70
|
+
* 6x5 block compressed texture. 16 bytes per block (4.27 bit/px).
|
|
71
|
+
*/
|
|
72
|
+
CanvasAstcBlockB6x5,
|
|
73
|
+
/**
|
|
74
|
+
* 6x6 block compressed texture. 16 bytes per block (3.56 bit/px).
|
|
75
|
+
*/
|
|
76
|
+
CanvasAstcBlockB6x6,
|
|
77
|
+
/**
|
|
78
|
+
* 8x5 block compressed texture. 16 bytes per block (3.2 bit/px).
|
|
79
|
+
*/
|
|
80
|
+
CanvasAstcBlockB8x5,
|
|
81
|
+
/**
|
|
82
|
+
* 8x6 block compressed texture. 16 bytes per block (2.67 bit/px).
|
|
83
|
+
*/
|
|
84
|
+
CanvasAstcBlockB8x6,
|
|
85
|
+
/**
|
|
86
|
+
* 8x8 block compressed texture. 16 bytes per block (2 bit/px).
|
|
87
|
+
*/
|
|
88
|
+
CanvasAstcBlockB8x8,
|
|
89
|
+
/**
|
|
90
|
+
* 10x5 block compressed texture. 16 bytes per block (2.56 bit/px).
|
|
91
|
+
*/
|
|
92
|
+
CanvasAstcBlockB10x5,
|
|
93
|
+
/**
|
|
94
|
+
* 10x6 block compressed texture. 16 bytes per block (2.13 bit/px).
|
|
95
|
+
*/
|
|
96
|
+
CanvasAstcBlockB10x6,
|
|
97
|
+
/**
|
|
98
|
+
* 10x8 block compressed texture. 16 bytes per block (1.6 bit/px).
|
|
99
|
+
*/
|
|
100
|
+
CanvasAstcBlockB10x8,
|
|
101
|
+
/**
|
|
102
|
+
* 10x10 block compressed texture. 16 bytes per block (1.28 bit/px).
|
|
103
|
+
*/
|
|
104
|
+
CanvasAstcBlockB10x10,
|
|
105
|
+
/**
|
|
106
|
+
* 12x10 block compressed texture. 16 bytes per block (1.07 bit/px).
|
|
107
|
+
*/
|
|
108
|
+
CanvasAstcBlockB12x10,
|
|
109
|
+
/**
|
|
110
|
+
* 12x12 block compressed texture. 16 bytes per block (0.89 bit/px).
|
|
111
|
+
*/
|
|
112
|
+
CanvasAstcBlockB12x12,
|
|
113
|
+
} CanvasAstcBlock;
|
|
114
|
+
|
|
115
|
+
/**
|
|
116
|
+
* ASTC RGBA channel
|
|
117
|
+
*/
|
|
118
|
+
typedef enum CanvasAstcChannel {
|
|
119
|
+
/**
|
|
120
|
+
* 8 bit integer RGBA, [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
121
|
+
*
|
|
122
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC`] must be enabled to use this channel.
|
|
123
|
+
*/
|
|
124
|
+
CanvasAstcChannelUnorm,
|
|
125
|
+
/**
|
|
126
|
+
* 8 bit integer RGBA, Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
127
|
+
*
|
|
128
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC`] must be enabled to use this channel.
|
|
129
|
+
*/
|
|
130
|
+
CanvasAstcChannelUnormSrgb,
|
|
131
|
+
/**
|
|
132
|
+
* floating-point RGBA, linear-color float can be outside of the [0, 1] range.
|
|
133
|
+
*
|
|
134
|
+
* [`Features::TEXTURE_COMPRESSION_ASTC_HDR`] must be enabled to use this channel.
|
|
135
|
+
*/
|
|
136
|
+
CanvasAstcChannelHdr,
|
|
137
|
+
} CanvasAstcChannel;
|
|
138
|
+
|
|
139
|
+
typedef enum CanvasBlendFactor {
|
|
140
|
+
/**
|
|
141
|
+
* 0.0
|
|
142
|
+
*/
|
|
143
|
+
CanvasBlendFactorZero = 0,
|
|
144
|
+
/**
|
|
145
|
+
* 1.0
|
|
146
|
+
*/
|
|
147
|
+
CanvasBlendFactorOne = 1,
|
|
148
|
+
/**
|
|
149
|
+
* S.component
|
|
150
|
+
*/
|
|
151
|
+
CanvasBlendFactorSrc = 2,
|
|
152
|
+
/**
|
|
153
|
+
* 1.0 - S.component
|
|
154
|
+
*/
|
|
155
|
+
CanvasBlendFactorOneMinusSrc = 3,
|
|
156
|
+
/**
|
|
157
|
+
* S.alpha
|
|
158
|
+
*/
|
|
159
|
+
CanvasBlendFactorSrcAlpha = 4,
|
|
160
|
+
/**
|
|
161
|
+
* 1.0 - S.alpha
|
|
162
|
+
*/
|
|
163
|
+
CanvasBlendFactorOneMinusSrcAlpha = 5,
|
|
164
|
+
/**
|
|
165
|
+
* D.component
|
|
166
|
+
*/
|
|
167
|
+
CanvasBlendFactorDst = 6,
|
|
168
|
+
/**
|
|
169
|
+
* 1.0 - D.component
|
|
170
|
+
*/
|
|
171
|
+
CanvasBlendFactorOneMinusDst = 7,
|
|
172
|
+
/**
|
|
173
|
+
* D.alpha
|
|
174
|
+
*/
|
|
175
|
+
CanvasBlendFactorDstAlpha = 8,
|
|
176
|
+
/**
|
|
177
|
+
* 1.0 - D.alpha
|
|
178
|
+
*/
|
|
179
|
+
CanvasBlendFactorOneMinusDstAlpha = 9,
|
|
180
|
+
/**
|
|
181
|
+
* min(S.alpha, 1.0 - D.alpha)
|
|
182
|
+
*/
|
|
183
|
+
CanvasBlendFactorSrcAlphaSaturated = 10,
|
|
184
|
+
/**
|
|
185
|
+
* Constant
|
|
186
|
+
*/
|
|
187
|
+
CanvasBlendFactorConstant = 11,
|
|
188
|
+
/**
|
|
189
|
+
* 1.0 - Constant
|
|
190
|
+
*/
|
|
191
|
+
CanvasBlendFactorOneMinusConstant = 12,
|
|
192
|
+
/**
|
|
193
|
+
* S1.component
|
|
194
|
+
*/
|
|
195
|
+
CanvasBlendFactorSrc1 = 13,
|
|
196
|
+
/**
|
|
197
|
+
* 1.0 - S1.component
|
|
198
|
+
*/
|
|
199
|
+
CanvasBlendFactorOneMinusSrc1 = 14,
|
|
200
|
+
/**
|
|
201
|
+
* S1.alpha
|
|
202
|
+
*/
|
|
203
|
+
CanvasBlendFactorSrc1Alpha = 15,
|
|
204
|
+
/**
|
|
205
|
+
* 1.0 - S1.alpha
|
|
206
|
+
*/
|
|
207
|
+
CanvasBlendFactorOneMinusSrc1Alpha = 16,
|
|
208
|
+
} CanvasBlendFactor;
|
|
209
|
+
|
|
210
|
+
typedef enum CanvasBlendOperation {
|
|
211
|
+
/**
|
|
212
|
+
* Src + Dst
|
|
213
|
+
*/
|
|
214
|
+
CanvasBlendOperationAdd = 0,
|
|
215
|
+
/**
|
|
216
|
+
* Src - Dst
|
|
217
|
+
*/
|
|
218
|
+
CanvasBlendOperationSubtract = 1,
|
|
219
|
+
/**
|
|
220
|
+
* Dst - Src
|
|
221
|
+
*/
|
|
222
|
+
CanvasBlendOperationReverseSubtract = 2,
|
|
223
|
+
/**
|
|
224
|
+
* min(Src, Dst)
|
|
225
|
+
*/
|
|
226
|
+
CanvasBlendOperationMin = 3,
|
|
227
|
+
/**
|
|
228
|
+
* max(Src, Dst)
|
|
229
|
+
*/
|
|
230
|
+
CanvasBlendOperationMax = 4,
|
|
231
|
+
} CanvasBlendOperation;
|
|
232
|
+
|
|
233
|
+
typedef enum CanvasBufferBindingType {
|
|
234
|
+
CanvasBufferBindingTypeUniform,
|
|
235
|
+
CanvasBufferBindingTypeStorage,
|
|
236
|
+
CanvasBufferBindingTypeReadOnlyStorage,
|
|
237
|
+
} CanvasBufferBindingType;
|
|
238
|
+
|
|
239
|
+
typedef enum CanvasCompareFunction {
|
|
240
|
+
CanvasCompareFunctionNever = 1,
|
|
241
|
+
CanvasCompareFunctionLess = 2,
|
|
242
|
+
CanvasCompareFunctionEqual = 3,
|
|
243
|
+
CanvasCompareFunctionLessEqual = 4,
|
|
244
|
+
CanvasCompareFunctionGreater = 5,
|
|
245
|
+
CanvasCompareFunctionNotEqual = 6,
|
|
246
|
+
CanvasCompareFunctionGreaterEqual = 7,
|
|
247
|
+
CanvasCompareFunctionAlways = 8,
|
|
248
|
+
} CanvasCompareFunction;
|
|
249
|
+
|
|
250
|
+
typedef enum CanvasCullMode {
|
|
251
|
+
CanvasCullModeNone,
|
|
252
|
+
CanvasCullModeFront,
|
|
253
|
+
CanvasCullModeBack,
|
|
254
|
+
} CanvasCullMode;
|
|
255
|
+
|
|
256
|
+
typedef enum CanvasFillRule {
|
|
257
|
+
CanvasFillRuleNonZero = 0,
|
|
258
|
+
CanvasFillRuleEvenOdd = 1,
|
|
259
|
+
} CanvasFillRule;
|
|
260
|
+
|
|
261
|
+
typedef enum CanvasFilterMode {
|
|
262
|
+
CanvasFilterModeNearest = 0,
|
|
263
|
+
/**
|
|
264
|
+
* Linear Interpolation
|
|
265
|
+
*
|
|
266
|
+
* This makes textures smooth but blurry when used as a mag filter.
|
|
267
|
+
*/
|
|
268
|
+
CanvasFilterModeLinear = 1,
|
|
269
|
+
} CanvasFilterMode;
|
|
270
|
+
|
|
271
|
+
typedef enum CanvasFrontFace {
|
|
272
|
+
CanvasFrontFaceCcw = 0,
|
|
273
|
+
CanvasFrontFaceCw = 1,
|
|
274
|
+
} CanvasFrontFace;
|
|
275
|
+
|
|
276
|
+
typedef enum CanvasGPUAutoLayoutMode {
|
|
277
|
+
CanvasGPUAutoLayoutModeAuto,
|
|
278
|
+
} CanvasGPUAutoLayoutMode;
|
|
279
|
+
|
|
280
|
+
typedef enum CanvasGPUErrorFilter {
|
|
281
|
+
/**
|
|
282
|
+
* Catch only out-of-memory errors.
|
|
283
|
+
*/
|
|
284
|
+
CanvasGPUErrorFilterOutOfMemory,
|
|
285
|
+
/**
|
|
286
|
+
* Catch only validation errors.
|
|
287
|
+
*/
|
|
288
|
+
CanvasGPUErrorFilterValidation,
|
|
289
|
+
/**
|
|
290
|
+
* Catch only internal errors.
|
|
291
|
+
*/
|
|
292
|
+
CanvasGPUErrorFilterInternal,
|
|
293
|
+
} CanvasGPUErrorFilter;
|
|
294
|
+
|
|
295
|
+
typedef enum CanvasGPUErrorType {
|
|
296
|
+
CanvasGPUErrorTypeNone,
|
|
297
|
+
CanvasGPUErrorTypeLost,
|
|
298
|
+
CanvasGPUErrorTypeOutOfMemory,
|
|
299
|
+
CanvasGPUErrorTypeValidation,
|
|
300
|
+
CanvasGPUErrorTypeInternal,
|
|
301
|
+
} CanvasGPUErrorType;
|
|
302
|
+
|
|
303
|
+
typedef enum CanvasGPUPowerPreference {
|
|
304
|
+
CanvasGPUPowerPreferenceNone,
|
|
305
|
+
CanvasGPUPowerPreferenceLowPower,
|
|
306
|
+
CanvasGPUPowerPreferenceHighPerformance,
|
|
307
|
+
} CanvasGPUPowerPreference;
|
|
308
|
+
|
|
309
|
+
typedef enum CanvasGPUPresentMode {
|
|
310
|
+
CanvasGPUPresentModeAutoVsync = 0,
|
|
311
|
+
CanvasGPUPresentModeAutoNoVsync = 1,
|
|
312
|
+
CanvasGPUPresentModeFifo = 2,
|
|
313
|
+
CanvasGPUPresentModeFifoRelaxed = 3,
|
|
314
|
+
CanvasGPUPresentModeImmediate = 4,
|
|
315
|
+
CanvasGPUPresentModeMailbox = 5,
|
|
316
|
+
} CanvasGPUPresentMode;
|
|
317
|
+
|
|
318
|
+
typedef enum CanvasGPUSurfaceAlphaMode {
|
|
319
|
+
CanvasGPUSurfaceAlphaModeAuto = 0,
|
|
320
|
+
CanvasGPUSurfaceAlphaModeOpaque = 1,
|
|
321
|
+
CanvasGPUSurfaceAlphaModePreMultiplied = 2,
|
|
322
|
+
CanvasGPUSurfaceAlphaModePostMultiplied = 3,
|
|
323
|
+
CanvasGPUSurfaceAlphaModeInherit = 4,
|
|
324
|
+
} CanvasGPUSurfaceAlphaMode;
|
|
325
|
+
|
|
326
|
+
typedef enum CanvasIndexFormat {
|
|
327
|
+
/**
|
|
328
|
+
* Indices are 16 bit unsigned integers.
|
|
329
|
+
*/
|
|
330
|
+
CanvasIndexFormatUint16 = 0,
|
|
331
|
+
/**
|
|
332
|
+
* Indices are 32 bit unsigned integers.
|
|
333
|
+
*/
|
|
334
|
+
CanvasIndexFormatUint32 = 1,
|
|
335
|
+
} CanvasIndexFormat;
|
|
336
|
+
|
|
337
|
+
typedef enum CanvasLoadOp {
|
|
338
|
+
CanvasLoadOpClear = 0,
|
|
339
|
+
CanvasLoadOpLoad = 1,
|
|
340
|
+
} CanvasLoadOp;
|
|
341
|
+
|
|
342
|
+
typedef enum CanvasOptionalTextureViewDimension {
|
|
343
|
+
CanvasOptionalTextureViewDimensionNone,
|
|
344
|
+
CanvasOptionalTextureViewDimensionD1,
|
|
345
|
+
CanvasOptionalTextureViewDimensionD2,
|
|
346
|
+
CanvasOptionalTextureViewDimensionD2Array,
|
|
347
|
+
CanvasOptionalTextureViewDimensionCube,
|
|
348
|
+
CanvasOptionalTextureViewDimensionCubeArray,
|
|
349
|
+
CanvasOptionalTextureViewDimensionD3,
|
|
350
|
+
} CanvasOptionalTextureViewDimension;
|
|
351
|
+
|
|
352
|
+
typedef enum CanvasPrimitiveTopology {
|
|
353
|
+
CanvasPrimitiveTopologyPointList = 0,
|
|
354
|
+
CanvasPrimitiveTopologyLineList = 1,
|
|
355
|
+
CanvasPrimitiveTopologyLineStrip = 2,
|
|
356
|
+
CanvasPrimitiveTopologyTriangleList = 3,
|
|
357
|
+
CanvasPrimitiveTopologyTriangleStrip = 4,
|
|
358
|
+
} CanvasPrimitiveTopology;
|
|
359
|
+
|
|
360
|
+
typedef enum CanvasQueryType {
|
|
361
|
+
CanvasQueryTypeOcclusion,
|
|
362
|
+
CanvasQueryTypeTimestamp,
|
|
363
|
+
} CanvasQueryType;
|
|
364
|
+
|
|
365
|
+
typedef enum CanvasRepetition {
|
|
366
|
+
CanvasRepetitionRepeat = 0,
|
|
367
|
+
CanvasRepetitionRepeatX = 1,
|
|
368
|
+
CanvasRepetitionRepeatY = 2,
|
|
369
|
+
CanvasRepetitionNoRepeat = 3,
|
|
370
|
+
} CanvasRepetition;
|
|
371
|
+
|
|
372
|
+
typedef enum CanvasSamplerBindingType {
|
|
373
|
+
/**
|
|
374
|
+
* The sampling result is produced based on more than a single color sample from a texture,
|
|
375
|
+
* e.g. when bilinear interpolation is enabled.
|
|
376
|
+
*/
|
|
377
|
+
CanvasSamplerBindingTypeFiltering,
|
|
378
|
+
/**
|
|
379
|
+
* The sampling result is produced based on a single color sample from a texture.
|
|
380
|
+
*/
|
|
381
|
+
CanvasSamplerBindingTypeNonFiltering,
|
|
382
|
+
/**
|
|
383
|
+
* Use as a comparison sampler instead of a normal sampler.
|
|
384
|
+
* For more info take a look at the analogous functionality in OpenGL: <https://www.khronos.org/opengl/wiki/Sampler_Object#Comparison_mode>.
|
|
385
|
+
*/
|
|
386
|
+
CanvasSamplerBindingTypeComparison,
|
|
387
|
+
} CanvasSamplerBindingType;
|
|
388
|
+
|
|
389
|
+
typedef enum CanvasStencilOperation {
|
|
390
|
+
CanvasStencilOperationKeep = 0,
|
|
391
|
+
CanvasStencilOperationZero = 1,
|
|
392
|
+
CanvasStencilOperationReplace = 2,
|
|
393
|
+
CanvasStencilOperationInvert = 3,
|
|
394
|
+
CanvasStencilOperationIncrementClamp = 4,
|
|
395
|
+
CanvasStencilOperationDecrementClamp = 5,
|
|
396
|
+
CanvasStencilOperationIncrementWrap = 6,
|
|
397
|
+
CanvasStencilOperationDecrementWrap = 7,
|
|
398
|
+
} CanvasStencilOperation;
|
|
399
|
+
|
|
400
|
+
typedef enum CanvasStorageTextureAccess {
|
|
401
|
+
/**
|
|
402
|
+
* The texture can only be written in the shader and it:
|
|
403
|
+
* - may or may not be annotated with `write` (WGSL).
|
|
404
|
+
* - must be annotated with `writeonly` (GLSL).
|
|
405
|
+
*
|
|
406
|
+
* Example WGSL syntax:
|
|
407
|
+
* ```rust,ignore
|
|
408
|
+
* @group(0) @binding(0)
|
|
409
|
+
* var my_storage_image: texture_storage_2d<f32, write>;
|
|
410
|
+
* ```
|
|
411
|
+
*
|
|
412
|
+
* Example GLSL syntax:
|
|
413
|
+
* ```cpp,ignore
|
|
414
|
+
* layout(set=0, binding=0, r32f) writeonly uniform image2D myStorageImage;
|
|
415
|
+
* ```
|
|
416
|
+
*/
|
|
417
|
+
CanvasStorageTextureAccessWriteOnly,
|
|
418
|
+
/**
|
|
419
|
+
* The texture can only be read in the shader and it must be annotated with `read` (WGSL) or
|
|
420
|
+
* `readonly` (GLSL).
|
|
421
|
+
*
|
|
422
|
+
* [`Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES`] must be enabled to use this access
|
|
423
|
+
* mode. This is a native-only extension.
|
|
424
|
+
*
|
|
425
|
+
* Example WGSL syntax:
|
|
426
|
+
* ```rust,ignore
|
|
427
|
+
* @group(0) @binding(0)
|
|
428
|
+
* var my_storage_image: texture_storage_2d<f32, read>;
|
|
429
|
+
* ```
|
|
430
|
+
*
|
|
431
|
+
* Example GLSL syntax:
|
|
432
|
+
* ```cpp,ignore
|
|
433
|
+
* layout(set=0, binding=0, r32f) readonly uniform image2D myStorageImage;
|
|
434
|
+
* ```
|
|
435
|
+
*/
|
|
436
|
+
CanvasStorageTextureAccessReadOnly,
|
|
437
|
+
/**
|
|
438
|
+
* The texture can be both read and written in the shader and must be annotated with
|
|
439
|
+
* `read_write` in WGSL.
|
|
440
|
+
*
|
|
441
|
+
* [`Features::TEXTURE_ADAPTER_SPECIFIC_FORMAT_FEATURES`] must be enabled to use this access
|
|
442
|
+
* mode. This is a nonstandard, native-only extension.
|
|
443
|
+
*
|
|
444
|
+
* Example WGSL syntax:
|
|
445
|
+
* ```rust,ignore
|
|
446
|
+
* @group(0) @binding(0)
|
|
447
|
+
* var my_storage_image: texture_storage_2d<f32, read_write>;
|
|
448
|
+
* ```
|
|
449
|
+
*
|
|
450
|
+
* Example GLSL syntax:
|
|
451
|
+
* ```cpp,ignore
|
|
452
|
+
* layout(set=0, binding=0, r32f) uniform image2D myStorageImage;
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
CanvasStorageTextureAccessReadWrite,
|
|
456
|
+
} CanvasStorageTextureAccess;
|
|
457
|
+
|
|
458
|
+
typedef enum CanvasStoreOp {
|
|
459
|
+
CanvasStoreOpDiscard = 0,
|
|
460
|
+
CanvasStoreOpStore = 1,
|
|
461
|
+
} CanvasStoreOp;
|
|
462
|
+
|
|
463
|
+
typedef enum CanvasTextureAspect {
|
|
464
|
+
/**
|
|
465
|
+
* Depth, Stencil, and Color.
|
|
466
|
+
*/
|
|
467
|
+
CanvasTextureAspectAll,
|
|
468
|
+
/**
|
|
469
|
+
* Stencil.
|
|
470
|
+
*/
|
|
471
|
+
CanvasTextureAspectStencilOnly,
|
|
472
|
+
/**
|
|
473
|
+
* Depth.
|
|
474
|
+
*/
|
|
475
|
+
CanvasTextureAspectDepthOnly,
|
|
476
|
+
/**
|
|
477
|
+
* Plane 0.
|
|
478
|
+
*/
|
|
479
|
+
CanvasTextureAspectPlane0,
|
|
480
|
+
/**
|
|
481
|
+
* Plane 1.
|
|
482
|
+
*/
|
|
483
|
+
CanvasTextureAspectPlane1,
|
|
484
|
+
/**
|
|
485
|
+
* Plane 2.
|
|
486
|
+
*/
|
|
487
|
+
CanvasTextureAspectPlane2,
|
|
488
|
+
} CanvasTextureAspect;
|
|
489
|
+
|
|
490
|
+
typedef enum CanvasTextureDimension {
|
|
491
|
+
CanvasTextureDimensionD1,
|
|
492
|
+
CanvasTextureDimensionD2,
|
|
493
|
+
CanvasTextureDimensionD3,
|
|
494
|
+
} CanvasTextureDimension;
|
|
495
|
+
|
|
496
|
+
typedef enum CanvasTextureSampleType {
|
|
497
|
+
CanvasTextureSampleTypeFloat,
|
|
498
|
+
CanvasTextureSampleTypeUnfilterableFloat,
|
|
499
|
+
CanvasTextureSampleTypeDepth,
|
|
500
|
+
CanvasTextureSampleTypeSint,
|
|
501
|
+
CanvasTextureSampleTypeUint,
|
|
502
|
+
} CanvasTextureSampleType;
|
|
503
|
+
|
|
504
|
+
typedef enum CanvasTextureViewDimension {
|
|
505
|
+
CanvasTextureViewDimensionD1,
|
|
506
|
+
CanvasTextureViewDimensionD2,
|
|
507
|
+
CanvasTextureViewDimensionD2Array,
|
|
508
|
+
CanvasTextureViewDimensionCube,
|
|
509
|
+
CanvasTextureViewDimensionCubeArray,
|
|
510
|
+
CanvasTextureViewDimensionD3,
|
|
511
|
+
} CanvasTextureViewDimension;
|
|
512
|
+
|
|
513
|
+
typedef enum CanvasVertexFormat {
|
|
514
|
+
CanvasVertexFormatUint8x2 = 0,
|
|
515
|
+
CanvasVertexFormatUint8x4 = 1,
|
|
516
|
+
CanvasVertexFormatSint8x2 = 2,
|
|
517
|
+
CanvasVertexFormatSint8x4 = 3,
|
|
518
|
+
CanvasVertexFormatUnorm8x2 = 4,
|
|
519
|
+
CanvasVertexFormatUnorm8x4 = 5,
|
|
520
|
+
CanvasVertexFormatSnorm8x2 = 6,
|
|
521
|
+
CanvasVertexFormatSnorm8x4 = 7,
|
|
522
|
+
CanvasVertexFormatUint16x2 = 8,
|
|
523
|
+
CanvasVertexFormatUint16x4 = 9,
|
|
524
|
+
CanvasVertexFormatSint16x2 = 10,
|
|
525
|
+
CanvasVertexFormatSint16x4 = 11,
|
|
526
|
+
CanvasVertexFormatUnorm16x2 = 12,
|
|
527
|
+
CanvasVertexFormatUnorm16x4 = 13,
|
|
528
|
+
CanvasVertexFormatSnorm16x2 = 14,
|
|
529
|
+
CanvasVertexFormatSnorm16x4 = 15,
|
|
530
|
+
CanvasVertexFormatFloat16x2 = 16,
|
|
531
|
+
CanvasVertexFormatFloat16x4 = 17,
|
|
532
|
+
CanvasVertexFormatFloat32 = 18,
|
|
533
|
+
CanvasVertexFormatFloat32x2 = 19,
|
|
534
|
+
CanvasVertexFormatFloat32x3 = 20,
|
|
535
|
+
CanvasVertexFormatFloat32x4 = 21,
|
|
536
|
+
CanvasVertexFormatUint32 = 22,
|
|
537
|
+
CanvasVertexFormatUint32x2 = 23,
|
|
538
|
+
CanvasVertexFormatUint32x3 = 24,
|
|
539
|
+
CanvasVertexFormatUint32x4 = 25,
|
|
540
|
+
CanvasVertexFormatSint32 = 26,
|
|
541
|
+
CanvasVertexFormatSint32x2 = 27,
|
|
542
|
+
CanvasVertexFormatSint32x3 = 28,
|
|
543
|
+
CanvasVertexFormatSint32x4 = 29,
|
|
544
|
+
CanvasVertexFormatFloat64 = 30,
|
|
545
|
+
CanvasVertexFormatFloat64x2 = 31,
|
|
546
|
+
CanvasVertexFormatFloat64x3 = 32,
|
|
547
|
+
CanvasVertexFormatFloat64x4 = 33,
|
|
548
|
+
CanvasVertexFormatUnorm10_10_10_2 = 34,
|
|
549
|
+
} CanvasVertexFormat;
|
|
550
|
+
|
|
551
|
+
typedef enum CanvasVertexStepMode {
|
|
552
|
+
CanvasVertexStepModeVertex = 0,
|
|
553
|
+
CanvasVertexStepModeInstance = 1,
|
|
554
|
+
} CanvasVertexStepMode;
|
|
555
|
+
|
|
11
556
|
typedef enum GLConstants {
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
557
|
+
GLConstantsUnPackFlipYWebGL = 37440,
|
|
558
|
+
GLConstantsUnpackPremultiplyAlphaWebGL = 37441,
|
|
559
|
+
GLConstantsUnpackColorSpaceConversionWebGL = 37443,
|
|
15
560
|
} GLConstants;
|
|
16
561
|
|
|
562
|
+
typedef enum GPUMapMode {
|
|
563
|
+
GPUMapModeRead,
|
|
564
|
+
GPUMapModeWrite,
|
|
565
|
+
} GPUMapMode;
|
|
566
|
+
|
|
17
567
|
typedef enum ImageBitmapColorSpaceConversion {
|
|
18
568
|
ImageBitmapColorSpaceConversionDefault,
|
|
19
569
|
ImageBitmapColorSpaceConversionNone,
|
|
@@ -22,7 +572,7 @@ typedef enum ImageBitmapColorSpaceConversion {
|
|
|
22
572
|
typedef enum ImageBitmapPremultiplyAlpha {
|
|
23
573
|
ImageBitmapPremultiplyAlphaDefault,
|
|
24
574
|
ImageBitmapPremultiplyAlphaPremultiply,
|
|
25
|
-
|
|
575
|
+
ImageBitmapPremultiplyAlphaAlphaNone,
|
|
26
576
|
} ImageBitmapPremultiplyAlpha;
|
|
27
577
|
|
|
28
578
|
typedef enum ImageBitmapResizeQuality {
|
|
@@ -39,48 +589,57 @@ typedef enum InvalidateState {
|
|
|
39
589
|
} InvalidateState;
|
|
40
590
|
|
|
41
591
|
typedef enum PaintStyleType {
|
|
42
|
-
PaintStyleTypeNone,
|
|
43
592
|
PaintStyleTypeColor,
|
|
44
593
|
PaintStyleTypeGradient,
|
|
45
594
|
PaintStyleTypePattern,
|
|
46
595
|
} PaintStyleType;
|
|
47
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
|
+
|
|
48
607
|
typedef enum TextBaseLine {
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
608
|
+
TextBaseLineTOP = 0,
|
|
609
|
+
TextBaseLineHANGING = 1,
|
|
610
|
+
TextBaseLineMIDDLE = 2,
|
|
611
|
+
TextBaseLineALPHABETIC = 3,
|
|
612
|
+
TextBaseLineIDEOGRAPHIC = 4,
|
|
613
|
+
TextBaseLineBOTTOM = 5,
|
|
55
614
|
} TextBaseLine;
|
|
56
615
|
|
|
57
616
|
typedef enum WebGLExtensionType {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
617
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_blend_minmax,
|
|
618
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_color_buffer_half_float,
|
|
619
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_disjoint_timer_query,
|
|
620
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_sRGB,
|
|
621
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_shader_texture_lod,
|
|
622
|
+
WebGLExtensionTypeWebGLExtensionTypeEXT_texture_filter_anisotropic,
|
|
623
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_element_index_uint,
|
|
624
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_standard_derivatives,
|
|
625
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_float,
|
|
626
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_float_linear,
|
|
627
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_half_float,
|
|
628
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_texture_half_float_linear,
|
|
629
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_vertex_array_object,
|
|
630
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_color_buffer_float,
|
|
631
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_atc,
|
|
632
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_etc1,
|
|
633
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_s3tc,
|
|
634
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_s3tc_srgb,
|
|
635
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_etc,
|
|
636
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_compressed_texture_pvrtc,
|
|
637
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_lose_context,
|
|
638
|
+
WebGLExtensionTypeWebGLExtensionTypeANGLE_instanced_arrays,
|
|
639
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_depth_texture,
|
|
640
|
+
WebGLExtensionTypeWebGLExtensionTypeWEBGL_draw_buffers,
|
|
641
|
+
WebGLExtensionTypeWebGLExtensionTypeOES_fbo_render_mipmap,
|
|
642
|
+
WebGLExtensionTypeWebGLExtensionTypeNone,
|
|
84
643
|
} WebGLExtensionType;
|
|
85
644
|
|
|
86
645
|
typedef enum WebGLResultType {
|
|
@@ -100,8 +659,58 @@ typedef struct ANGLE_instanced_arrays ANGLE_instanced_arrays;
|
|
|
100
659
|
|
|
101
660
|
typedef struct CCow CCow;
|
|
102
661
|
|
|
662
|
+
typedef struct CanvasConstants CanvasConstants;
|
|
663
|
+
|
|
664
|
+
typedef struct CanvasGPUAdapter CanvasGPUAdapter;
|
|
665
|
+
|
|
666
|
+
typedef struct CanvasGPUAdapterInfo CanvasGPUAdapterInfo;
|
|
667
|
+
|
|
668
|
+
typedef struct CanvasGPUBindGroup CanvasGPUBindGroup;
|
|
669
|
+
|
|
670
|
+
typedef struct CanvasGPUBindGroupLayout CanvasGPUBindGroupLayout;
|
|
671
|
+
|
|
672
|
+
typedef struct CanvasGPUBuffer CanvasGPUBuffer;
|
|
673
|
+
|
|
674
|
+
typedef struct CanvasGPUCanvasContext CanvasGPUCanvasContext;
|
|
675
|
+
|
|
676
|
+
typedef struct CanvasGPUCommandBuffer CanvasGPUCommandBuffer;
|
|
677
|
+
|
|
678
|
+
typedef struct CanvasGPUCommandEncoder CanvasGPUCommandEncoder;
|
|
679
|
+
|
|
680
|
+
typedef struct CanvasGPUComputePassEncoder CanvasGPUComputePassEncoder;
|
|
681
|
+
|
|
682
|
+
typedef struct CanvasGPUComputePipeline CanvasGPUComputePipeline;
|
|
683
|
+
|
|
684
|
+
typedef struct CanvasGPUDevice CanvasGPUDevice;
|
|
685
|
+
|
|
686
|
+
typedef struct CanvasGPUError CanvasGPUError;
|
|
687
|
+
|
|
688
|
+
typedef struct CanvasGPUPipelineLayout CanvasGPUPipelineLayout;
|
|
689
|
+
|
|
690
|
+
typedef struct CanvasGPUQuerySet CanvasGPUQuerySet;
|
|
691
|
+
|
|
692
|
+
typedef struct CanvasGPUQueue CanvasGPUQueue;
|
|
693
|
+
|
|
694
|
+
typedef struct CanvasGPURenderBundle CanvasGPURenderBundle;
|
|
695
|
+
|
|
696
|
+
typedef struct CanvasGPURenderBundleEncoder CanvasGPURenderBundleEncoder;
|
|
697
|
+
|
|
698
|
+
typedef struct CanvasGPURenderPassEncoder CanvasGPURenderPassEncoder;
|
|
699
|
+
|
|
700
|
+
typedef struct CanvasGPURenderPipeline CanvasGPURenderPipeline;
|
|
701
|
+
|
|
702
|
+
typedef struct CanvasGPUSampler CanvasGPUSampler;
|
|
703
|
+
|
|
704
|
+
typedef struct CanvasGPUShaderModule CanvasGPUShaderModule;
|
|
705
|
+
|
|
706
|
+
typedef struct CanvasGPUTexture CanvasGPUTexture;
|
|
707
|
+
|
|
708
|
+
typedef struct CanvasGPUTextureView CanvasGPUTextureView;
|
|
709
|
+
|
|
103
710
|
typedef struct CanvasRenderingContext2D CanvasRenderingContext2D;
|
|
104
711
|
|
|
712
|
+
typedef struct CanvasWebGPUInstance CanvasWebGPUInstance;
|
|
713
|
+
|
|
105
714
|
typedef struct ContextAttributes ContextAttributes;
|
|
106
715
|
|
|
107
716
|
typedef struct EXT_blend_minmax EXT_blend_minmax;
|
|
@@ -172,8 +781,6 @@ typedef struct U32Buffer U32Buffer;
|
|
|
172
781
|
|
|
173
782
|
typedef struct U8Buffer U8Buffer;
|
|
174
783
|
|
|
175
|
-
typedef struct URL URL;
|
|
176
|
-
|
|
177
784
|
typedef struct WEBGL_color_buffer_float WEBGL_color_buffer_float;
|
|
178
785
|
|
|
179
786
|
typedef struct WEBGL_compressed_texture_atc WEBGL_compressed_texture_atc;
|
|
@@ -210,31 +817,1097 @@ typedef struct WebGLState WebGLState;
|
|
|
210
817
|
|
|
211
818
|
typedef struct WebGLSync WebGLSync;
|
|
212
819
|
|
|
213
|
-
|
|
820
|
+
typedef enum CanvasGPUTextureFormat_Tag {
|
|
821
|
+
/**
|
|
822
|
+
* Red channel only. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
823
|
+
*/
|
|
824
|
+
CanvasGPUTextureFormatR8Unorm,
|
|
825
|
+
/**
|
|
826
|
+
* Red channel only. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
827
|
+
*/
|
|
828
|
+
CanvasGPUTextureFormatR8Snorm,
|
|
829
|
+
/**
|
|
830
|
+
* Red channel only. 8 bit integer per channel. Unsigned in shader.
|
|
831
|
+
*/
|
|
832
|
+
CanvasGPUTextureFormatR8Uint,
|
|
833
|
+
/**
|
|
834
|
+
* Red channel only. 8 bit integer per channel. Signed in shader.
|
|
835
|
+
*/
|
|
836
|
+
CanvasGPUTextureFormatR8Sint,
|
|
837
|
+
/**
|
|
838
|
+
* Red channel only. 16 bit integer per channel. Unsigned in shader.
|
|
839
|
+
*/
|
|
840
|
+
CanvasGPUTextureFormatR16Uint,
|
|
841
|
+
/**
|
|
842
|
+
* Red channel only. 16 bit integer per channel. Signed in shader.
|
|
843
|
+
*/
|
|
844
|
+
CanvasGPUTextureFormatR16Sint,
|
|
845
|
+
/**
|
|
846
|
+
* Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
847
|
+
*
|
|
848
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
849
|
+
*/
|
|
850
|
+
CanvasGPUTextureFormatR16Unorm,
|
|
851
|
+
/**
|
|
852
|
+
* Red channel only. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
853
|
+
*
|
|
854
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
855
|
+
*/
|
|
856
|
+
CanvasGPUTextureFormatR16Snorm,
|
|
857
|
+
/**
|
|
858
|
+
* Red channel only. 16 bit float per channel. Float in shader.
|
|
859
|
+
*/
|
|
860
|
+
CanvasGPUTextureFormatR16Float,
|
|
861
|
+
/**
|
|
862
|
+
* Red and green channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
863
|
+
*/
|
|
864
|
+
CanvasGPUTextureFormatRg8Unorm,
|
|
865
|
+
/**
|
|
866
|
+
* Red and green channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
867
|
+
*/
|
|
868
|
+
CanvasGPUTextureFormatRg8Snorm,
|
|
869
|
+
/**
|
|
870
|
+
* Red and green channels. 8 bit integer per channel. Unsigned in shader.
|
|
871
|
+
*/
|
|
872
|
+
CanvasGPUTextureFormatRg8Uint,
|
|
873
|
+
/**
|
|
874
|
+
* Red and green channels. 8 bit integer per channel. Signed in shader.
|
|
875
|
+
*/
|
|
876
|
+
CanvasGPUTextureFormatRg8Sint,
|
|
877
|
+
/**
|
|
878
|
+
* Red channel only. 32 bit integer per channel. Unsigned in shader.
|
|
879
|
+
*/
|
|
880
|
+
CanvasGPUTextureFormatR32Uint,
|
|
881
|
+
/**
|
|
882
|
+
* Red channel only. 32 bit integer per channel. Signed in shader.
|
|
883
|
+
*/
|
|
884
|
+
CanvasGPUTextureFormatR32Sint,
|
|
885
|
+
/**
|
|
886
|
+
* Red channel only. 32 bit float per channel. Float in shader.
|
|
887
|
+
*/
|
|
888
|
+
CanvasGPUTextureFormatR32Float,
|
|
889
|
+
/**
|
|
890
|
+
* Red and green channels. 16 bit integer per channel. Unsigned in shader.
|
|
891
|
+
*/
|
|
892
|
+
CanvasGPUTextureFormatRg16Uint,
|
|
893
|
+
/**
|
|
894
|
+
* Red and green channels. 16 bit integer per channel. Signed in shader.
|
|
895
|
+
*/
|
|
896
|
+
CanvasGPUTextureFormatRg16Sint,
|
|
897
|
+
/**
|
|
898
|
+
* Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
899
|
+
*
|
|
900
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
901
|
+
*/
|
|
902
|
+
CanvasGPUTextureFormatRg16Unorm,
|
|
903
|
+
/**
|
|
904
|
+
* Red and green channels. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
905
|
+
*
|
|
906
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
907
|
+
*/
|
|
908
|
+
CanvasGPUTextureFormatRg16Snorm,
|
|
909
|
+
/**
|
|
910
|
+
* Red and green channels. 16 bit float per channel. Float in shader.
|
|
911
|
+
*/
|
|
912
|
+
CanvasGPUTextureFormatRg16Float,
|
|
913
|
+
/**
|
|
914
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
915
|
+
*/
|
|
916
|
+
CanvasGPUTextureFormatRgba8Unorm,
|
|
917
|
+
/**
|
|
918
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
919
|
+
*/
|
|
920
|
+
CanvasGPUTextureFormatRgba8UnormSrgb,
|
|
921
|
+
/**
|
|
922
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. [-127, 127] converted to/from float [-1, 1] in shader.
|
|
923
|
+
*/
|
|
924
|
+
CanvasGPUTextureFormatRgba8Snorm,
|
|
925
|
+
/**
|
|
926
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Unsigned in shader.
|
|
927
|
+
*/
|
|
928
|
+
CanvasGPUTextureFormatRgba8Uint,
|
|
929
|
+
/**
|
|
930
|
+
* Red, green, blue, and alpha channels. 8 bit integer per channel. Signed in shader.
|
|
931
|
+
*/
|
|
932
|
+
CanvasGPUTextureFormatRgba8Sint,
|
|
933
|
+
/**
|
|
934
|
+
* Blue, green, red, and alpha channels. 8 bit integer per channel. [0, 255] converted to/from float [0, 1] in shader.
|
|
935
|
+
*/
|
|
936
|
+
CanvasGPUTextureFormatBgra8Unorm,
|
|
937
|
+
/**
|
|
938
|
+
* Blue, green, red, and alpha channels. 8 bit integer per channel. Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
939
|
+
*/
|
|
940
|
+
CanvasGPUTextureFormatBgra8UnormSrgb,
|
|
941
|
+
/**
|
|
942
|
+
* Packed unsigned float with 9 bits mantisa for each RGB component, then a common 5 bits exponent
|
|
943
|
+
*/
|
|
944
|
+
CanvasGPUTextureFormatRgb9e5Ufloat,
|
|
945
|
+
/**
|
|
946
|
+
* Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. Unsigned in shader.
|
|
947
|
+
*/
|
|
948
|
+
CanvasGPUTextureFormatRgb10a2Uint,
|
|
949
|
+
/**
|
|
950
|
+
* Red, green, blue, and alpha channels. 10 bit integer for RGB channels, 2 bit integer for alpha channel. [0, 1023] ([0, 3] for alpha) converted to/from float [0, 1] in shader.
|
|
951
|
+
*/
|
|
952
|
+
CanvasGPUTextureFormatRgb10a2Unorm,
|
|
953
|
+
/**
|
|
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.
|
|
955
|
+
*/
|
|
956
|
+
CanvasGPUTextureFormatRg11b10UFloat,
|
|
957
|
+
/**
|
|
958
|
+
* Red and green channels. 32 bit integer per channel. Unsigned in shader.
|
|
959
|
+
*/
|
|
960
|
+
CanvasGPUTextureFormatRg32Uint,
|
|
961
|
+
/**
|
|
962
|
+
* Red and green channels. 32 bit integer per channel. Signed in shader.
|
|
963
|
+
*/
|
|
964
|
+
CanvasGPUTextureFormatRg32Sint,
|
|
965
|
+
/**
|
|
966
|
+
* Red and green channels. 32 bit float per channel. Float in shader.
|
|
967
|
+
*/
|
|
968
|
+
CanvasGPUTextureFormatRg32Float,
|
|
969
|
+
/**
|
|
970
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. Unsigned in shader.
|
|
971
|
+
*/
|
|
972
|
+
CanvasGPUTextureFormatRgba16Uint,
|
|
973
|
+
/**
|
|
974
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. Signed in shader.
|
|
975
|
+
*/
|
|
976
|
+
CanvasGPUTextureFormatRgba16Sint,
|
|
977
|
+
/**
|
|
978
|
+
* Red, green, blue, and alpha channels. 16 bit integer per channel. [0, 65535] converted to/from float [0, 1] in shader.
|
|
979
|
+
*
|
|
980
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
981
|
+
*/
|
|
982
|
+
CanvasGPUTextureFormatRgba16Unorm,
|
|
983
|
+
/**
|
|
984
|
+
* Red, green, blue, and alpha. 16 bit integer per channel. [0, 65535] converted to/from float [-1, 1] in shader.
|
|
985
|
+
*
|
|
986
|
+
* [`Features::TEXTURE_FORMAT_16BIT_NORM`] must be enabled to use this texture format.
|
|
987
|
+
*/
|
|
988
|
+
CanvasGPUTextureFormatRgba16Snorm,
|
|
989
|
+
/**
|
|
990
|
+
* Red, green, blue, and alpha channels. 16 bit float per channel. Float in shader.
|
|
991
|
+
*/
|
|
992
|
+
CanvasGPUTextureFormatRgba16Float,
|
|
993
|
+
/**
|
|
994
|
+
* Red, green, blue, and alpha channels. 32 bit integer per channel. Unsigned in shader.
|
|
995
|
+
*/
|
|
996
|
+
CanvasGPUTextureFormatRgba32Uint,
|
|
997
|
+
/**
|
|
998
|
+
* Red, green, blue, and alpha channels. 32 bit integer per channel. Signed in shader.
|
|
999
|
+
*/
|
|
1000
|
+
CanvasGPUTextureFormatRgba32Sint,
|
|
1001
|
+
/**
|
|
1002
|
+
* Red, green, blue, and alpha channels. 32 bit float per channel. Float in shader.
|
|
1003
|
+
*/
|
|
1004
|
+
CanvasGPUTextureFormatRgba32Float,
|
|
1005
|
+
/**
|
|
1006
|
+
* Stencil format with 8 bit integer stencil.
|
|
1007
|
+
*/
|
|
1008
|
+
CanvasGPUTextureFormatStencil8,
|
|
1009
|
+
/**
|
|
1010
|
+
* Special depth format with 16 bit integer depth.
|
|
1011
|
+
*/
|
|
1012
|
+
CanvasGPUTextureFormatDepth16Unorm,
|
|
1013
|
+
/**
|
|
1014
|
+
* Special depth format with at least 24 bit integer depth.
|
|
1015
|
+
*/
|
|
1016
|
+
CanvasGPUTextureFormatDepth24Plus,
|
|
1017
|
+
/**
|
|
1018
|
+
* Special depth/stencil format with at least 24 bit integer depth and 8 bits integer stencil.
|
|
1019
|
+
*/
|
|
1020
|
+
CanvasGPUTextureFormatDepth24PlusStencil8,
|
|
1021
|
+
/**
|
|
1022
|
+
* Special depth format with 32 bit floating point depth.
|
|
1023
|
+
*/
|
|
1024
|
+
CanvasGPUTextureFormatDepth32Float,
|
|
1025
|
+
/**
|
|
1026
|
+
* Special depth/stencil format with 32 bit floating point depth and 8 bits integer stencil.
|
|
1027
|
+
*
|
|
1028
|
+
* [`Features::DEPTH32FLOAT_STENCIL8`] must be enabled to use this texture format.
|
|
1029
|
+
*/
|
|
1030
|
+
CanvasGPUTextureFormatDepth32FloatStencil8,
|
|
1031
|
+
/**
|
|
1032
|
+
* YUV 4:2:0 chroma subsampled format.
|
|
1033
|
+
*
|
|
1034
|
+
* Contains two planes:
|
|
1035
|
+
* - 0: Single 8 bit channel luminance.
|
|
1036
|
+
* - 1: Dual 8 bit channel chrominance at half width and half height.
|
|
1037
|
+
*
|
|
1038
|
+
* Valid view formats for luminance are [`TextureFormat::R8Unorm`].
|
|
1039
|
+
*
|
|
1040
|
+
* Valid view formats for chrominance are [`TextureFormat::Rg8Unorm`].
|
|
1041
|
+
*
|
|
1042
|
+
* Width and height must be even.
|
|
1043
|
+
*
|
|
1044
|
+
* [`Features::TEXTURE_FORMAT_NV12`] must be enabled to use this texture format.
|
|
1045
|
+
*/
|
|
1046
|
+
CanvasGPUTextureFormatNV12,
|
|
1047
|
+
/**
|
|
1048
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
|
|
1049
|
+
* [0, 63] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
|
|
1050
|
+
*
|
|
1051
|
+
* Also known as DXT1.
|
|
1052
|
+
*
|
|
1053
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1054
|
+
*/
|
|
1055
|
+
CanvasGPUTextureFormatBc1RgbaUnorm,
|
|
1056
|
+
/**
|
|
1057
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 4 color + alpha pallet. 5 bit R + 6 bit G + 5 bit B + 1 bit alpha.
|
|
1058
|
+
* Srgb-color [0, 63] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1059
|
+
*
|
|
1060
|
+
* Also known as DXT1.
|
|
1061
|
+
*
|
|
1062
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1063
|
+
*/
|
|
1064
|
+
CanvasGPUTextureFormatBc1RgbaUnormSrgb,
|
|
1065
|
+
/**
|
|
1066
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha.
|
|
1067
|
+
* [0, 63] ([0, 15] for alpha) converted to/from float [0, 1] in shader.
|
|
1068
|
+
*
|
|
1069
|
+
* Also known as DXT3.
|
|
1070
|
+
*
|
|
1071
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1072
|
+
*/
|
|
1073
|
+
CanvasGPUTextureFormatBc2RgbaUnorm,
|
|
1074
|
+
/**
|
|
1075
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet. 5 bit R + 6 bit G + 5 bit B + 4 bit alpha.
|
|
1076
|
+
* Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1077
|
+
*
|
|
1078
|
+
* Also known as DXT3.
|
|
1079
|
+
*
|
|
1080
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1081
|
+
*/
|
|
1082
|
+
CanvasGPUTextureFormatBc2RgbaUnormSrgb,
|
|
1083
|
+
/**
|
|
1084
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha.
|
|
1085
|
+
* [0, 63] ([0, 255] for alpha) converted to/from float [0, 1] in shader.
|
|
1086
|
+
*
|
|
1087
|
+
* Also known as DXT5.
|
|
1088
|
+
*
|
|
1089
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1090
|
+
*/
|
|
1091
|
+
CanvasGPUTextureFormatBc3RgbaUnorm,
|
|
1092
|
+
/**
|
|
1093
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 4 color pallet + 8 alpha pallet. 5 bit R + 6 bit G + 5 bit B + 8 bit alpha.
|
|
1094
|
+
* Srgb-color [0, 63] ([0, 255] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1095
|
+
*
|
|
1096
|
+
* Also known as DXT5.
|
|
1097
|
+
*
|
|
1098
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1099
|
+
*/
|
|
1100
|
+
CanvasGPUTextureFormatBc3RgbaUnormSrgb,
|
|
1101
|
+
/**
|
|
1102
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R.
|
|
1103
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1104
|
+
*
|
|
1105
|
+
* Also known as RGTC1.
|
|
1106
|
+
*
|
|
1107
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1108
|
+
*/
|
|
1109
|
+
CanvasGPUTextureFormatBc4RUnorm,
|
|
1110
|
+
/**
|
|
1111
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). 8 color pallet. 8 bit R.
|
|
1112
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1113
|
+
*
|
|
1114
|
+
* Also known as RGTC1.
|
|
1115
|
+
*
|
|
1116
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1117
|
+
*/
|
|
1118
|
+
CanvasGPUTextureFormatBc4RSnorm,
|
|
1119
|
+
/**
|
|
1120
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG.
|
|
1121
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1122
|
+
*
|
|
1123
|
+
* Also known as RGTC2.
|
|
1124
|
+
*
|
|
1125
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1126
|
+
*/
|
|
1127
|
+
CanvasGPUTextureFormatBc5RgUnorm,
|
|
1128
|
+
/**
|
|
1129
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). 8 color red pallet + 8 color green pallet. 8 bit RG.
|
|
1130
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1131
|
+
*
|
|
1132
|
+
* Also known as RGTC2.
|
|
1133
|
+
*
|
|
1134
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1135
|
+
*/
|
|
1136
|
+
CanvasGPUTextureFormatBc5RgSnorm,
|
|
1137
|
+
/**
|
|
1138
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit unsigned float RGB. Float in shader.
|
|
1139
|
+
*
|
|
1140
|
+
* Also known as BPTC (float).
|
|
1141
|
+
*
|
|
1142
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1143
|
+
*/
|
|
1144
|
+
CanvasGPUTextureFormatBc6hRgbUfloat,
|
|
1145
|
+
/**
|
|
1146
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 16 bit signed float RGB. Float in shader.
|
|
1147
|
+
*
|
|
1148
|
+
* Also known as BPTC (float).
|
|
1149
|
+
*
|
|
1150
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1151
|
+
*/
|
|
1152
|
+
CanvasGPUTextureFormatBc6hRgbFloat,
|
|
1153
|
+
/**
|
|
1154
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA.
|
|
1155
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1156
|
+
*
|
|
1157
|
+
* Also known as BPTC (unorm).
|
|
1158
|
+
*
|
|
1159
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1160
|
+
*/
|
|
1161
|
+
CanvasGPUTextureFormatBc7RgbaUnorm,
|
|
1162
|
+
/**
|
|
1163
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Variable sized pallet. 8 bit integer RGBA.
|
|
1164
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1165
|
+
*
|
|
1166
|
+
* Also known as BPTC (unorm).
|
|
1167
|
+
*
|
|
1168
|
+
* [`Features::TEXTURE_COMPRESSION_BC`] must be enabled to use this texture format.
|
|
1169
|
+
*/
|
|
1170
|
+
CanvasGPUTextureFormatBc7RgbaUnormSrgb,
|
|
1171
|
+
/**
|
|
1172
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.
|
|
1173
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1174
|
+
*
|
|
1175
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1176
|
+
*/
|
|
1177
|
+
CanvasGPUTextureFormatEtc2Rgb8Unorm,
|
|
1178
|
+
/**
|
|
1179
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB.
|
|
1180
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1181
|
+
*
|
|
1182
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1183
|
+
*/
|
|
1184
|
+
CanvasGPUTextureFormatEtc2Rgb8UnormSrgb,
|
|
1185
|
+
/**
|
|
1186
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.
|
|
1187
|
+
* [0, 255] ([0, 1] for alpha) converted to/from float [0, 1] in shader.
|
|
1188
|
+
*
|
|
1189
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1190
|
+
*/
|
|
1191
|
+
CanvasGPUTextureFormatEtc2Rgb8A1Unorm,
|
|
1192
|
+
/**
|
|
1193
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 8 bit integer RGB + 1 bit alpha.
|
|
1194
|
+
* Srgb-color [0, 255] ([0, 1] for alpha) converted to/from linear-color float [0, 1] in shader.
|
|
1195
|
+
*
|
|
1196
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1197
|
+
*/
|
|
1198
|
+
CanvasGPUTextureFormatEtc2Rgb8A1UnormSrgb,
|
|
1199
|
+
/**
|
|
1200
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.
|
|
1201
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1202
|
+
*
|
|
1203
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1204
|
+
*/
|
|
1205
|
+
CanvasGPUTextureFormatEtc2Rgba8Unorm,
|
|
1206
|
+
/**
|
|
1207
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 8 bit integer RGB + 8 bit alpha.
|
|
1208
|
+
* Srgb-color [0, 255] converted to/from linear-color float [0, 1] in shader.
|
|
1209
|
+
*
|
|
1210
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1211
|
+
*/
|
|
1212
|
+
CanvasGPUTextureFormatEtc2Rgba8UnormSrgb,
|
|
1213
|
+
/**
|
|
1214
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.
|
|
1215
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1216
|
+
*
|
|
1217
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1218
|
+
*/
|
|
1219
|
+
CanvasGPUTextureFormatEacR11Unorm,
|
|
1220
|
+
/**
|
|
1221
|
+
* 4x4 block compressed texture. 8 bytes per block (4 bit/px). Complex pallet. 11 bit integer R.
|
|
1222
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1223
|
+
*
|
|
1224
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1225
|
+
*/
|
|
1226
|
+
CanvasGPUTextureFormatEacR11Snorm,
|
|
1227
|
+
/**
|
|
1228
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.
|
|
1229
|
+
* [0, 255] converted to/from float [0, 1] in shader.
|
|
1230
|
+
*
|
|
1231
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1232
|
+
*/
|
|
1233
|
+
CanvasGPUTextureFormatEacRg11Unorm,
|
|
1234
|
+
/**
|
|
1235
|
+
* 4x4 block compressed texture. 16 bytes per block (8 bit/px). Complex pallet. 11 bit integer R + 11 bit integer G.
|
|
1236
|
+
* [-127, 127] converted to/from float [-1, 1] in shader.
|
|
1237
|
+
*
|
|
1238
|
+
* [`Features::TEXTURE_COMPRESSION_ETC2`] must be enabled to use this texture format.
|
|
1239
|
+
*/
|
|
1240
|
+
CanvasGPUTextureFormatEacRg11Snorm,
|
|
1241
|
+
/**
|
|
1242
|
+
* block compressed texture. 16 bytes per block.
|
|
1243
|
+
*
|
|
1244
|
+
* Features [`TEXTURE_COMPRESSION_ASTC`] or [`TEXTURE_COMPRESSION_ASTC_HDR`]
|
|
1245
|
+
* must be enabled to use this texture format.
|
|
1246
|
+
*
|
|
1247
|
+
* [`TEXTURE_COMPRESSION_ASTC`]: Features::TEXTURE_COMPRESSION_ASTC
|
|
1248
|
+
* [`TEXTURE_COMPRESSION_ASTC_HDR`]: Features::TEXTURE_COMPRESSION_ASTC_HDR
|
|
1249
|
+
*/
|
|
1250
|
+
CanvasGPUTextureFormatAstc,
|
|
1251
|
+
} CanvasGPUTextureFormat_Tag;
|
|
1252
|
+
|
|
1253
|
+
typedef struct CanvasGPUTextureFormatAstc_Body {
|
|
1254
|
+
/**
|
|
1255
|
+
* compressed block dimensions
|
|
1256
|
+
*/
|
|
1257
|
+
enum CanvasAstcBlock block;
|
|
1258
|
+
/**
|
|
1259
|
+
* ASTC RGBA channel
|
|
1260
|
+
*/
|
|
1261
|
+
enum CanvasAstcChannel channel;
|
|
1262
|
+
} CanvasGPUTextureFormatAstc_Body;
|
|
1263
|
+
|
|
1264
|
+
typedef struct CanvasGPUTextureFormat {
|
|
1265
|
+
CanvasGPUTextureFormat_Tag tag;
|
|
1266
|
+
union {
|
|
1267
|
+
CanvasGPUTextureFormatAstc_Body astc;
|
|
1268
|
+
};
|
|
1269
|
+
} CanvasGPUTextureFormat;
|
|
1270
|
+
|
|
1271
|
+
typedef enum CanvasOptionalGPUTextureFormat_Tag {
|
|
1272
|
+
CanvasOptionalGPUTextureFormatNone,
|
|
1273
|
+
CanvasOptionalGPUTextureFormatSome,
|
|
1274
|
+
} CanvasOptionalGPUTextureFormat_Tag;
|
|
1275
|
+
|
|
1276
|
+
typedef struct CanvasOptionalGPUTextureFormat {
|
|
1277
|
+
CanvasOptionalGPUTextureFormat_Tag tag;
|
|
1278
|
+
union {
|
|
1279
|
+
struct {
|
|
1280
|
+
struct CanvasGPUTextureFormat some;
|
|
1281
|
+
};
|
|
1282
|
+
};
|
|
1283
|
+
} CanvasOptionalGPUTextureFormat;
|
|
1284
|
+
|
|
1285
|
+
typedef struct CanvasGPURequestAdapterOptions {
|
|
1286
|
+
enum CanvasGPUPowerPreference power_preference;
|
|
1287
|
+
bool force_fallback_adapter;
|
|
1288
|
+
} CanvasGPURequestAdapterOptions;
|
|
1289
|
+
|
|
1290
|
+
typedef struct CanvasGPUSupportedLimits {
|
|
1291
|
+
uint32_t max_texture_dimension_1d;
|
|
1292
|
+
uint32_t max_texture_dimension_2d;
|
|
1293
|
+
uint32_t max_texture_dimension_3d;
|
|
1294
|
+
uint32_t max_texture_array_layers;
|
|
1295
|
+
uint32_t max_bind_groups;
|
|
1296
|
+
uint32_t max_bindings_per_bind_group;
|
|
1297
|
+
uint32_t max_dynamic_uniform_buffers_per_pipeline_layout;
|
|
1298
|
+
uint32_t max_dynamic_storage_buffers_per_pipeline_layout;
|
|
1299
|
+
uint32_t max_sampled_textures_per_shader_stage;
|
|
1300
|
+
uint32_t max_samplers_per_shader_stage;
|
|
1301
|
+
uint32_t max_storage_buffers_per_shader_stage;
|
|
1302
|
+
uint32_t max_storage_textures_per_shader_stage;
|
|
1303
|
+
uint32_t max_uniform_buffers_per_shader_stage;
|
|
1304
|
+
uint32_t max_uniform_buffer_binding_size;
|
|
1305
|
+
uint32_t max_storage_buffer_binding_size;
|
|
1306
|
+
uint32_t max_vertex_buffers;
|
|
1307
|
+
uint64_t max_buffer_size;
|
|
1308
|
+
uint32_t max_vertex_attributes;
|
|
1309
|
+
uint32_t max_vertex_buffer_array_stride;
|
|
1310
|
+
uint32_t min_uniform_buffer_offset_alignment;
|
|
1311
|
+
uint32_t min_storage_buffer_offset_alignment;
|
|
1312
|
+
uint32_t max_inter_stage_shader_components;
|
|
1313
|
+
uint32_t max_color_attachments;
|
|
1314
|
+
uint32_t max_color_attachment_bytes_per_sample;
|
|
1315
|
+
uint32_t max_compute_workgroup_storage_size;
|
|
1316
|
+
uint32_t max_compute_invocations_per_workgroup;
|
|
1317
|
+
uint32_t max_compute_workgroup_size_x;
|
|
1318
|
+
uint32_t max_compute_workgroup_size_y;
|
|
1319
|
+
uint32_t max_compute_workgroup_size_z;
|
|
1320
|
+
uint32_t max_compute_workgroups_per_dimension;
|
|
1321
|
+
uint32_t min_subgroup_size;
|
|
1322
|
+
uint32_t max_subgroup_size;
|
|
1323
|
+
uint32_t max_push_constant_size;
|
|
1324
|
+
uint32_t max_non_sampler_bindings;
|
|
1325
|
+
} CanvasGPUSupportedLimits;
|
|
1326
|
+
|
|
1327
|
+
typedef struct CanvasExtent3d {
|
|
1328
|
+
/**
|
|
1329
|
+
* Width of the extent
|
|
1330
|
+
*/
|
|
1331
|
+
uint32_t width;
|
|
1332
|
+
/**
|
|
1333
|
+
* Height of the extent
|
|
1334
|
+
*/
|
|
1335
|
+
uint32_t height;
|
|
1336
|
+
/**
|
|
1337
|
+
* The depth of the extent or the number of array layers
|
|
1338
|
+
*/
|
|
1339
|
+
uint32_t depth_or_array_layers;
|
|
1340
|
+
} CanvasExtent3d;
|
|
1341
|
+
|
|
1342
|
+
typedef struct CanvasGPUSurfaceConfiguration {
|
|
1343
|
+
enum CanvasGPUSurfaceAlphaMode alphaMode;
|
|
1344
|
+
uint32_t usage;
|
|
1345
|
+
enum CanvasGPUPresentMode presentMode;
|
|
1346
|
+
const struct CanvasGPUTextureFormat *view_formats;
|
|
1347
|
+
uintptr_t view_formats_size;
|
|
1348
|
+
const struct CanvasExtent3d *size;
|
|
1349
|
+
struct CanvasOptionalGPUTextureFormat format;
|
|
1350
|
+
} CanvasGPUSurfaceConfiguration;
|
|
1351
|
+
|
|
1352
|
+
typedef struct CanvasSurfaceCapabilities {
|
|
1353
|
+
const struct StringBuffer *formats;
|
|
1354
|
+
const struct StringBuffer *present_modes;
|
|
1355
|
+
const struct StringBuffer *alpha_modes;
|
|
1356
|
+
uint32_t usages;
|
|
1357
|
+
} CanvasSurfaceCapabilities;
|
|
1358
|
+
|
|
1359
|
+
typedef struct CanvasColor {
|
|
1360
|
+
double r;
|
|
1361
|
+
double g;
|
|
1362
|
+
double b;
|
|
1363
|
+
double a;
|
|
1364
|
+
} CanvasColor;
|
|
1365
|
+
#define CanvasColor_TRANSPARENT (CanvasColor){ .r = 0.0, .g = 0.0, .b = 0.0, .a = 0.0 }
|
|
1366
|
+
#define CanvasColor_BLACK (CanvasColor){ .r = 0.0, .g = 0.0, .b = 0.0, .a = 1.0 }
|
|
1367
|
+
#define CanvasColor_WHITE (CanvasColor){ .r = 1.0, .g = 1.0, .b = 1.0, .a = 1.0 }
|
|
1368
|
+
#define CanvasColor_RED (CanvasColor){ .r = 1.0, .g = 0.0, .b = 0.0, .a = 1.0 }
|
|
1369
|
+
#define CanvasColor_GREEN (CanvasColor){ .r = 0.0, .g = 1.0, .b = 0.0, .a = 1.0 }
|
|
1370
|
+
#define CanvasColor_BLUE (CanvasColor){ .r = 0.0, .g = 0.0, .b = 1.0, .a = 1.0 }
|
|
1371
|
+
|
|
1372
|
+
typedef struct CanvasPassChannelColor {
|
|
1373
|
+
enum CanvasLoadOp load_op;
|
|
1374
|
+
enum CanvasStoreOp store_op;
|
|
1375
|
+
struct CanvasColor clear_value;
|
|
1376
|
+
bool read_only;
|
|
1377
|
+
} CanvasPassChannelColor;
|
|
1378
|
+
|
|
1379
|
+
typedef struct CanvasRenderPassColorAttachment {
|
|
1380
|
+
const struct CanvasGPUTextureView *view;
|
|
1381
|
+
const struct CanvasGPUTextureView *resolve_target;
|
|
1382
|
+
struct CanvasPassChannelColor channel;
|
|
1383
|
+
} CanvasRenderPassColorAttachment;
|
|
1384
|
+
|
|
1385
|
+
typedef enum CanvasOptionalLoadOp_Tag {
|
|
1386
|
+
CanvasOptionalLoadOpNone,
|
|
1387
|
+
CanvasOptionalLoadOpSome,
|
|
1388
|
+
} CanvasOptionalLoadOp_Tag;
|
|
1389
|
+
|
|
1390
|
+
typedef struct CanvasOptionalLoadOp {
|
|
1391
|
+
CanvasOptionalLoadOp_Tag tag;
|
|
1392
|
+
union {
|
|
1393
|
+
struct {
|
|
1394
|
+
enum CanvasLoadOp some;
|
|
1395
|
+
};
|
|
1396
|
+
};
|
|
1397
|
+
} CanvasOptionalLoadOp;
|
|
1398
|
+
|
|
1399
|
+
typedef enum CanvasOptionalStoreOp_Tag {
|
|
1400
|
+
CanvasOptionalStoreOpNone,
|
|
1401
|
+
CanvasOptionalStoreOpSome,
|
|
1402
|
+
} CanvasOptionalStoreOp_Tag;
|
|
1403
|
+
|
|
1404
|
+
typedef struct CanvasOptionalStoreOp {
|
|
1405
|
+
CanvasOptionalStoreOp_Tag tag;
|
|
1406
|
+
union {
|
|
1407
|
+
struct {
|
|
1408
|
+
enum CanvasStoreOp some;
|
|
1409
|
+
};
|
|
1410
|
+
};
|
|
1411
|
+
} CanvasOptionalStoreOp;
|
|
1412
|
+
|
|
1413
|
+
typedef struct CanvasRenderPassDepthStencilAttachment {
|
|
1414
|
+
const struct CanvasGPUTextureView *view;
|
|
1415
|
+
float depth_clear_value;
|
|
1416
|
+
struct CanvasOptionalLoadOp depth_load_op;
|
|
1417
|
+
struct CanvasOptionalStoreOp depth_store_op;
|
|
1418
|
+
bool depth_read_only;
|
|
1419
|
+
uint32_t stencil_clear_value;
|
|
1420
|
+
struct CanvasOptionalLoadOp stencil_load_op;
|
|
1421
|
+
struct CanvasOptionalStoreOp stencil_store_op;
|
|
1422
|
+
bool stencil_read_only;
|
|
1423
|
+
} CanvasRenderPassDepthStencilAttachment;
|
|
1424
|
+
|
|
1425
|
+
typedef struct CanvasImageCopyBuffer {
|
|
1426
|
+
const struct CanvasGPUBuffer *buffer;
|
|
1427
|
+
uint64_t offset;
|
|
1428
|
+
int32_t bytes_per_row;
|
|
1429
|
+
int32_t rows_per_image;
|
|
1430
|
+
} CanvasImageCopyBuffer;
|
|
1431
|
+
|
|
1432
|
+
typedef struct CanvasOrigin3d {
|
|
1433
|
+
/**
|
|
1434
|
+
* X position of the origin
|
|
1435
|
+
*/
|
|
1436
|
+
uint32_t x;
|
|
1437
|
+
/**
|
|
1438
|
+
* Y position of the origin
|
|
1439
|
+
*/
|
|
1440
|
+
uint32_t y;
|
|
1441
|
+
/**
|
|
1442
|
+
* Z position of the origin
|
|
1443
|
+
*/
|
|
1444
|
+
uint32_t z;
|
|
1445
|
+
} CanvasOrigin3d;
|
|
1446
|
+
|
|
1447
|
+
typedef struct CanvasImageCopyTexture {
|
|
1448
|
+
const struct CanvasGPUTexture *texture;
|
|
1449
|
+
uint32_t mip_level;
|
|
1450
|
+
struct CanvasOrigin3d origin;
|
|
1451
|
+
enum CanvasTextureAspect aspect;
|
|
1452
|
+
} CanvasImageCopyTexture;
|
|
1453
|
+
|
|
1454
|
+
typedef struct CanvasBufferBindingLayout {
|
|
1455
|
+
enum CanvasBufferBindingType type_;
|
|
1456
|
+
bool has_dynamic_offset;
|
|
1457
|
+
int64_t min_binding_size;
|
|
1458
|
+
} CanvasBufferBindingLayout;
|
|
1459
|
+
|
|
1460
|
+
typedef struct CanvasSamplerBindingLayout {
|
|
1461
|
+
enum CanvasSamplerBindingType type_;
|
|
1462
|
+
} CanvasSamplerBindingLayout;
|
|
1463
|
+
|
|
1464
|
+
typedef struct CanvasTextureBindingLayout {
|
|
1465
|
+
enum CanvasTextureSampleType sample_type;
|
|
1466
|
+
enum CanvasTextureViewDimension view_dimension;
|
|
1467
|
+
bool multisampled;
|
|
1468
|
+
} CanvasTextureBindingLayout;
|
|
1469
|
+
|
|
1470
|
+
typedef struct CanvasStorageTextureBindingLayout {
|
|
1471
|
+
enum CanvasStorageTextureAccess access;
|
|
1472
|
+
struct CanvasGPUTextureFormat format;
|
|
1473
|
+
enum CanvasTextureViewDimension view_dimension;
|
|
1474
|
+
} CanvasStorageTextureBindingLayout;
|
|
1475
|
+
|
|
1476
|
+
typedef enum CanvasBindingType_Tag {
|
|
1477
|
+
CanvasBindingTypeBuffer,
|
|
1478
|
+
CanvasBindingTypeSampler,
|
|
1479
|
+
CanvasBindingTypeTexture,
|
|
1480
|
+
CanvasBindingTypeStorageTexture,
|
|
1481
|
+
} CanvasBindingType_Tag;
|
|
1482
|
+
|
|
1483
|
+
typedef struct CanvasBindingType {
|
|
1484
|
+
CanvasBindingType_Tag tag;
|
|
1485
|
+
union {
|
|
1486
|
+
struct {
|
|
1487
|
+
struct CanvasBufferBindingLayout buffer;
|
|
1488
|
+
};
|
|
1489
|
+
struct {
|
|
1490
|
+
struct CanvasSamplerBindingLayout sampler;
|
|
1491
|
+
};
|
|
1492
|
+
struct {
|
|
1493
|
+
struct CanvasTextureBindingLayout texture;
|
|
1494
|
+
};
|
|
1495
|
+
struct {
|
|
1496
|
+
struct CanvasStorageTextureBindingLayout storage_texture;
|
|
1497
|
+
};
|
|
1498
|
+
};
|
|
1499
|
+
} CanvasBindingType;
|
|
1500
|
+
|
|
1501
|
+
typedef struct CanvasBindGroupLayoutEntry {
|
|
1502
|
+
uint32_t binding;
|
|
1503
|
+
uint32_t visibility;
|
|
1504
|
+
struct CanvasBindingType binding_type;
|
|
1505
|
+
} CanvasBindGroupLayoutEntry;
|
|
1506
|
+
|
|
1507
|
+
typedef struct CanvasBufferBinding {
|
|
1508
|
+
const struct CanvasGPUBuffer *buffer;
|
|
1509
|
+
int64_t offset;
|
|
1510
|
+
int64_t size;
|
|
1511
|
+
} CanvasBufferBinding;
|
|
1512
|
+
|
|
1513
|
+
typedef enum CanvasBindGroupEntryResource_Tag {
|
|
1514
|
+
CanvasBindGroupEntryResourceBuffer,
|
|
1515
|
+
CanvasBindGroupEntryResourceSampler,
|
|
1516
|
+
CanvasBindGroupEntryResourceTextureView,
|
|
1517
|
+
} CanvasBindGroupEntryResource_Tag;
|
|
1518
|
+
|
|
1519
|
+
typedef struct CanvasBindGroupEntryResource {
|
|
1520
|
+
CanvasBindGroupEntryResource_Tag tag;
|
|
1521
|
+
union {
|
|
1522
|
+
struct {
|
|
1523
|
+
struct CanvasBufferBinding buffer;
|
|
1524
|
+
};
|
|
1525
|
+
struct {
|
|
1526
|
+
const struct CanvasGPUSampler *sampler;
|
|
1527
|
+
};
|
|
1528
|
+
struct {
|
|
1529
|
+
const struct CanvasGPUTextureView *texture_view;
|
|
1530
|
+
};
|
|
1531
|
+
};
|
|
1532
|
+
} CanvasBindGroupEntryResource;
|
|
1533
|
+
|
|
1534
|
+
typedef struct CanvasBindGroupEntry {
|
|
1535
|
+
uint32_t binding;
|
|
1536
|
+
struct CanvasBindGroupEntryResource resource;
|
|
1537
|
+
} CanvasBindGroupEntry;
|
|
1538
|
+
|
|
1539
|
+
typedef enum CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag {
|
|
1540
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutModeLayout,
|
|
1541
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutModeAuto,
|
|
1542
|
+
} CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag;
|
|
1543
|
+
|
|
1544
|
+
typedef struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode {
|
|
1545
|
+
CanvasGPUPipelineLayoutOrGPUAutoLayoutMode_Tag tag;
|
|
1546
|
+
union {
|
|
1547
|
+
struct {
|
|
1548
|
+
const struct CanvasGPUPipelineLayout *layout;
|
|
1549
|
+
};
|
|
1550
|
+
struct {
|
|
1551
|
+
enum CanvasGPUAutoLayoutMode auto_;
|
|
1552
|
+
};
|
|
1553
|
+
};
|
|
1554
|
+
} CanvasGPUPipelineLayoutOrGPUAutoLayoutMode;
|
|
1555
|
+
|
|
1556
|
+
typedef struct CanvasProgrammableStage {
|
|
1557
|
+
const struct CanvasGPUShaderModule *module;
|
|
1558
|
+
const char *entry_point;
|
|
1559
|
+
const struct CanvasConstants *constants;
|
|
1560
|
+
} CanvasProgrammableStage;
|
|
1561
|
+
|
|
1562
|
+
typedef struct CanvasCreateRenderBundleEncoderDescriptor {
|
|
1563
|
+
const char *label;
|
|
1564
|
+
const struct CanvasGPUTextureFormat *color_formats;
|
|
1565
|
+
uintptr_t color_formats_size;
|
|
1566
|
+
struct CanvasOptionalGPUTextureFormat depth_stencil_format;
|
|
1567
|
+
uint32_t sample_count;
|
|
1568
|
+
bool depth_read_only;
|
|
1569
|
+
bool stencil_read_only;
|
|
1570
|
+
} CanvasCreateRenderBundleEncoderDescriptor;
|
|
1571
|
+
|
|
1572
|
+
typedef struct CanvasVertexAttribute {
|
|
1573
|
+
enum CanvasVertexFormat format;
|
|
1574
|
+
uint64_t offset;
|
|
1575
|
+
uint32_t shader_location;
|
|
1576
|
+
} CanvasVertexAttribute;
|
|
1577
|
+
|
|
1578
|
+
typedef struct CanvasVertexBufferLayout {
|
|
1579
|
+
uint64_t array_stride;
|
|
1580
|
+
enum CanvasVertexStepMode step_mode;
|
|
1581
|
+
const struct CanvasVertexAttribute *attributes;
|
|
1582
|
+
uintptr_t attributes_size;
|
|
1583
|
+
} CanvasVertexBufferLayout;
|
|
1584
|
+
|
|
1585
|
+
typedef struct CanvasVertexState {
|
|
1586
|
+
const struct CanvasGPUShaderModule *module;
|
|
1587
|
+
const char *entry_point;
|
|
1588
|
+
const struct CanvasConstants *constants;
|
|
1589
|
+
const struct CanvasVertexBufferLayout *buffers;
|
|
1590
|
+
uintptr_t buffers_size;
|
|
1591
|
+
} CanvasVertexState;
|
|
1592
|
+
|
|
1593
|
+
typedef enum CanvasOptionalIndexFormat_Tag {
|
|
1594
|
+
CanvasOptionalIndexFormatNone,
|
|
1595
|
+
CanvasOptionalIndexFormatSome,
|
|
1596
|
+
} CanvasOptionalIndexFormat_Tag;
|
|
1597
|
+
|
|
1598
|
+
typedef struct CanvasOptionalIndexFormat {
|
|
1599
|
+
CanvasOptionalIndexFormat_Tag tag;
|
|
1600
|
+
union {
|
|
1601
|
+
struct {
|
|
1602
|
+
enum CanvasIndexFormat some;
|
|
1603
|
+
};
|
|
1604
|
+
};
|
|
1605
|
+
} CanvasOptionalIndexFormat;
|
|
1606
|
+
|
|
1607
|
+
typedef struct CanvasPrimitiveState {
|
|
1608
|
+
enum CanvasPrimitiveTopology topology;
|
|
1609
|
+
struct CanvasOptionalIndexFormat strip_index_format;
|
|
1610
|
+
enum CanvasFrontFace front_face;
|
|
1611
|
+
enum CanvasCullMode cull_mode;
|
|
1612
|
+
bool unclipped_depth;
|
|
1613
|
+
} CanvasPrimitiveState;
|
|
1614
|
+
|
|
1615
|
+
typedef struct CanvasStencilFaceState {
|
|
1616
|
+
enum CanvasCompareFunction compare;
|
|
1617
|
+
enum CanvasStencilOperation fail_op;
|
|
1618
|
+
enum CanvasStencilOperation depth_fail_op;
|
|
1619
|
+
enum CanvasStencilOperation pass_op;
|
|
1620
|
+
} CanvasStencilFaceState;
|
|
1621
|
+
/**
|
|
1622
|
+
* Ignore the stencil state for the face.
|
|
1623
|
+
*/
|
|
1624
|
+
#define CanvasStencilFaceState_IGNORE (CanvasStencilFaceState){ .compare = CanvasCompareFunction_Always, .fail_op = CanvasStencilOperation_Keep, .depth_fail_op = CanvasStencilOperation_Keep, .pass_op = CanvasStencilOperation_Keep }
|
|
1625
|
+
|
|
1626
|
+
typedef struct CanvasDepthStencilState {
|
|
1627
|
+
struct CanvasGPUTextureFormat format;
|
|
1628
|
+
bool depth_write_enabled;
|
|
1629
|
+
enum CanvasCompareFunction depth_compare;
|
|
1630
|
+
struct CanvasStencilFaceState stencil_front;
|
|
1631
|
+
struct CanvasStencilFaceState stencil_back;
|
|
1632
|
+
uint32_t stencil_read_mask;
|
|
1633
|
+
uint32_t stencil_write_mask;
|
|
1634
|
+
int32_t depth_bias;
|
|
1635
|
+
float depth_bias_slope_scale;
|
|
1636
|
+
float depth_bias_clamp;
|
|
1637
|
+
} CanvasDepthStencilState;
|
|
1638
|
+
|
|
1639
|
+
typedef struct CanvasMultisampleState {
|
|
1640
|
+
uint32_t count;
|
|
1641
|
+
uint64_t mask;
|
|
1642
|
+
bool alpha_to_coverage_enabled;
|
|
1643
|
+
} CanvasMultisampleState;
|
|
1644
|
+
|
|
1645
|
+
typedef struct CanvasBlendComponent {
|
|
1646
|
+
enum CanvasBlendFactor src_factor;
|
|
1647
|
+
enum CanvasBlendFactor dst_factor;
|
|
1648
|
+
enum CanvasBlendOperation operation;
|
|
1649
|
+
} CanvasBlendComponent;
|
|
1650
|
+
/**
|
|
1651
|
+
* Default blending state that replaces destination with the source.
|
|
1652
|
+
*/
|
|
1653
|
+
#define CanvasBlendComponent_REPLACE (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_One, .dst_factor = CanvasBlendFactor_Zero, .operation = CanvasBlendOperation_Add }
|
|
1654
|
+
/**
|
|
1655
|
+
* Blend state of (1 * src) + ((1 - src_alpha) * dst)
|
|
1656
|
+
*/
|
|
1657
|
+
#define CanvasBlendComponent_OVER (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_One, .dst_factor = CanvasBlendFactor_OneMinusSrcAlpha, .operation = CanvasBlendOperation_Add }
|
|
1658
|
+
|
|
1659
|
+
typedef struct CanvasBlendState {
|
|
1660
|
+
/**
|
|
1661
|
+
* Color equation.
|
|
1662
|
+
*/
|
|
1663
|
+
struct CanvasBlendComponent color;
|
|
1664
|
+
/**
|
|
1665
|
+
* Alpha equation.
|
|
1666
|
+
*/
|
|
1667
|
+
struct CanvasBlendComponent alpha;
|
|
1668
|
+
} CanvasBlendState;
|
|
1669
|
+
/**
|
|
1670
|
+
* Blend mode that does no color blending, just overwrites the output with the contents of the shader.
|
|
1671
|
+
*/
|
|
1672
|
+
#define CanvasBlendState_REPLACE (CanvasBlendState){ .color = CanvasBlendComponent_REPLACE, .alpha = CanvasBlendComponent_REPLACE }
|
|
1673
|
+
/**
|
|
1674
|
+
* Blend mode that does standard alpha blending with non-premultiplied alpha.
|
|
1675
|
+
*/
|
|
1676
|
+
#define CanvasBlendState_ALPHA_BLENDING (CanvasBlendState){ .color = (CanvasBlendComponent){ .src_factor = CanvasBlendFactor_SrcAlpha, .dst_factor = CanvasBlendFactor_OneMinusSrcAlpha, .operation = CanvasBlendOperation_Add }, .alpha = CanvasBlendComponent_OVER }
|
|
1677
|
+
/**
|
|
1678
|
+
* Blend mode that does standard alpha blending with premultiplied alpha.
|
|
1679
|
+
*/
|
|
1680
|
+
#define CanvasBlendState_PREMULTIPLIED_ALPHA_BLENDING (CanvasBlendState){ .color = CanvasBlendComponent_OVER, .alpha = CanvasBlendComponent_OVER }
|
|
1681
|
+
|
|
1682
|
+
typedef enum CanvasOptionalBlendState_Tag {
|
|
1683
|
+
CanvasOptionalBlendStateNone,
|
|
1684
|
+
CanvasOptionalBlendStateSome,
|
|
1685
|
+
} CanvasOptionalBlendState_Tag;
|
|
1686
|
+
|
|
1687
|
+
typedef struct CanvasOptionalBlendState {
|
|
1688
|
+
CanvasOptionalBlendState_Tag tag;
|
|
1689
|
+
union {
|
|
1690
|
+
struct {
|
|
1691
|
+
struct CanvasBlendState some;
|
|
1692
|
+
};
|
|
1693
|
+
};
|
|
1694
|
+
} CanvasOptionalBlendState;
|
|
1695
|
+
|
|
1696
|
+
typedef struct CanvasColorTargetState {
|
|
1697
|
+
struct CanvasGPUTextureFormat format;
|
|
1698
|
+
struct CanvasOptionalBlendState blend;
|
|
1699
|
+
uint32_t write_mask;
|
|
1700
|
+
} CanvasColorTargetState;
|
|
1701
|
+
|
|
1702
|
+
typedef struct CanvasFragmentState {
|
|
1703
|
+
const struct CanvasColorTargetState *targets;
|
|
1704
|
+
uintptr_t targets_size;
|
|
1705
|
+
const struct CanvasGPUShaderModule *module;
|
|
1706
|
+
const char *entry_point;
|
|
1707
|
+
const struct CanvasConstants *constants;
|
|
1708
|
+
} CanvasFragmentState;
|
|
1709
|
+
|
|
1710
|
+
typedef struct CanvasCreateRenderPipelineDescriptor {
|
|
1711
|
+
const char *label;
|
|
1712
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout;
|
|
1713
|
+
const struct CanvasVertexState *vertex;
|
|
1714
|
+
const struct CanvasPrimitiveState *primitive;
|
|
1715
|
+
const struct CanvasDepthStencilState *depth_stencil;
|
|
1716
|
+
const struct CanvasMultisampleState *multisample;
|
|
1717
|
+
const struct CanvasFragmentState *fragment;
|
|
1718
|
+
} CanvasCreateRenderPipelineDescriptor;
|
|
1719
|
+
|
|
1720
|
+
typedef struct CanvasCreateTextureDescriptor {
|
|
1721
|
+
const char *label;
|
|
1722
|
+
enum CanvasTextureDimension dimension;
|
|
1723
|
+
struct CanvasGPUTextureFormat format;
|
|
1724
|
+
uint32_t mipLevelCount;
|
|
1725
|
+
uint32_t sampleCount;
|
|
1726
|
+
uint32_t width;
|
|
1727
|
+
uint32_t height;
|
|
1728
|
+
uint32_t depthOrArrayLayers;
|
|
1729
|
+
uint32_t usage;
|
|
1730
|
+
const struct CanvasGPUTextureFormat *view_formats;
|
|
1731
|
+
uintptr_t view_formats_size;
|
|
1732
|
+
} CanvasCreateTextureDescriptor;
|
|
1733
|
+
|
|
1734
|
+
typedef enum CanvasOptionalCompareFunction_Tag {
|
|
1735
|
+
CanvasOptionalCompareFunctionNone,
|
|
1736
|
+
CanvasOptionalCompareFunctionSome,
|
|
1737
|
+
} CanvasOptionalCompareFunction_Tag;
|
|
1738
|
+
|
|
1739
|
+
typedef struct CanvasOptionalCompareFunction {
|
|
1740
|
+
CanvasOptionalCompareFunction_Tag tag;
|
|
1741
|
+
union {
|
|
1742
|
+
struct {
|
|
1743
|
+
enum CanvasCompareFunction some;
|
|
1744
|
+
};
|
|
1745
|
+
};
|
|
1746
|
+
} CanvasOptionalCompareFunction;
|
|
1747
|
+
|
|
1748
|
+
typedef struct CanvasCreateSamplerDescriptor {
|
|
1749
|
+
const char *label;
|
|
1750
|
+
enum CanvasAddressMode address_mode_u;
|
|
1751
|
+
enum CanvasAddressMode address_mode_v;
|
|
1752
|
+
enum CanvasAddressMode address_mode_w;
|
|
1753
|
+
enum CanvasFilterMode mag_filter;
|
|
1754
|
+
enum CanvasFilterMode min_filter;
|
|
1755
|
+
enum CanvasFilterMode mipmap_filter;
|
|
1756
|
+
float lod_min_clamp;
|
|
1757
|
+
float lod_max_clamp;
|
|
1758
|
+
struct CanvasOptionalCompareFunction compare;
|
|
1759
|
+
uint16_t max_anisotropy;
|
|
1760
|
+
} CanvasCreateSamplerDescriptor;
|
|
1761
|
+
|
|
1762
|
+
typedef struct CanvasOrigin2d {
|
|
1763
|
+
/**
|
|
1764
|
+
*
|
|
1765
|
+
*/
|
|
1766
|
+
uint32_t x;
|
|
1767
|
+
/**
|
|
1768
|
+
*
|
|
1769
|
+
*/
|
|
1770
|
+
uint32_t y;
|
|
1771
|
+
} CanvasOrigin2d;
|
|
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
|
+
|
|
1842
|
+
typedef struct CanvasImageCopyExternalImage {
|
|
1843
|
+
/**
|
|
1844
|
+
* The texture to be copied from. The copy source data is captured at the moment
|
|
1845
|
+
* the copy is issued.
|
|
1846
|
+
*/
|
|
1847
|
+
const uint8_t *source;
|
|
1848
|
+
uintptr_t source_size;
|
|
1849
|
+
/**
|
|
1850
|
+
* The base texel used for copying from the external image. Together
|
|
1851
|
+
* with the `copy_size` argument to copy functions, defines the
|
|
1852
|
+
* sub-region of the image to copy.
|
|
1853
|
+
*
|
|
1854
|
+
* Relative to the top left of the image.
|
|
1855
|
+
*
|
|
1856
|
+
* Must be [`Origin2d::ZERO`] if [`DownlevelFlags::UNRESTRICTED_EXTERNAL_TEXTURE_COPIES`] is not supported.
|
|
1857
|
+
*/
|
|
1858
|
+
struct CanvasOrigin2d origin;
|
|
1859
|
+
/**
|
|
1860
|
+
* If the Y coordinate of the image should be flipped. Even if this is
|
|
1861
|
+
* true, `origin` is still relative to the top left.
|
|
1862
|
+
*/
|
|
1863
|
+
bool flip_y;
|
|
1864
|
+
uint32_t width;
|
|
1865
|
+
uint32_t height;
|
|
1866
|
+
} CanvasImageCopyExternalImage;
|
|
1867
|
+
|
|
1868
|
+
typedef struct CanvasImageDataLayout {
|
|
1869
|
+
uint64_t offset;
|
|
1870
|
+
int32_t bytes_per_row;
|
|
1871
|
+
int32_t rows_per_image;
|
|
1872
|
+
} CanvasImageDataLayout;
|
|
1873
|
+
|
|
1874
|
+
typedef struct CanvasImageSubresourceRange {
|
|
1875
|
+
enum CanvasTextureAspect aspect;
|
|
1876
|
+
uint32_t base_mip_level;
|
|
1877
|
+
int32_t mip_level_count;
|
|
1878
|
+
uint32_t base_array_layer;
|
|
1879
|
+
int32_t array_layer_count;
|
|
1880
|
+
} CanvasImageSubresourceRange;
|
|
1881
|
+
|
|
1882
|
+
typedef struct CanvasCreateTextureViewDescriptor {
|
|
1883
|
+
const char *label;
|
|
1884
|
+
struct CanvasOptionalGPUTextureFormat format;
|
|
1885
|
+
enum CanvasOptionalTextureViewDimension dimension;
|
|
1886
|
+
const struct CanvasImageSubresourceRange *range;
|
|
1887
|
+
} CanvasCreateTextureViewDescriptor;
|
|
1888
|
+
|
|
1889
|
+
typedef struct FileHelperMime {
|
|
1890
|
+
const char *mime_type;
|
|
1891
|
+
const char *extension;
|
|
1892
|
+
} FileHelperMime;
|
|
1893
|
+
|
|
1894
|
+
void canvas_native_font_clear(void);
|
|
214
1895
|
|
|
215
1896
|
void canvas_native_font_add_family(const char *alias,
|
|
216
1897
|
const char *const *filenames,
|
|
217
1898
|
uintptr_t length);
|
|
218
1899
|
|
|
219
|
-
void
|
|
1900
|
+
void canvas_native_font_add_family_with_bytes(const char *alias,
|
|
1901
|
+
const uint8_t *bytes,
|
|
1902
|
+
uintptr_t length);
|
|
220
1903
|
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
bool canvas_native_helper_read_file_has_error(const struct FileHelper *file);
|
|
224
|
-
|
|
225
|
-
struct U8Buffer *canvas_native_helper_read_file_get_data(struct FileHelper *file);
|
|
226
|
-
|
|
227
|
-
const char *canvas_native_helper_read_file_get_error(const struct FileHelper *file);
|
|
228
|
-
|
|
229
|
-
void canvas_native_text_encoder_destroy(struct TextEncoder *value);
|
|
1904
|
+
void canvas_native_context_2d_test(int64_t context);
|
|
230
1905
|
|
|
231
|
-
void
|
|
1906
|
+
void canvas_native_context_2d_path_test(int64_t context);
|
|
232
1907
|
|
|
233
|
-
void
|
|
1908
|
+
void canvas_native_context_2d_conic_test(int64_t context);
|
|
234
1909
|
|
|
235
|
-
void
|
|
236
|
-
|
|
237
|
-
void canvas_native_text_metrics_destroy(struct TextMetrics *value);
|
|
1910
|
+
void canvas_native_context_release(struct CanvasRenderingContext2D *value);
|
|
238
1911
|
|
|
239
1912
|
#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS))
|
|
240
1913
|
struct Raf *canvas_native_raf_create(intptr_t callback, void (*on_frame_callback)(intptr_t callback,
|
|
@@ -242,7 +1915,7 @@ struct Raf *canvas_native_raf_create(intptr_t callback, void (*on_frame_callback
|
|
|
242
1915
|
#endif
|
|
243
1916
|
|
|
244
1917
|
#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS))
|
|
245
|
-
void
|
|
1918
|
+
void canvas_native_raf_release(struct Raf *value);
|
|
246
1919
|
#endif
|
|
247
1920
|
|
|
248
1921
|
#if (defined(TARGET_OS_ANDROID) || defined(TARGET_OS_IOS))
|
|
@@ -257,9 +1930,6 @@ void canvas_native_raf_stop(struct Raf *raf);
|
|
|
257
1930
|
bool canvas_native_raf_get_started(const struct Raf *raf);
|
|
258
1931
|
#endif
|
|
259
1932
|
|
|
260
|
-
struct CanvasRenderingContext2D *canvas_native_context_create_with_wrapper(int64_t context,
|
|
261
|
-
int64_t gl_context);
|
|
262
|
-
|
|
263
1933
|
void canvas_native_context_resize(struct CanvasRenderingContext2D *context,
|
|
264
1934
|
float width,
|
|
265
1935
|
float height);
|
|
@@ -272,11 +1942,10 @@ struct CanvasRenderingContext2D *canvas_native_context_create(float width,
|
|
|
272
1942
|
float ppi,
|
|
273
1943
|
uint32_t direction);
|
|
274
1944
|
|
|
275
|
-
struct CanvasRenderingContext2D *canvas_native_context_create_gl(
|
|
1945
|
+
struct CanvasRenderingContext2D *canvas_native_context_create_gl(void *view,
|
|
1946
|
+
float width,
|
|
276
1947
|
float height,
|
|
277
1948
|
float density,
|
|
278
|
-
int64_t gl_context,
|
|
279
|
-
int32_t samples,
|
|
280
1949
|
bool alpha,
|
|
281
1950
|
int32_t font_color,
|
|
282
1951
|
float ppi,
|
|
@@ -310,7 +1979,7 @@ const char *canvas_native_context_get_word_spacing(const struct CanvasRenderingC
|
|
|
310
1979
|
void canvas_native_context_set_word_spacing(struct CanvasRenderingContext2D *context,
|
|
311
1980
|
const char *spacing);
|
|
312
1981
|
|
|
313
|
-
float canvas_native_context_get_global_alpha(
|
|
1982
|
+
float canvas_native_context_get_global_alpha(struct CanvasRenderingContext2D *context);
|
|
314
1983
|
|
|
315
1984
|
void canvas_native_context_set_global_alpha(struct CanvasRenderingContext2D *context, float alpha);
|
|
316
1985
|
|
|
@@ -416,7 +2085,7 @@ const char *canvas_native_paint_style_get_color_string(const struct PaintStyle *
|
|
|
416
2085
|
|
|
417
2086
|
const char *canvas_native_paint_style_get_current_stroke_color_string(const struct CanvasRenderingContext2D *context);
|
|
418
2087
|
|
|
419
|
-
struct U8Buffer *canvas_native_paint_style_get_current_stroke_color_buf(
|
|
2088
|
+
struct U8Buffer *canvas_native_paint_style_get_current_stroke_color_buf(struct CanvasRenderingContext2D *context);
|
|
420
2089
|
|
|
421
2090
|
void canvas_native_paint_style_get_current_stroke_color_r_g_b_a(const struct CanvasRenderingContext2D *context,
|
|
422
2091
|
uint8_t *r,
|
|
@@ -432,13 +2101,13 @@ void canvas_native_paint_style_get_current_fill_color_r_g_b_a(const struct Canva
|
|
|
432
2101
|
|
|
433
2102
|
const char *canvas_native_paint_style_get_current_fill_color_string(const struct CanvasRenderingContext2D *context);
|
|
434
2103
|
|
|
435
|
-
struct U8Buffer *canvas_native_paint_style_get_current_fill_color_buf(struct CanvasRenderingContext2D *context);
|
|
2104
|
+
struct U8Buffer *canvas_native_paint_style_get_current_fill_color_buf(const struct CanvasRenderingContext2D *context);
|
|
436
2105
|
|
|
437
2106
|
enum PaintStyleType canvas_native_context_get_style_type(const struct PaintStyle *style);
|
|
438
2107
|
|
|
439
|
-
enum PaintStyleType canvas_native_context_get_current_fill_style_type(struct CanvasRenderingContext2D *context);
|
|
2108
|
+
enum PaintStyleType canvas_native_context_get_current_fill_style_type(const struct CanvasRenderingContext2D *context);
|
|
440
2109
|
|
|
441
|
-
enum PaintStyleType canvas_native_context_get_current_stroke_style_type(struct CanvasRenderingContext2D *context);
|
|
2110
|
+
enum PaintStyleType canvas_native_context_get_current_stroke_style_type(const struct CanvasRenderingContext2D *context);
|
|
442
2111
|
|
|
443
2112
|
struct PaintStyle *canvas_native_context_get_fill_style(const struct CanvasRenderingContext2D *context);
|
|
444
2113
|
|
|
@@ -496,18 +2165,12 @@ void canvas_native_context_clear_rect(struct CanvasRenderingContext2D *context,
|
|
|
496
2165
|
float width,
|
|
497
2166
|
float height);
|
|
498
2167
|
|
|
499
|
-
void canvas_native_context_clip_str(struct CanvasRenderingContext2D *context,
|
|
500
|
-
struct Path *path,
|
|
501
|
-
const char *rule);
|
|
502
|
-
|
|
503
|
-
void canvas_native_context_clip_rule_str(struct CanvasRenderingContext2D *context,
|
|
504
|
-
const char *rule);
|
|
505
|
-
|
|
506
2168
|
void canvas_native_context_clip(struct CanvasRenderingContext2D *context,
|
|
507
2169
|
struct Path *path,
|
|
508
|
-
|
|
2170
|
+
enum CanvasFillRule rule);
|
|
509
2171
|
|
|
510
|
-
void canvas_native_context_clip_rule(struct CanvasRenderingContext2D *context,
|
|
2172
|
+
void canvas_native_context_clip_rule(struct CanvasRenderingContext2D *context,
|
|
2173
|
+
enum CanvasFillRule rule);
|
|
511
2174
|
|
|
512
2175
|
void canvas_native_context_close_path(struct CanvasRenderingContext2D *context);
|
|
513
2176
|
|
|
@@ -518,36 +2181,36 @@ struct ImageData *canvas_native_context_create_image_data_with_data(int32_t widt
|
|
|
518
2181
|
const uint8_t *data,
|
|
519
2182
|
uintptr_t size);
|
|
520
2183
|
|
|
521
|
-
struct PaintStyle *canvas_native_context_create_linear_gradient(struct CanvasRenderingContext2D *context,
|
|
2184
|
+
struct PaintStyle *canvas_native_context_create_linear_gradient(const struct CanvasRenderingContext2D *context,
|
|
522
2185
|
float x0,
|
|
523
2186
|
float y0,
|
|
524
2187
|
float x1,
|
|
525
2188
|
float y1);
|
|
526
2189
|
|
|
527
|
-
struct PaintStyle *canvas_native_context_create_conic_gradient(struct CanvasRenderingContext2D *context,
|
|
2190
|
+
struct PaintStyle *canvas_native_context_create_conic_gradient(const struct CanvasRenderingContext2D *context,
|
|
528
2191
|
float start_angle,
|
|
529
2192
|
float x,
|
|
530
2193
|
float y);
|
|
531
2194
|
|
|
532
|
-
struct PaintStyle *canvas_native_context_create_pattern(struct CanvasRenderingContext2D *context,
|
|
2195
|
+
struct PaintStyle *canvas_native_context_create_pattern(const struct CanvasRenderingContext2D *context,
|
|
533
2196
|
const uint8_t *data,
|
|
534
2197
|
uintptr_t size,
|
|
535
2198
|
int32_t width,
|
|
536
2199
|
int32_t height,
|
|
537
|
-
|
|
2200
|
+
enum CanvasRepetition repetition);
|
|
538
2201
|
|
|
539
2202
|
struct PaintStyle *canvas_native_context_create_pattern_asset(struct CanvasRenderingContext2D *context,
|
|
540
|
-
struct ImageAsset *asset,
|
|
541
|
-
|
|
2203
|
+
const struct ImageAsset *asset,
|
|
2204
|
+
enum CanvasRepetition repetition);
|
|
542
2205
|
|
|
543
2206
|
struct PaintStyle *canvas_native_context_create_pattern_encoded(struct CanvasRenderingContext2D *context,
|
|
544
2207
|
const uint8_t *data,
|
|
545
2208
|
uintptr_t size,
|
|
546
|
-
|
|
2209
|
+
enum CanvasRepetition repetition);
|
|
547
2210
|
|
|
548
2211
|
struct PaintStyle *canvas_native_context_create_pattern_canvas2d(struct CanvasRenderingContext2D *source,
|
|
549
2212
|
struct CanvasRenderingContext2D *context,
|
|
550
|
-
|
|
2213
|
+
enum CanvasRepetition repetition);
|
|
551
2214
|
|
|
552
2215
|
struct PaintStyle *canvas_native_context_create_radial_gradient(struct CanvasRenderingContext2D *context,
|
|
553
2216
|
float x0,
|
|
@@ -625,19 +2288,19 @@ void canvas_native_context_draw_image_encoded(struct CanvasRenderingContext2D *c
|
|
|
625
2288
|
float d_height);
|
|
626
2289
|
|
|
627
2290
|
void canvas_native_context_draw_image_dx_dy_asset(struct CanvasRenderingContext2D *context,
|
|
628
|
-
struct ImageAsset *asset,
|
|
2291
|
+
const struct ImageAsset *asset,
|
|
629
2292
|
float dx,
|
|
630
2293
|
float dy);
|
|
631
2294
|
|
|
632
2295
|
void canvas_native_context_draw_image_dx_dy_dw_dh_asset(struct CanvasRenderingContext2D *context,
|
|
633
|
-
struct ImageAsset *asset,
|
|
2296
|
+
const struct ImageAsset *asset,
|
|
634
2297
|
float dx,
|
|
635
2298
|
float dy,
|
|
636
2299
|
float d_width,
|
|
637
2300
|
float d_height);
|
|
638
2301
|
|
|
639
2302
|
void canvas_native_context_draw_image_asset(struct CanvasRenderingContext2D *context,
|
|
640
|
-
struct ImageAsset *asset,
|
|
2303
|
+
const struct ImageAsset *asset,
|
|
641
2304
|
float sx,
|
|
642
2305
|
float sy,
|
|
643
2306
|
float s_width,
|
|
@@ -670,6 +2333,29 @@ void canvas_native_context_draw_image_context(struct CanvasRenderingContext2D *c
|
|
|
670
2333
|
float d_width,
|
|
671
2334
|
float d_height);
|
|
672
2335
|
|
|
2336
|
+
void canvas_native_context_draw_image_dx_dy_webgl(struct CanvasRenderingContext2D *context,
|
|
2337
|
+
struct WebGLState *source,
|
|
2338
|
+
float dx,
|
|
2339
|
+
float dy);
|
|
2340
|
+
|
|
2341
|
+
void canvas_native_context_draw_image_dx_dy_dw_dh_webgl(struct CanvasRenderingContext2D *context,
|
|
2342
|
+
struct WebGLState *source,
|
|
2343
|
+
float dx,
|
|
2344
|
+
float dy,
|
|
2345
|
+
float d_width,
|
|
2346
|
+
float d_height);
|
|
2347
|
+
|
|
2348
|
+
void canvas_native_context_draw_image_webgl(struct CanvasRenderingContext2D *context,
|
|
2349
|
+
struct WebGLState *source,
|
|
2350
|
+
float sx,
|
|
2351
|
+
float sy,
|
|
2352
|
+
float s_width,
|
|
2353
|
+
float s_height,
|
|
2354
|
+
float dx,
|
|
2355
|
+
float dy,
|
|
2356
|
+
float d_width,
|
|
2357
|
+
float d_height);
|
|
2358
|
+
|
|
673
2359
|
void canvas_native_context_draw_atlas(struct CanvasRenderingContext2D *context,
|
|
674
2360
|
const uint8_t *data,
|
|
675
2361
|
uintptr_t size,
|
|
@@ -695,7 +2381,7 @@ void canvas_native_context_draw_atlas_encoded(struct CanvasRenderingContext2D *c
|
|
|
695
2381
|
int32_t blend_mode);
|
|
696
2382
|
|
|
697
2383
|
void canvas_native_context_draw_atlas_asset(struct CanvasRenderingContext2D *context,
|
|
698
|
-
struct ImageAsset *asset,
|
|
2384
|
+
const struct ImageAsset *asset,
|
|
699
2385
|
const float *xform,
|
|
700
2386
|
uintptr_t xform_size,
|
|
701
2387
|
const float *tex,
|
|
@@ -714,17 +2400,11 @@ void canvas_native_context_ellipse(struct CanvasRenderingContext2D *context,
|
|
|
714
2400
|
float end_angle,
|
|
715
2401
|
bool anticlockwise);
|
|
716
2402
|
|
|
717
|
-
void
|
|
718
|
-
|
|
719
|
-
void canvas_native_context_fill_with_path_str(struct CanvasRenderingContext2D *context,
|
|
720
|
-
struct Path *path,
|
|
721
|
-
const char *rule);
|
|
722
|
-
|
|
723
|
-
void canvas_native_context_fill(struct CanvasRenderingContext2D *context, uint32_t rule);
|
|
2403
|
+
void canvas_native_context_fill(struct CanvasRenderingContext2D *context, enum CanvasFillRule rule);
|
|
724
2404
|
|
|
725
2405
|
void canvas_native_context_fill_with_path(struct CanvasRenderingContext2D *context,
|
|
726
2406
|
struct Path *path,
|
|
727
|
-
|
|
2407
|
+
enum CanvasFillRule rule);
|
|
728
2408
|
|
|
729
2409
|
void canvas_native_context_fill_rect(struct CanvasRenderingContext2D *context,
|
|
730
2410
|
float x,
|
|
@@ -760,24 +2440,24 @@ struct Matrix *canvas_native_context_get_transform(struct CanvasRenderingContext
|
|
|
760
2440
|
bool canvas_native_context_is_point_in_path_str(struct CanvasRenderingContext2D *context,
|
|
761
2441
|
float x,
|
|
762
2442
|
float y,
|
|
763
|
-
|
|
2443
|
+
enum CanvasFillRule rule);
|
|
764
2444
|
|
|
765
2445
|
bool canvas_native_context_is_point_in_path_with_path_str(struct CanvasRenderingContext2D *context,
|
|
766
2446
|
struct Path *path,
|
|
767
2447
|
float x,
|
|
768
2448
|
float y,
|
|
769
|
-
|
|
2449
|
+
enum CanvasFillRule rule);
|
|
770
2450
|
|
|
771
2451
|
bool canvas_native_context_is_point_in_path(struct CanvasRenderingContext2D *context,
|
|
772
2452
|
float x,
|
|
773
2453
|
float y,
|
|
774
|
-
|
|
2454
|
+
enum CanvasFillRule rule);
|
|
775
2455
|
|
|
776
2456
|
bool canvas_native_context_is_point_in_path_with_path(struct CanvasRenderingContext2D *context,
|
|
777
2457
|
struct Path *path,
|
|
778
2458
|
float x,
|
|
779
2459
|
float y,
|
|
780
|
-
|
|
2460
|
+
enum CanvasFillRule rule);
|
|
781
2461
|
|
|
782
2462
|
bool canvas_native_context_is_point_in_stroke(struct CanvasRenderingContext2D *context,
|
|
783
2463
|
float x,
|
|
@@ -796,7 +2476,7 @@ struct TextMetrics *canvas_native_context_measure_text(struct CanvasRenderingCon
|
|
|
796
2476
|
void canvas_native_context_move_to(struct CanvasRenderingContext2D *context, float x, float y);
|
|
797
2477
|
|
|
798
2478
|
void canvas_native_context_put_image_data(struct CanvasRenderingContext2D *context,
|
|
799
|
-
struct ImageData *image_data,
|
|
2479
|
+
const struct ImageData *image_data,
|
|
800
2480
|
float dx,
|
|
801
2481
|
float dy,
|
|
802
2482
|
float dirty_x,
|
|
@@ -853,7 +2533,7 @@ void canvas_native_context_set_transform(struct CanvasRenderingContext2D *contex
|
|
|
853
2533
|
float f);
|
|
854
2534
|
|
|
855
2535
|
void canvas_native_context_set_transform_matrix(struct CanvasRenderingContext2D *context,
|
|
856
|
-
struct Matrix *matrix);
|
|
2536
|
+
const struct Matrix *matrix);
|
|
857
2537
|
|
|
858
2538
|
void canvas_native_context_stroke(struct CanvasRenderingContext2D *context);
|
|
859
2539
|
|
|
@@ -895,40 +2575,44 @@ void canvas_native_context_translate(struct CanvasRenderingContext2D *context, f
|
|
|
895
2575
|
|
|
896
2576
|
void canvas_native_context_flush(struct CanvasRenderingContext2D *context);
|
|
897
2577
|
|
|
898
|
-
void canvas_native_context_render(
|
|
2578
|
+
void canvas_native_context_render(struct CanvasRenderingContext2D *context);
|
|
899
2579
|
|
|
900
2580
|
const char *canvas_native_to_data_url(struct CanvasRenderingContext2D *context,
|
|
901
2581
|
const char *format,
|
|
902
2582
|
uint32_t quality);
|
|
903
2583
|
|
|
904
|
-
|
|
905
|
-
|
|
906
|
-
|
|
907
|
-
|
|
908
|
-
|
|
909
|
-
|
|
910
|
-
|
|
911
|
-
|
|
912
|
-
|
|
913
|
-
|
|
914
|
-
|
|
915
|
-
|
|
916
|
-
|
|
917
|
-
|
|
918
|
-
|
|
919
|
-
|
|
920
|
-
|
|
921
|
-
|
|
922
|
-
|
|
923
|
-
|
|
924
|
-
|
|
925
|
-
|
|
926
|
-
|
|
927
|
-
|
|
928
|
-
|
|
929
|
-
|
|
930
|
-
|
|
931
|
-
|
|
2584
|
+
void canvas_native_image_filter_reference(const struct ImageFilter *value);
|
|
2585
|
+
|
|
2586
|
+
void canvas_native_image_filter_release(const struct ImageFilter *value);
|
|
2587
|
+
|
|
2588
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset(const struct ImageAsset *asset,
|
|
2589
|
+
bool flip_y,
|
|
2590
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2591
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2592
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2593
|
+
float resize_width,
|
|
2594
|
+
float resize_height);
|
|
2595
|
+
|
|
2596
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_asset_src_rect(const struct ImageAsset *asset,
|
|
2597
|
+
float sx,
|
|
2598
|
+
float sy,
|
|
2599
|
+
float s_width,
|
|
2600
|
+
float s_height,
|
|
2601
|
+
bool flip_y,
|
|
2602
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2603
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2604
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2605
|
+
float resize_width,
|
|
2606
|
+
float resize_height);
|
|
2607
|
+
|
|
2608
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes(const uint8_t *bytes,
|
|
2609
|
+
uintptr_t size,
|
|
2610
|
+
bool flip_y,
|
|
2611
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2612
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2613
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2614
|
+
float resize_width,
|
|
2615
|
+
float resize_height);
|
|
932
2616
|
|
|
933
2617
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint8_t *bytes,
|
|
934
2618
|
uintptr_t size,
|
|
@@ -938,20 +2622,20 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_with_output(const uint
|
|
|
938
2622
|
enum ImageBitmapResizeQuality resize_quality,
|
|
939
2623
|
float resize_width,
|
|
940
2624
|
float resize_height,
|
|
941
|
-
struct ImageAsset *output);
|
|
942
|
-
|
|
943
|
-
struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
944
|
-
|
|
945
|
-
|
|
946
|
-
|
|
947
|
-
|
|
948
|
-
|
|
949
|
-
|
|
950
|
-
|
|
951
|
-
|
|
952
|
-
|
|
953
|
-
|
|
954
|
-
|
|
2625
|
+
const struct ImageAsset *output);
|
|
2626
|
+
|
|
2627
|
+
const struct ImageAsset *canvas_native_image_bitmap_create_from_encoded_bytes_src_rect(const uint8_t *bytes,
|
|
2628
|
+
uintptr_t size,
|
|
2629
|
+
float sx,
|
|
2630
|
+
float sy,
|
|
2631
|
+
float s_width,
|
|
2632
|
+
float s_height,
|
|
2633
|
+
bool flip_y,
|
|
2634
|
+
enum ImageBitmapPremultiplyAlpha premultiply_alpha,
|
|
2635
|
+
enum ImageBitmapColorSpaceConversion color_space_conversion,
|
|
2636
|
+
enum ImageBitmapResizeQuality resize_quality,
|
|
2637
|
+
float resize_width,
|
|
2638
|
+
float resize_height);
|
|
955
2639
|
|
|
956
2640
|
bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(const uint8_t *bytes,
|
|
957
2641
|
uintptr_t size,
|
|
@@ -965,7 +2649,161 @@ bool canvas_native_image_bitmap_create_from_encoded_bytes_src_rect_with_output(c
|
|
|
965
2649
|
enum ImageBitmapResizeQuality resize_quality,
|
|
966
2650
|
float resize_width,
|
|
967
2651
|
float resize_height,
|
|
968
|
-
struct ImageAsset *output);
|
|
2652
|
+
const struct ImageAsset *output);
|
|
2653
|
+
|
|
2654
|
+
struct ImageData *canvas_native_image_data_create(int32_t width, int32_t height);
|
|
2655
|
+
|
|
2656
|
+
int32_t canvas_native_image_data_get_width(const struct ImageData *image_data);
|
|
2657
|
+
|
|
2658
|
+
int32_t canvas_native_image_data_get_height(const struct ImageData *image_data);
|
|
2659
|
+
|
|
2660
|
+
uintptr_t canvas_native_image_data_get_length(const struct ImageData *image_data);
|
|
2661
|
+
|
|
2662
|
+
struct U8Buffer *canvas_native_image_data_get_data(const struct ImageData *image_data);
|
|
2663
|
+
|
|
2664
|
+
void canvas_native_image_data_release(struct ImageData *value);
|
|
2665
|
+
|
|
2666
|
+
struct Matrix *canvas_native_matrix_create(void);
|
|
2667
|
+
|
|
2668
|
+
void canvas_native_matrix_update(struct Matrix *matrix, const float *slice, uintptr_t size);
|
|
2669
|
+
|
|
2670
|
+
void canvas_native_matrix_update_3d(struct Matrix *matrix, const float *slice, uintptr_t size);
|
|
2671
|
+
|
|
2672
|
+
float canvas_native_matrix_get_a(const struct Matrix *matrix);
|
|
2673
|
+
|
|
2674
|
+
void canvas_native_matrix_set_a(struct Matrix *matrix, float a);
|
|
2675
|
+
|
|
2676
|
+
float canvas_native_matrix_get_b(const struct Matrix *matrix);
|
|
2677
|
+
|
|
2678
|
+
void canvas_native_matrix_set_b(struct Matrix *matrix, float b);
|
|
2679
|
+
|
|
2680
|
+
float canvas_native_matrix_get_c(const struct Matrix *matrix);
|
|
2681
|
+
|
|
2682
|
+
void canvas_native_matrix_set_c(struct Matrix *matrix, float c);
|
|
2683
|
+
|
|
2684
|
+
float canvas_native_matrix_get_d(const struct Matrix *matrix);
|
|
2685
|
+
|
|
2686
|
+
void canvas_native_matrix_set_d(struct Matrix *matrix, float d);
|
|
2687
|
+
|
|
2688
|
+
float canvas_native_matrix_get_e(const struct Matrix *matrix);
|
|
2689
|
+
|
|
2690
|
+
void canvas_native_matrix_set_e(struct Matrix *matrix, float e);
|
|
2691
|
+
|
|
2692
|
+
float canvas_native_matrix_get_f(const struct Matrix *matrix);
|
|
2693
|
+
|
|
2694
|
+
void canvas_native_matrix_set_f(struct Matrix *matrix, float f);
|
|
2695
|
+
|
|
2696
|
+
float canvas_native_matrix_get_m11(const struct Matrix *matrix);
|
|
2697
|
+
|
|
2698
|
+
void canvas_native_matrix_set_m11(struct Matrix *matrix, float m11);
|
|
2699
|
+
|
|
2700
|
+
float canvas_native_matrix_get_m12(const struct Matrix *matrix);
|
|
2701
|
+
|
|
2702
|
+
void canvas_native_matrix_set_m12(struct Matrix *matrix, float m12);
|
|
2703
|
+
|
|
2704
|
+
float canvas_native_matrix_get_m13(const struct Matrix *matrix);
|
|
2705
|
+
|
|
2706
|
+
void canvas_native_matrix_set_m13(struct Matrix *matrix, float m13);
|
|
2707
|
+
|
|
2708
|
+
float canvas_native_matrix_get_m14(const struct Matrix *matrix);
|
|
2709
|
+
|
|
2710
|
+
void canvas_native_matrix_set_m14(struct Matrix *matrix, float m14);
|
|
2711
|
+
|
|
2712
|
+
float canvas_native_matrix_get_m21(const struct Matrix *matrix);
|
|
2713
|
+
|
|
2714
|
+
void canvas_native_matrix_set_m21(struct Matrix *matrix, float m21);
|
|
2715
|
+
|
|
2716
|
+
float canvas_native_matrix_get_m22(struct Matrix *matrix);
|
|
2717
|
+
|
|
2718
|
+
void canvas_native_matrix_set_m22(struct Matrix *matrix, float m22);
|
|
2719
|
+
|
|
2720
|
+
float canvas_native_matrix_get_m23(const struct Matrix *matrix);
|
|
2721
|
+
|
|
2722
|
+
void canvas_native_matrix_set_m23(struct Matrix *matrix, float m23);
|
|
2723
|
+
|
|
2724
|
+
float canvas_native_matrix_get_m24(const struct Matrix *matrix);
|
|
2725
|
+
|
|
2726
|
+
void canvas_native_matrix_set_m24(struct Matrix *matrix, float m24);
|
|
2727
|
+
|
|
2728
|
+
float canvas_native_matrix_get_m31(const struct Matrix *matrix);
|
|
2729
|
+
|
|
2730
|
+
void canvas_native_matrix_set_m31(struct Matrix *matrix, float m31);
|
|
2731
|
+
|
|
2732
|
+
float canvas_native_matrix_get_m32(const struct Matrix *matrix);
|
|
2733
|
+
|
|
2734
|
+
void canvas_native_matrix_set_m32(struct Matrix *matrix, float m32);
|
|
2735
|
+
|
|
2736
|
+
float canvas_native_matrix_get_m33(const struct Matrix *matrix);
|
|
2737
|
+
|
|
2738
|
+
void canvas_native_matrix_set_m33(struct Matrix *matrix, float m33);
|
|
2739
|
+
|
|
2740
|
+
float canvas_native_matrix_get_m34(const struct Matrix *matrix);
|
|
2741
|
+
|
|
2742
|
+
void canvas_native_matrix_set_m34(struct Matrix *matrix, float m34);
|
|
2743
|
+
|
|
2744
|
+
float canvas_native_matrix_get_m41(const struct Matrix *matrix);
|
|
2745
|
+
|
|
2746
|
+
void canvas_native_matrix_set_m41(struct Matrix *matrix, float m41);
|
|
2747
|
+
|
|
2748
|
+
float canvas_native_matrix_get_m42(const struct Matrix *matrix);
|
|
2749
|
+
|
|
2750
|
+
void canvas_native_matrix_set_m42(struct Matrix *matrix, float m42);
|
|
2751
|
+
|
|
2752
|
+
float canvas_native_matrix_get_m43(const struct Matrix *matrix);
|
|
2753
|
+
|
|
2754
|
+
void canvas_native_matrix_set_m43(struct Matrix *matrix, float m43);
|
|
2755
|
+
|
|
2756
|
+
float canvas_native_matrix_get_m44(const struct Matrix *matrix);
|
|
2757
|
+
|
|
2758
|
+
void canvas_native_matrix_set_m44(struct Matrix *matrix, float m44);
|
|
2759
|
+
|
|
2760
|
+
struct Matrix *canvas_native_matrix_translate(float x, float y, const struct Matrix *matrix);
|
|
2761
|
+
|
|
2762
|
+
void canvas_native_matrix_translate_self(struct Matrix *matrix, float x, float y);
|
|
2763
|
+
|
|
2764
|
+
void canvas_native_matrix_multiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
2765
|
+
|
|
2766
|
+
void canvas_native_matrix_premultiply_self(struct Matrix *matrix, const struct Matrix *value);
|
|
2767
|
+
|
|
2768
|
+
struct Matrix *canvas_native_matrix_scale_non_uniform(float sx,
|
|
2769
|
+
float sy,
|
|
2770
|
+
const struct Matrix *matrix);
|
|
2771
|
+
|
|
2772
|
+
void canvas_native_matrix_scale_non_uniform_self(struct Matrix *matrix, float sx, float sy);
|
|
2773
|
+
|
|
2774
|
+
struct Matrix *canvas_native_matrix_rotate(float angle,
|
|
2775
|
+
float cx,
|
|
2776
|
+
float cy,
|
|
2777
|
+
const struct Matrix *matrix);
|
|
2778
|
+
|
|
2779
|
+
void canvas_native_matrix_rotate_self(struct Matrix *matrix, float angle, float cx, float cy);
|
|
2780
|
+
|
|
2781
|
+
struct Matrix *canvas_native_matrix_skew_x(float angle, const struct Matrix *matrix);
|
|
2782
|
+
|
|
2783
|
+
void canvas_native_matrix_skew_x_self(struct Matrix *matrix, float angle);
|
|
2784
|
+
|
|
2785
|
+
struct Matrix *canvas_native_matrix_skew_y(float angle, const struct Matrix *matrix);
|
|
2786
|
+
|
|
2787
|
+
void canvas_native_matrix_skew_y_self(struct Matrix *matrix, float angle);
|
|
2788
|
+
|
|
2789
|
+
struct Matrix *canvas_native_matrix_clone(const struct Matrix *matrix);
|
|
2790
|
+
|
|
2791
|
+
void canvas_native_matrix_release(struct Matrix *value);
|
|
2792
|
+
|
|
2793
|
+
void canvas_native_paint_style_release(struct PaintStyle *value);
|
|
2794
|
+
|
|
2795
|
+
struct PaintStyle *canvas_native_paint_style_from_bytes(const struct CanvasRenderingContext2D *context,
|
|
2796
|
+
int32_t repetition,
|
|
2797
|
+
int32_t width,
|
|
2798
|
+
int32_t height,
|
|
2799
|
+
const uint8_t *bytes,
|
|
2800
|
+
uintptr_t size);
|
|
2801
|
+
|
|
2802
|
+
struct PaintStyle *canvas_native_pattern_from_ptr(int64_t ptr);
|
|
2803
|
+
|
|
2804
|
+
void canvas_native_gradient_add_color_stop(struct PaintStyle *style, float stop, const char *color);
|
|
2805
|
+
|
|
2806
|
+
void canvas_native_pattern_set_transform(struct PaintStyle *pattern, const struct Matrix *matrix);
|
|
969
2807
|
|
|
970
2808
|
void canvas_native_path_trim(struct Path *path, float start, float end);
|
|
971
2809
|
|
|
@@ -997,225 +2835,889 @@ void canvas_native_path_quadratic_curve_to(struct Path *path,
|
|
|
997
2835
|
float x,
|
|
998
2836
|
float y);
|
|
999
2837
|
|
|
1000
|
-
void canvas_native_path_arc(struct Path *path,
|
|
1001
|
-
float x,
|
|
1002
|
-
float y,
|
|
1003
|
-
float radius,
|
|
1004
|
-
float start_angle,
|
|
1005
|
-
float end_angle,
|
|
1006
|
-
bool anti_clockwise);
|
|
2838
|
+
void canvas_native_path_arc(struct Path *path,
|
|
2839
|
+
float x,
|
|
2840
|
+
float y,
|
|
2841
|
+
float radius,
|
|
2842
|
+
float start_angle,
|
|
2843
|
+
float end_angle,
|
|
2844
|
+
bool anti_clockwise);
|
|
2845
|
+
|
|
2846
|
+
void canvas_native_path_arc_to(struct Path *path,
|
|
2847
|
+
float x1,
|
|
2848
|
+
float y1,
|
|
2849
|
+
float x2,
|
|
2850
|
+
float y2,
|
|
2851
|
+
float radius);
|
|
2852
|
+
|
|
2853
|
+
void canvas_native_path_ellipse(struct Path *path,
|
|
2854
|
+
float x,
|
|
2855
|
+
float y,
|
|
2856
|
+
float radius_x,
|
|
2857
|
+
float radius_y,
|
|
2858
|
+
float rotation,
|
|
2859
|
+
float start_angle,
|
|
2860
|
+
float end_angle,
|
|
2861
|
+
bool anticlockwise);
|
|
2862
|
+
|
|
2863
|
+
void canvas_native_path_rect(struct Path *path, float x, float y, float width, float height);
|
|
2864
|
+
|
|
2865
|
+
void canvas_native_path_round_rect(struct Path *path,
|
|
2866
|
+
float x,
|
|
2867
|
+
float y,
|
|
2868
|
+
float width,
|
|
2869
|
+
float height,
|
|
2870
|
+
const float *radii,
|
|
2871
|
+
uintptr_t size);
|
|
2872
|
+
|
|
2873
|
+
void canvas_native_path_round_rect_tl_tr_br_bl(struct Path *path,
|
|
2874
|
+
float x,
|
|
2875
|
+
float y,
|
|
2876
|
+
float width,
|
|
2877
|
+
float height,
|
|
2878
|
+
float top_left,
|
|
2879
|
+
float top_right,
|
|
2880
|
+
float bottom_right,
|
|
2881
|
+
float bottom_left);
|
|
2882
|
+
|
|
2883
|
+
const char *canvas_native_path_to_string(const struct Path *path);
|
|
2884
|
+
|
|
2885
|
+
void canvas_native_path_release(struct Path *value);
|
|
2886
|
+
|
|
2887
|
+
void canvas_native_string_destroy(char *value);
|
|
2888
|
+
|
|
2889
|
+
void canvas_native_ccow_release(struct CCow *cow);
|
|
2890
|
+
|
|
2891
|
+
const uint8_t *canvas_native_ccow_get_bytes(const struct CCow *cow);
|
|
2892
|
+
|
|
2893
|
+
uintptr_t canvas_native_ccow_get_length(const struct CCow *cow);
|
|
2894
|
+
|
|
2895
|
+
void canvas_native_text_metrics_release(struct TextMetrics *value);
|
|
2896
|
+
|
|
2897
|
+
float canvas_native_text_metrics_get_width(const struct TextMetrics *metrics);
|
|
2898
|
+
|
|
2899
|
+
float canvas_native_text_metrics_get_actual_bounding_box_left(const struct TextMetrics *metrics);
|
|
2900
|
+
|
|
2901
|
+
float canvas_native_text_metrics_get_actual_bounding_box_right(const struct TextMetrics *metrics);
|
|
2902
|
+
|
|
2903
|
+
float canvas_native_text_metrics_get_actual_bounding_box_ascent(const struct TextMetrics *metrics);
|
|
2904
|
+
|
|
2905
|
+
float canvas_native_text_metrics_get_actual_bounding_box_descent(const struct TextMetrics *metrics);
|
|
2906
|
+
|
|
2907
|
+
float canvas_native_text_metrics_get_font_bounding_box_ascent(const struct TextMetrics *metrics);
|
|
2908
|
+
|
|
2909
|
+
float canvas_native_text_metrics_get_font_bounding_box_descent(const struct TextMetrics *metrics);
|
|
2910
|
+
|
|
2911
|
+
float canvas_native_text_metrics_get_em_height_ascent(const struct TextMetrics *metrics);
|
|
2912
|
+
|
|
2913
|
+
float canvas_native_text_metrics_get_em_height_descent(const struct TextMetrics *metrics);
|
|
2914
|
+
|
|
2915
|
+
float canvas_native_text_metrics_get_hanging_baseline(const struct TextMetrics *metrics);
|
|
2916
|
+
|
|
2917
|
+
float canvas_native_text_metrics_get_alphabetic_baseline(const struct TextMetrics *metrics);
|
|
2918
|
+
|
|
2919
|
+
float canvas_native_text_metrics_get_ideographic_baseline(const struct TextMetrics *metrics);
|
|
2920
|
+
|
|
2921
|
+
char *canvas_native_webgpu_enum_gpu_texture_to_string(struct CanvasGPUTextureFormat value);
|
|
2922
|
+
|
|
2923
|
+
struct CanvasOptionalGPUTextureFormat canvas_native_webgpu_enum_string_to_gpu_texture(const char *format);
|
|
2924
|
+
|
|
2925
|
+
enum CanvasGPUErrorType canvas_native_webgpu_error_get_type(const struct CanvasGPUError *error);
|
|
2926
|
+
|
|
2927
|
+
char *canvas_native_webgpu_error_get_message(const struct CanvasGPUError *error);
|
|
2928
|
+
|
|
2929
|
+
const struct CanvasWebGPUInstance *canvas_native_webgpu_instance_create(void);
|
|
2930
|
+
|
|
2931
|
+
void canvas_native_webgpu_instance_release(const struct CanvasWebGPUInstance *instance);
|
|
2932
|
+
|
|
2933
|
+
int64_t canvas_native_webgpu_get_pointer_addr(const struct CanvasWebGPUInstance *instance);
|
|
2934
|
+
|
|
2935
|
+
void canvas_native_webgpu_request_adapter(const struct CanvasWebGPUInstance *instance,
|
|
2936
|
+
const struct CanvasGPURequestAdapterOptions *options,
|
|
2937
|
+
void (*callback)(const struct CanvasGPUAdapter*, void*),
|
|
2938
|
+
void *callback_data);
|
|
2939
|
+
|
|
2940
|
+
void canvas_native_webgpu_adapter_reference(const struct CanvasGPUAdapter *adapter);
|
|
2941
|
+
|
|
2942
|
+
void canvas_native_webgpu_adapter_release(const struct CanvasGPUAdapter *adapter);
|
|
2943
|
+
|
|
2944
|
+
struct StringBuffer *canvas_native_webgpu_adapter_get_features(const struct CanvasGPUAdapter *adapter);
|
|
2945
|
+
|
|
2946
|
+
bool canvas_native_webgpu_adapter_is_fallback_adapter(const struct CanvasGPUAdapter *adapter);
|
|
2947
|
+
|
|
2948
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_adapter_get_limits(const struct CanvasGPUAdapter *adapter);
|
|
2949
|
+
|
|
2950
|
+
const struct CanvasGPUAdapterInfo *canvas_native_webgpu_adapter_request_adapter_info(const struct CanvasGPUAdapter *adapter);
|
|
2951
|
+
|
|
2952
|
+
void canvas_native_webgpu_adapter_request_device(const struct CanvasGPUAdapter *adapter,
|
|
2953
|
+
const char *label,
|
|
2954
|
+
const char *const *required_features,
|
|
2955
|
+
uintptr_t required_features_length,
|
|
2956
|
+
const struct CanvasGPUSupportedLimits *required_limits,
|
|
2957
|
+
void (*callback)(char*,
|
|
2958
|
+
const struct CanvasGPUDevice*,
|
|
2959
|
+
void*),
|
|
2960
|
+
void *callback_data);
|
|
2961
|
+
|
|
2962
|
+
char *canvas_native_webgpu_adapter_info_vendor(const struct CanvasGPUAdapterInfo *info);
|
|
2963
|
+
|
|
2964
|
+
char *canvas_native_webgpu_adapter_info_architecture(const struct CanvasGPUAdapterInfo *_info);
|
|
2965
|
+
|
|
2966
|
+
char *canvas_native_webgpu_adapter_info_device(const struct CanvasGPUAdapterInfo *info);
|
|
2967
|
+
|
|
2968
|
+
char *canvas_native_webgpu_adapter_info_description(const struct CanvasGPUAdapterInfo *info);
|
|
2969
|
+
|
|
2970
|
+
void canvas_native_webgpu_adapter_info_reference(const struct CanvasGPUAdapterInfo *info);
|
|
2971
|
+
|
|
2972
|
+
void canvas_native_webgpu_adapter_info_release(const struct CanvasGPUAdapterInfo *info);
|
|
2973
|
+
|
|
2974
|
+
char *canvas_native_webgpu_bind_group_get_label(const struct CanvasGPUBindGroup *bind_group);
|
|
2975
|
+
|
|
2976
|
+
void canvas_native_webgpu_bind_group_reference(const struct CanvasGPUBindGroup *bind_group);
|
|
2977
|
+
|
|
2978
|
+
void canvas_native_webgpu_bind_group_release(const struct CanvasGPUBindGroup *bind_group);
|
|
2979
|
+
|
|
2980
|
+
char *canvas_native_webgpu_bind_group_layout_get_label(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2981
|
+
|
|
2982
|
+
void canvas_native_webgpu_bind_group_layout_reference(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2983
|
+
|
|
2984
|
+
void canvas_native_webgpu_bind_group_layout_release(const struct CanvasGPUBindGroupLayout *bind_group_layout);
|
|
2985
|
+
|
|
2986
|
+
char *canvas_native_webgpu_buffer_get_label(const struct CanvasGPUBuffer *buffer);
|
|
2987
|
+
|
|
2988
|
+
void canvas_native_webgpu_buffer_reference(const struct CanvasGPUBuffer *buffer);
|
|
2989
|
+
|
|
2990
|
+
void canvas_native_webgpu_buffer_release(const struct CanvasGPUBuffer *buffer);
|
|
2991
|
+
|
|
2992
|
+
uint32_t canvas_native_webgpu_buffer_usage(const struct CanvasGPUBuffer *buffer);
|
|
2993
|
+
|
|
2994
|
+
uint64_t canvas_native_webgpu_buffer_size(const struct CanvasGPUBuffer *buffer);
|
|
2995
|
+
|
|
2996
|
+
void *canvas_native_webgpu_buffer_get_mapped_range(const struct CanvasGPUBuffer *buffer,
|
|
2997
|
+
int64_t offset,
|
|
2998
|
+
int64_t size);
|
|
2999
|
+
|
|
3000
|
+
void canvas_native_webgpu_buffer_destroy(const struct CanvasGPUBuffer *buffer);
|
|
3001
|
+
|
|
3002
|
+
void canvas_native_webgpu_buffer_unmap(const struct CanvasGPUBuffer *buffer);
|
|
3003
|
+
|
|
3004
|
+
void canvas_native_webgpu_buffer_map_async(const struct CanvasGPUBuffer *buffer,
|
|
3005
|
+
enum GPUMapMode mode,
|
|
3006
|
+
int64_t offset,
|
|
3007
|
+
int64_t size,
|
|
3008
|
+
void (*callback)(enum CanvasGPUErrorType, char*, void*),
|
|
3009
|
+
void *callback_data);
|
|
3010
|
+
|
|
3011
|
+
char *canvas_native_webgpu_to_data_url(const struct CanvasGPUCanvasContext *context,
|
|
3012
|
+
const struct CanvasGPUDevice *device,
|
|
3013
|
+
const char *format,
|
|
3014
|
+
uint32_t quality);
|
|
3015
|
+
|
|
3016
|
+
char *canvas_native_webgpu_to_data_url_with_texture(const struct CanvasGPUCanvasContext *context,
|
|
3017
|
+
const struct CanvasGPUDevice *device,
|
|
3018
|
+
const struct CanvasGPUTexture *texture,
|
|
3019
|
+
const char *format,
|
|
3020
|
+
uint32_t quality);
|
|
3021
|
+
|
|
3022
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3023
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(struct CanvasWebGPUInstance *instance,
|
|
3024
|
+
void *window,
|
|
3025
|
+
uint32_t width,
|
|
3026
|
+
uint32_t height);
|
|
3027
|
+
#endif
|
|
3028
|
+
|
|
3029
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3030
|
+
void canvas_native_webgpu_context_resize(struct CanvasGPUCanvasContext *context,
|
|
3031
|
+
void *window,
|
|
3032
|
+
uint32_t width,
|
|
3033
|
+
uint32_t height);
|
|
3034
|
+
#endif
|
|
3035
|
+
|
|
3036
|
+
#if (defined(TARGET_OS_IOS) || defined(TARGET_OS_MACOS))
|
|
3037
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create(const struct CanvasWebGPUInstance *instance,
|
|
3038
|
+
void *view,
|
|
3039
|
+
uint32_t width,
|
|
3040
|
+
uint32_t height);
|
|
3041
|
+
#endif
|
|
3042
|
+
|
|
3043
|
+
#if defined(TARGET_OS_IOS)
|
|
3044
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_uiview(const struct CanvasWebGPUInstance *instance,
|
|
3045
|
+
void *view,
|
|
3046
|
+
uint32_t width,
|
|
3047
|
+
uint32_t height);
|
|
3048
|
+
#endif
|
|
3049
|
+
|
|
3050
|
+
#if defined(TARGET_OS_IOS)
|
|
3051
|
+
void canvas_native_webgpu_context_resize_uiview(const struct CanvasGPUCanvasContext *context,
|
|
3052
|
+
void *view,
|
|
3053
|
+
uint32_t width,
|
|
3054
|
+
uint32_t height);
|
|
3055
|
+
#endif
|
|
3056
|
+
|
|
3057
|
+
#if defined(TARGET_OS_MACOS)
|
|
3058
|
+
const struct CanvasGPUCanvasContext *canvas_native_webgpu_context_create_nsview(const struct CanvasWebGPUInstance *instance,
|
|
3059
|
+
void *view,
|
|
3060
|
+
uint32_t width,
|
|
3061
|
+
uint32_t height);
|
|
3062
|
+
#endif
|
|
3063
|
+
|
|
3064
|
+
#if defined(TARGET_OS_MACOS)
|
|
3065
|
+
void canvas_native_webgpu_context_resize_nsview(const struct CanvasGPUCanvasContext *context,
|
|
3066
|
+
void *view,
|
|
3067
|
+
uint32_t width,
|
|
3068
|
+
uint32_t height);
|
|
3069
|
+
#endif
|
|
3070
|
+
|
|
3071
|
+
void canvas_native_webgpu_context_configure(const struct CanvasGPUCanvasContext *context,
|
|
3072
|
+
const struct CanvasGPUDevice *device,
|
|
3073
|
+
const struct CanvasGPUSurfaceConfiguration *config);
|
|
3074
|
+
|
|
3075
|
+
void canvas_native_webgpu_context_unconfigure(const struct CanvasGPUCanvasContext *context);
|
|
3076
|
+
|
|
3077
|
+
const struct CanvasGPUTexture *canvas_native_webgpu_context_get_current_texture(const struct CanvasGPUCanvasContext *context);
|
|
3078
|
+
|
|
3079
|
+
void canvas_native_webgpu_context_present_surface(const struct CanvasGPUCanvasContext *context,
|
|
3080
|
+
const struct CanvasGPUTexture *texture);
|
|
3081
|
+
|
|
3082
|
+
struct CanvasSurfaceCapabilities *canvas_native_webgpu_context_get_capabilities(const struct CanvasGPUCanvasContext *context,
|
|
3083
|
+
const struct CanvasGPUAdapter *adapter);
|
|
3084
|
+
|
|
3085
|
+
void canvas_native_webgpu_context_reference(const struct CanvasGPUCanvasContext *context);
|
|
3086
|
+
|
|
3087
|
+
void canvas_native_webgpu_context_release(const struct CanvasGPUCanvasContext *context);
|
|
3088
|
+
|
|
3089
|
+
char *canvas_native_webgpu_command_buffer_get_label(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
3090
|
+
|
|
3091
|
+
void canvas_native_webgpu_command_buffer_reference(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
3092
|
+
|
|
3093
|
+
void canvas_native_webgpu_command_buffer_release(const struct CanvasGPUCommandBuffer *command_buffer);
|
|
3094
|
+
|
|
3095
|
+
char *canvas_native_webgpu_command_encoder_get_label(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
3096
|
+
|
|
3097
|
+
void canvas_native_webgpu_command_encoder_reference(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
3098
|
+
|
|
3099
|
+
void canvas_native_webgpu_command_encoder_release(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
3100
|
+
|
|
3101
|
+
const struct CanvasGPUComputePassEncoder *canvas_native_webgpu_command_encoder_begin_compute_pass(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3102
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
3103
|
+
const char *label,
|
|
3104
|
+
int32_t beginning_of_pass_write_index,
|
|
3105
|
+
int32_t end_of_pass_write_index);
|
|
3106
|
+
|
|
3107
|
+
const struct CanvasGPURenderPassEncoder *canvas_native_webgpu_command_encoder_begin_render_pass(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3108
|
+
const char *label,
|
|
3109
|
+
const struct CanvasRenderPassColorAttachment *color_attachments,
|
|
3110
|
+
uintptr_t color_attachments_size,
|
|
3111
|
+
const struct CanvasRenderPassDepthStencilAttachment *depth_stencil_attachment,
|
|
3112
|
+
const struct CanvasGPUQuerySet *occlusion_query_set,
|
|
3113
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
3114
|
+
int32_t beginning_of_pass_write_index,
|
|
3115
|
+
int32_t end_of_pass_write_index);
|
|
3116
|
+
|
|
3117
|
+
void canvas_native_webgpu_command_encoder_clear_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3118
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3119
|
+
int64_t offset,
|
|
3120
|
+
int64_t size);
|
|
3121
|
+
|
|
3122
|
+
void canvas_native_webgpu_command_encoder_copy_buffer_to_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3123
|
+
const struct CanvasGPUBuffer *src,
|
|
3124
|
+
int64_t src_offset,
|
|
3125
|
+
const struct CanvasGPUBuffer *dst,
|
|
3126
|
+
int64_t dst_offset,
|
|
3127
|
+
uint64_t size);
|
|
3128
|
+
|
|
3129
|
+
void canvas_native_webgpu_command_encoder_copy_buffer_to_texture(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3130
|
+
const struct CanvasImageCopyBuffer *src,
|
|
3131
|
+
const struct CanvasImageCopyTexture *dst,
|
|
3132
|
+
const struct CanvasExtent3d *copy_size);
|
|
3133
|
+
|
|
3134
|
+
void canvas_native_webgpu_command_encoder_copy_texture_to_buffer(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3135
|
+
const struct CanvasImageCopyTexture *src,
|
|
3136
|
+
const struct CanvasImageCopyBuffer *dst,
|
|
3137
|
+
const struct CanvasExtent3d *copy_size);
|
|
3138
|
+
|
|
3139
|
+
void canvas_native_webgpu_command_encoder_copy_texture_to_texture(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3140
|
+
const struct CanvasImageCopyTexture *src,
|
|
3141
|
+
const struct CanvasImageCopyTexture *dst,
|
|
3142
|
+
const struct CanvasExtent3d *copy_size);
|
|
3143
|
+
|
|
3144
|
+
const struct CanvasGPUCommandBuffer *canvas_native_webgpu_command_encoder_finish(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3145
|
+
const char *label);
|
|
3146
|
+
|
|
3147
|
+
void canvas_native_webgpu_command_encoder_insert_debug_marker(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3148
|
+
const char *label);
|
|
3149
|
+
|
|
3150
|
+
void canvas_native_webgpu_command_encoder_pop_debug_group(const struct CanvasGPUCommandEncoder *command_encoder);
|
|
3151
|
+
|
|
3152
|
+
void canvas_native_webgpu_command_encoder_push_debug_group(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3153
|
+
const char *label);
|
|
3154
|
+
|
|
3155
|
+
void canvas_native_webgpu_command_encoder_resolve_query_set(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3156
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
3157
|
+
uint32_t first_query,
|
|
3158
|
+
uint32_t query_count,
|
|
3159
|
+
const struct CanvasGPUBuffer *dst,
|
|
3160
|
+
uint64_t dst_offset);
|
|
3161
|
+
|
|
3162
|
+
void canvas_native_webgpu_command_encoder_write_timestamp(const struct CanvasGPUCommandEncoder *command_encoder,
|
|
3163
|
+
const struct CanvasGPUQuerySet *query_set,
|
|
3164
|
+
uint32_t query_index);
|
|
3165
|
+
|
|
3166
|
+
char *canvas_native_webgpu_compute_pass_encoder_get_label(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3167
|
+
|
|
3168
|
+
void canvas_native_webgpu_compute_pass_encoder_reference(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3169
|
+
|
|
3170
|
+
void canvas_native_webgpu_compute_pass_encoder_release(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3171
|
+
|
|
3172
|
+
void canvas_native_webgpu_compute_pass_encoder_dispatch_workgroups(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3173
|
+
uint32_t workgroup_count_x,
|
|
3174
|
+
uint32_t workgroup_count_y,
|
|
3175
|
+
uint32_t workgroup_count_z);
|
|
3176
|
+
|
|
3177
|
+
void canvas_native_webgpu_compute_pass_encoder_dispatch_workgroups_indirect(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3178
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3179
|
+
uintptr_t indirect_offset);
|
|
3180
|
+
|
|
3181
|
+
void canvas_native_webgpu_compute_pass_encoder_end(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3182
|
+
|
|
3183
|
+
void canvas_native_webgpu_compute_pass_encoder_insert_debug_marker(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3184
|
+
const char *label);
|
|
3185
|
+
|
|
3186
|
+
void canvas_native_webgpu_compute_pass_encoder_pop_debug_group(const struct CanvasGPUComputePassEncoder *compute_pass);
|
|
3187
|
+
|
|
3188
|
+
void canvas_native_webgpu_compute_pass_encoder_push_debug_group(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3189
|
+
const char *label);
|
|
3190
|
+
|
|
3191
|
+
void canvas_native_webgpu_compute_pass_encoder_set_bind_group(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3192
|
+
uint32_t index,
|
|
3193
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
3194
|
+
const uint32_t *dynamic_offsets,
|
|
3195
|
+
uintptr_t dynamic_offsets_size,
|
|
3196
|
+
uintptr_t dynamic_offsets_start,
|
|
3197
|
+
uintptr_t dynamic_offsets_length);
|
|
3198
|
+
|
|
3199
|
+
void canvas_native_webgpu_compute_pass_encoder_set_pipeline(const struct CanvasGPUComputePassEncoder *compute_pass,
|
|
3200
|
+
const struct CanvasGPUComputePipeline *pipeline);
|
|
3201
|
+
|
|
3202
|
+
char *canvas_native_webgpu_compute_pipeline_get_label(const struct CanvasGPUComputePipeline *pipeline);
|
|
3203
|
+
|
|
3204
|
+
void canvas_native_webgpu_compute_pipeline_reference(const struct CanvasGPUComputePipeline *pipeline);
|
|
3205
|
+
|
|
3206
|
+
void canvas_native_webgpu_compute_pipeline_release(const struct CanvasGPUComputePipeline *pipeline);
|
|
3207
|
+
|
|
3208
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_compute_pipeline_get_bind_group_layout(const struct CanvasGPUComputePipeline *pipeline,
|
|
3209
|
+
uint32_t index);
|
|
3210
|
+
|
|
3211
|
+
char *canvas_native_webgpu_device_get_label(const struct CanvasGPUDevice *device);
|
|
3212
|
+
|
|
3213
|
+
struct StringBuffer *canvas_native_webgpu_device_get_features(const struct CanvasGPUDevice *device);
|
|
3214
|
+
|
|
3215
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_device_get_limits(const struct CanvasGPUDevice *device);
|
|
3216
|
+
|
|
3217
|
+
const struct CanvasGPUQueue *canvas_native_webgpu_device_get_queue(const struct CanvasGPUDevice *device);
|
|
3218
|
+
|
|
3219
|
+
void canvas_native_webgpu_device_set_lost_callback(const struct CanvasGPUDevice *device,
|
|
3220
|
+
void (*callback)(int32_t, char*, void*),
|
|
3221
|
+
void *userdata);
|
|
3222
|
+
|
|
3223
|
+
void canvas_native_webgpu_device_pop_error_scope(const struct CanvasGPUDevice *device,
|
|
3224
|
+
void (*callback)(enum CanvasGPUErrorType,
|
|
3225
|
+
char*,
|
|
3226
|
+
void*),
|
|
3227
|
+
void *userdata);
|
|
3228
|
+
|
|
3229
|
+
void canvas_native_webgpu_device_push_error_scope(const struct CanvasGPUDevice *device,
|
|
3230
|
+
enum CanvasGPUErrorFilter filter);
|
|
3231
|
+
|
|
3232
|
+
void canvas_native_webgpu_device_set_uncaptured_error_callback(const struct CanvasGPUDevice *device,
|
|
3233
|
+
void (*callback)(enum CanvasGPUErrorType,
|
|
3234
|
+
char*,
|
|
3235
|
+
void*),
|
|
3236
|
+
void *userdata);
|
|
3237
|
+
|
|
3238
|
+
void canvas_native_webgpu_device_destroy(const struct CanvasGPUDevice *device);
|
|
3239
|
+
|
|
3240
|
+
void canvas_native_webgpu_device_reference(const struct CanvasGPUDevice *device);
|
|
3241
|
+
|
|
3242
|
+
void canvas_native_webgpu_device_release(const struct CanvasGPUDevice *device);
|
|
3243
|
+
|
|
3244
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_device_create_bind_group_layout(const struct CanvasGPUDevice *device,
|
|
3245
|
+
const char *label,
|
|
3246
|
+
const struct CanvasBindGroupLayoutEntry *entries,
|
|
3247
|
+
uintptr_t size);
|
|
3248
|
+
|
|
3249
|
+
const struct CanvasGPUBindGroup *canvas_native_webgpu_device_create_bind_group(const struct CanvasGPUDevice *device,
|
|
3250
|
+
const char *label,
|
|
3251
|
+
const struct CanvasGPUBindGroupLayout *layout,
|
|
3252
|
+
const struct CanvasBindGroupEntry *entries,
|
|
3253
|
+
uintptr_t size);
|
|
3254
|
+
|
|
3255
|
+
const struct CanvasGPUCommandEncoder *canvas_native_webgpu_device_create_command_encoder(const struct CanvasGPUDevice *device,
|
|
3256
|
+
const char *label);
|
|
3257
|
+
|
|
3258
|
+
const struct CanvasGPUComputePipeline *canvas_native_webgpu_device_create_compute_pipeline(const struct CanvasGPUDevice *device,
|
|
3259
|
+
const char *label,
|
|
3260
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout,
|
|
3261
|
+
const struct CanvasProgrammableStage *compute);
|
|
3262
|
+
|
|
3263
|
+
void canvas_native_webgpu_device_create_compute_pipeline_async(const struct CanvasGPUDevice *device,
|
|
3264
|
+
const char *label,
|
|
3265
|
+
struct CanvasGPUPipelineLayoutOrGPUAutoLayoutMode layout,
|
|
3266
|
+
const struct CanvasProgrammableStage *compute,
|
|
3267
|
+
void (*callback)(const struct CanvasGPUComputePipeline*,
|
|
3268
|
+
enum CanvasGPUErrorType,
|
|
3269
|
+
char*,
|
|
3270
|
+
void*),
|
|
3271
|
+
void *callback_data);
|
|
3272
|
+
|
|
3273
|
+
const struct CanvasGPUPipelineLayout *canvas_native_webgpu_device_create_pipeline_layout(const struct CanvasGPUDevice *device,
|
|
3274
|
+
const char *label,
|
|
3275
|
+
const struct CanvasGPUBindGroupLayout *const *group_layouts,
|
|
3276
|
+
uintptr_t size);
|
|
3277
|
+
|
|
3278
|
+
const struct CanvasGPUQuerySet *canvas_native_webgpu_device_create_query_set(const struct CanvasGPUDevice *device,
|
|
3279
|
+
const char *label,
|
|
3280
|
+
enum CanvasQueryType type_,
|
|
3281
|
+
uint32_t count);
|
|
3282
|
+
|
|
3283
|
+
const struct CanvasGPURenderBundleEncoder *canvas_native_webgpu_device_create_render_bundle_encoder(const struct CanvasGPUDevice *device,
|
|
3284
|
+
const struct CanvasCreateRenderBundleEncoderDescriptor *descriptor);
|
|
3285
|
+
|
|
3286
|
+
const struct CanvasGPUShaderModule *canvas_native_webgpu_device_create_shader_module(const struct CanvasGPUDevice *device,
|
|
3287
|
+
const char *label,
|
|
3288
|
+
const char *source);
|
|
3289
|
+
|
|
3290
|
+
const struct CanvasGPUBuffer *canvas_native_webgpu_device_create_buffer(const struct CanvasGPUDevice *device,
|
|
3291
|
+
const char *label,
|
|
3292
|
+
uint64_t size,
|
|
3293
|
+
uint32_t usage,
|
|
3294
|
+
bool mapped_at_creation);
|
|
3295
|
+
|
|
3296
|
+
struct CanvasConstants *canvas_native_webgpu_constants_create(void);
|
|
3297
|
+
|
|
3298
|
+
void canvas_native_webgpu_constants_insert(struct CanvasConstants *constants,
|
|
3299
|
+
const char *key,
|
|
3300
|
+
double value);
|
|
3301
|
+
|
|
3302
|
+
void canvas_native_webgpu_constants_destroy(struct CanvasConstants *constants);
|
|
3303
|
+
|
|
3304
|
+
const struct CanvasGPURenderPipeline *canvas_native_webgpu_device_create_render_pipeline(const struct CanvasGPUDevice *device,
|
|
3305
|
+
const struct CanvasCreateRenderPipelineDescriptor *descriptor);
|
|
3306
|
+
|
|
3307
|
+
void canvas_native_webgpu_device_create_render_pipeline_async(const struct CanvasGPUDevice *device,
|
|
3308
|
+
const struct CanvasCreateRenderPipelineDescriptor *descriptor,
|
|
3309
|
+
void (*callback)(const struct CanvasGPURenderPipeline*,
|
|
3310
|
+
enum CanvasGPUErrorType,
|
|
3311
|
+
char*,
|
|
3312
|
+
void*),
|
|
3313
|
+
void *callback_data);
|
|
3314
|
+
|
|
3315
|
+
const struct CanvasGPUTexture *canvas_native_webgpu_device_create_texture(const struct CanvasGPUDevice *device,
|
|
3316
|
+
const struct CanvasCreateTextureDescriptor *descriptor);
|
|
3317
|
+
|
|
3318
|
+
const struct CanvasGPUSampler *canvas_native_webgpu_device_create_sampler(const struct CanvasGPUDevice *device,
|
|
3319
|
+
const struct CanvasCreateSamplerDescriptor *descriptor);
|
|
3320
|
+
|
|
3321
|
+
char *canvas_native_webgpu_pipeline_layout_get_label(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
3322
|
+
|
|
3323
|
+
void canvas_native_webgpu_pipeline_layout_reference(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
3324
|
+
|
|
3325
|
+
void canvas_native_webgpu_pipeline_layout_release(const struct CanvasGPUPipelineLayout *pipeline_layout);
|
|
3326
|
+
|
|
3327
|
+
char *canvas_native_webgpu_query_set_get_label(const struct CanvasGPUQuerySet *query_set);
|
|
3328
|
+
|
|
3329
|
+
uint32_t canvas_native_webgpu_query_set_get_count(const struct CanvasGPUQuerySet *query_set);
|
|
3330
|
+
|
|
3331
|
+
enum CanvasQueryType canvas_native_webgpu_query_set_get_type(const struct CanvasGPUQuerySet *query_set);
|
|
3332
|
+
|
|
3333
|
+
void canvas_native_webgpu_query_set_destroy(const struct CanvasGPUQuerySet *query_set);
|
|
3334
|
+
|
|
3335
|
+
void canvas_native_webgpu_query_set_reference(const struct CanvasGPUQuerySet *query_set);
|
|
3336
|
+
|
|
3337
|
+
void canvas_native_webgpu_query_set_release(const struct CanvasGPUQuerySet *query_set);
|
|
3338
|
+
|
|
3339
|
+
char *canvas_native_webgpu_queue_get_label(const struct CanvasGPUQueue *queue);
|
|
3340
|
+
|
|
3341
|
+
void canvas_native_webgpu_queue_reference(const struct CanvasGPUQueue *queue);
|
|
3342
|
+
|
|
3343
|
+
void canvas_native_webgpu_queue_release(const struct CanvasGPUQueue *queue);
|
|
3344
|
+
|
|
3345
|
+
void canvas_native_webgpu_queue_copy_webgl_to_texture(const struct CanvasGPUQueue *queue,
|
|
3346
|
+
const struct CanvasImageCopyWebGL *source,
|
|
3347
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3348
|
+
const struct CanvasExtent3d *size);
|
|
3349
|
+
|
|
3350
|
+
void canvas_native_webgpu_queue_copy_context_to_texture(const struct CanvasGPUQueue *queue,
|
|
3351
|
+
const struct CanvasImageCopyCanvasRenderingContext2D *source,
|
|
3352
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3353
|
+
const struct CanvasExtent3d *size);
|
|
3354
|
+
|
|
3355
|
+
void canvas_native_webgpu_queue_copy_image_asset_to_texture(const struct CanvasGPUQueue *queue,
|
|
3356
|
+
const struct CanvasImageCopyImageAsset *source,
|
|
3357
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3358
|
+
const struct CanvasExtent3d *size);
|
|
3359
|
+
|
|
3360
|
+
void canvas_native_webgpu_queue_copy_external_image_to_texture(const struct CanvasGPUQueue *queue,
|
|
3361
|
+
const struct CanvasImageCopyExternalImage *source,
|
|
3362
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3363
|
+
const struct CanvasExtent3d *size);
|
|
3364
|
+
|
|
3365
|
+
void canvas_native_webgpu_queue_on_submitted_work_done(const struct CanvasGPUQueue *queue,
|
|
3366
|
+
void (*callback)(char*, void*),
|
|
3367
|
+
void *callback_data);
|
|
3368
|
+
|
|
3369
|
+
void canvas_native_webgpu_queue_submit(const struct CanvasGPUQueue *queue,
|
|
3370
|
+
const struct CanvasGPUCommandBuffer *const *command_buffers,
|
|
3371
|
+
uintptr_t command_buffers_size);
|
|
3372
|
+
|
|
3373
|
+
void canvas_native_webgpu_queue_write_buffer(const struct CanvasGPUQueue *queue,
|
|
3374
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3375
|
+
uint64_t buffer_offset,
|
|
3376
|
+
const uint8_t *data,
|
|
3377
|
+
uintptr_t data_size,
|
|
3378
|
+
uintptr_t data_offset,
|
|
3379
|
+
intptr_t size);
|
|
3380
|
+
|
|
3381
|
+
void canvas_native_webgpu_queue_write_texture(const struct CanvasGPUQueue *queue,
|
|
3382
|
+
const struct CanvasImageCopyTexture *destination,
|
|
3383
|
+
const struct CanvasImageDataLayout *data_layout,
|
|
3384
|
+
const struct CanvasExtent3d *size,
|
|
3385
|
+
const uint8_t *buf,
|
|
3386
|
+
uintptr_t buf_size);
|
|
3387
|
+
|
|
3388
|
+
char *canvas_native_webgpu_render_bundle_get_label(const struct CanvasGPURenderBundle *bundle);
|
|
3389
|
+
|
|
3390
|
+
void canvas_native_webgpu_render_bundle_reference(const struct CanvasGPURenderBundle *bundle);
|
|
3391
|
+
|
|
3392
|
+
void canvas_native_webgpu_render_bundle_release(const struct CanvasGPURenderBundle *bundle);
|
|
3393
|
+
|
|
3394
|
+
char *canvas_native_webgpu_render_bundle_encoder_get_label(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3395
|
+
|
|
3396
|
+
void canvas_native_webgpu_render_bundle_encoder_draw(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3397
|
+
uint32_t vertex_count,
|
|
3398
|
+
uint32_t instance_count,
|
|
3399
|
+
uint32_t first_vertex,
|
|
3400
|
+
uint32_t first_instance);
|
|
3401
|
+
|
|
3402
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indexed(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3403
|
+
uint32_t index_count,
|
|
3404
|
+
uint32_t instance_count,
|
|
3405
|
+
uint32_t first_index,
|
|
3406
|
+
int32_t base_vertex,
|
|
3407
|
+
uint32_t first_instance);
|
|
3408
|
+
|
|
3409
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indexed_indirect(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3410
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3411
|
+
uint64_t indirect_offset);
|
|
3412
|
+
|
|
3413
|
+
void canvas_native_webgpu_render_bundle_encoder_draw_indirect(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3414
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3415
|
+
uint64_t indirect_offset);
|
|
3416
|
+
|
|
3417
|
+
void canvas_native_webgpu_render_bundle_encoder_insert_debug_marker(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3418
|
+
const char *label);
|
|
3419
|
+
|
|
3420
|
+
void canvas_native_webgpu_render_bundle_encoder_pop_debug_group(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3421
|
+
|
|
3422
|
+
void canvas_native_webgpu_render_bundle_encoder_push_debug_group(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3423
|
+
const char *label);
|
|
3424
|
+
|
|
3425
|
+
void canvas_native_webgpu_render_bundle_encoder_set_bind_group(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3426
|
+
uint32_t index,
|
|
3427
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
3428
|
+
const uint32_t *dynamic_offsets,
|
|
3429
|
+
uintptr_t dynamic_offsets_size,
|
|
3430
|
+
uintptr_t dynamic_offsets_start,
|
|
3431
|
+
uintptr_t dynamic_offsets_length);
|
|
3432
|
+
|
|
3433
|
+
void canvas_native_webgpu_render_bundle_encoder_set_index_buffer(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3434
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3435
|
+
enum CanvasIndexFormat index_format,
|
|
3436
|
+
int64_t offset,
|
|
3437
|
+
int64_t size);
|
|
3438
|
+
|
|
3439
|
+
void canvas_native_webgpu_render_bundle_encoder_set_pipeline(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3440
|
+
const struct CanvasGPURenderPipeline *pipeline);
|
|
3441
|
+
|
|
3442
|
+
void canvas_native_webgpu_render_bundle_encoder_set_vertex_buffer(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3443
|
+
uint32_t slot,
|
|
3444
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3445
|
+
int64_t offset,
|
|
3446
|
+
int64_t size);
|
|
3447
|
+
|
|
3448
|
+
const struct CanvasGPURenderBundle *canvas_native_webgpu_render_bundle_encoder_finish(const struct CanvasGPURenderBundleEncoder *render_bundle,
|
|
3449
|
+
const char *label);
|
|
3450
|
+
|
|
3451
|
+
void canvas_native_webgpu_render_bundle_encoder_reference(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3452
|
+
|
|
3453
|
+
void canvas_native_webgpu_render_bundle_encoder_release(const struct CanvasGPURenderBundleEncoder *render_bundle);
|
|
3454
|
+
|
|
3455
|
+
char *canvas_native_webgpu_render_pass_encoder_get_label(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3456
|
+
|
|
3457
|
+
void canvas_native_webgpu_render_pass_encoder_begin_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3458
|
+
uint32_t query_index);
|
|
3459
|
+
|
|
3460
|
+
void canvas_native_webgpu_render_pass_encoder_draw(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3461
|
+
uint32_t vertex_count,
|
|
3462
|
+
uint32_t instance_count,
|
|
3463
|
+
uint32_t first_vertex,
|
|
3464
|
+
uint32_t first_instance);
|
|
3465
|
+
|
|
3466
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indexed(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3467
|
+
uint32_t index_count,
|
|
3468
|
+
uint32_t instance_count,
|
|
3469
|
+
uint32_t first_index,
|
|
3470
|
+
int32_t base_vertex,
|
|
3471
|
+
uint32_t first_instance);
|
|
3472
|
+
|
|
3473
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indexed_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3474
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3475
|
+
uint64_t indirect_offset);
|
|
3476
|
+
|
|
3477
|
+
void canvas_native_webgpu_render_pass_encoder_multi_draw_indexed_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3478
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3479
|
+
uint64_t indirect_offset,
|
|
3480
|
+
uint32_t count);
|
|
3481
|
+
|
|
3482
|
+
void canvas_native_webgpu_render_pass_encoder_draw_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3483
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3484
|
+
uint64_t indirect_offset);
|
|
3485
|
+
|
|
3486
|
+
void canvas_native_webgpu_render_pass_encoder_multi_draw_indirect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3487
|
+
const struct CanvasGPUBuffer *indirect_buffer,
|
|
3488
|
+
uint64_t indirect_offset,
|
|
3489
|
+
uint32_t count);
|
|
3490
|
+
|
|
3491
|
+
void canvas_native_webgpu_render_pass_encoder_end(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3492
|
+
|
|
3493
|
+
void canvas_native_webgpu_render_pass_encoder_end_occlusion_query(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3494
|
+
|
|
3495
|
+
void canvas_native_webgpu_render_pass_encoder_execute_bundles(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3496
|
+
const struct CanvasGPURenderBundle *const *bundles,
|
|
3497
|
+
uintptr_t bundles_size);
|
|
3498
|
+
|
|
3499
|
+
void canvas_native_webgpu_render_pass_encoder_insert_debug_marker(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3500
|
+
const char *marker_label);
|
|
3501
|
+
|
|
3502
|
+
void canvas_native_webgpu_render_pass_encoder_pop_debug_group(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
3503
|
+
|
|
3504
|
+
void canvas_native_webgpu_render_pass_encoder_push_debug_group(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3505
|
+
const char *group_label);
|
|
3506
|
+
|
|
3507
|
+
void canvas_native_webgpu_render_pass_encoder_set_bind_group(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3508
|
+
uint32_t index,
|
|
3509
|
+
const struct CanvasGPUBindGroup *bind_group,
|
|
3510
|
+
const uint32_t *dynamic_offsets,
|
|
3511
|
+
uintptr_t dynamic_offsets_size,
|
|
3512
|
+
uintptr_t dynamic_offsets_start,
|
|
3513
|
+
uintptr_t dynamic_offsets_length);
|
|
1007
3514
|
|
|
1008
|
-
void
|
|
1009
|
-
|
|
1010
|
-
float y1,
|
|
1011
|
-
float x2,
|
|
1012
|
-
float y2,
|
|
1013
|
-
float radius);
|
|
3515
|
+
void canvas_native_webgpu_render_pass_encoder_set_blend_constant(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3516
|
+
const struct CanvasColor *color);
|
|
1014
3517
|
|
|
1015
|
-
void
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
-
|
|
1020
|
-
float rotation,
|
|
1021
|
-
float start_angle,
|
|
1022
|
-
float end_angle,
|
|
1023
|
-
bool anticlockwise);
|
|
3518
|
+
void canvas_native_webgpu_render_pass_encoder_set_index_buffer(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3519
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3520
|
+
enum CanvasIndexFormat index_format,
|
|
3521
|
+
int64_t offset,
|
|
3522
|
+
int64_t size);
|
|
1024
3523
|
|
|
1025
|
-
void
|
|
3524
|
+
void canvas_native_webgpu_render_pass_encoder_set_pipeline(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3525
|
+
const struct CanvasGPURenderPipeline *pipeline);
|
|
1026
3526
|
|
|
1027
|
-
void
|
|
1028
|
-
|
|
1029
|
-
|
|
1030
|
-
|
|
1031
|
-
|
|
1032
|
-
const float *radii,
|
|
1033
|
-
uintptr_t size);
|
|
3527
|
+
void canvas_native_webgpu_render_pass_encoder_set_scissor_rect(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3528
|
+
uint32_t x,
|
|
3529
|
+
uint32_t y,
|
|
3530
|
+
uint32_t width,
|
|
3531
|
+
uint32_t height);
|
|
1034
3532
|
|
|
1035
|
-
void
|
|
1036
|
-
|
|
1037
|
-
float y,
|
|
1038
|
-
float width,
|
|
1039
|
-
float height,
|
|
1040
|
-
float top_left,
|
|
1041
|
-
float top_right,
|
|
1042
|
-
float bottom_right,
|
|
1043
|
-
float bottom_left);
|
|
3533
|
+
void canvas_native_webgpu_render_pass_encoder_set_stencil_reference(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3534
|
+
uint32_t reference);
|
|
1044
3535
|
|
|
1045
|
-
|
|
3536
|
+
void canvas_native_webgpu_render_pass_encoder_set_vertex_buffer(const struct CanvasGPURenderPassEncoder *render_pass,
|
|
3537
|
+
uint32_t slot,
|
|
3538
|
+
const struct CanvasGPUBuffer *buffer,
|
|
3539
|
+
int64_t offset,
|
|
3540
|
+
int64_t size);
|
|
1046
3541
|
|
|
1047
|
-
struct
|
|
3542
|
+
void canvas_native_webgpu_render_pass_encoder_set_viewport(const struct CanvasGPURenderPassEncoder *pass,
|
|
3543
|
+
float x,
|
|
3544
|
+
float y,
|
|
3545
|
+
float width,
|
|
3546
|
+
float height,
|
|
3547
|
+
float depth_min,
|
|
3548
|
+
float depth_max);
|
|
1048
3549
|
|
|
1049
|
-
void
|
|
3550
|
+
void canvas_native_webgpu_render_pass_encoder_reference(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
1050
3551
|
|
|
1051
|
-
void
|
|
3552
|
+
void canvas_native_webgpu_render_pass_encoder_release(const struct CanvasGPURenderPassEncoder *render_pass);
|
|
1052
3553
|
|
|
1053
|
-
|
|
3554
|
+
void canvas_native_webgpu_render_pipeline_reference(const struct CanvasGPURenderPipeline *pipeline);
|
|
1054
3555
|
|
|
1055
|
-
void
|
|
3556
|
+
void canvas_native_webgpu_render_pipeline_release(const struct CanvasGPURenderPipeline *pipeline);
|
|
1056
3557
|
|
|
1057
|
-
|
|
3558
|
+
char *canvas_native_webgpu_render_pipeline_get_label(const struct CanvasGPURenderPipeline *pipeline);
|
|
1058
3559
|
|
|
1059
|
-
|
|
3560
|
+
const struct CanvasGPUBindGroupLayout *canvas_native_webgpu_render_pipeline_get_bind_group_layout(const struct CanvasGPURenderPipeline *pipeline,
|
|
3561
|
+
uint32_t index);
|
|
1060
3562
|
|
|
1061
|
-
|
|
3563
|
+
char *canvas_native_webgpu_sampler_get_label(const struct CanvasGPUSampler *sampler);
|
|
1062
3564
|
|
|
1063
|
-
void
|
|
3565
|
+
void canvas_native_webgpu_sampler_reference(const struct CanvasGPUSampler *sampler);
|
|
1064
3566
|
|
|
1065
|
-
|
|
3567
|
+
void canvas_native_webgpu_sampler_release(const struct CanvasGPUSampler *sampler);
|
|
1066
3568
|
|
|
1067
|
-
|
|
3569
|
+
char *canvas_native_webgpu_shader_module_get_label(const struct CanvasGPUShaderModule *shader_module);
|
|
1068
3570
|
|
|
1069
|
-
|
|
3571
|
+
void canvas_native_webgpu_shader_module_reference(const struct CanvasGPUShaderModule *shader_module);
|
|
1070
3572
|
|
|
1071
|
-
void
|
|
3573
|
+
void canvas_native_webgpu_shader_module_release(const struct CanvasGPUShaderModule *shader_module);
|
|
1072
3574
|
|
|
1073
|
-
|
|
3575
|
+
struct CanvasGPUSupportedLimits *canvas_native_webgpu_create_limits(void);
|
|
1074
3576
|
|
|
1075
|
-
void
|
|
3577
|
+
void canvas_native_webgpu_limits_release(struct CanvasGPUSupportedLimits *limits);
|
|
1076
3578
|
|
|
1077
|
-
|
|
3579
|
+
enum SurfaceGetCurrentTextureStatus canvas_native_webgpu_texture_get_status(const struct CanvasGPUTexture *texture);
|
|
1078
3580
|
|
|
1079
|
-
|
|
3581
|
+
bool canvas_native_webgpu_texture_get_suboptimal(const struct CanvasGPUTexture *texture);
|
|
1080
3582
|
|
|
1081
|
-
|
|
3583
|
+
char *canvas_native_webgpu_texture_get_label(const struct CanvasGPUTexture *texture);
|
|
1082
3584
|
|
|
1083
|
-
void
|
|
3585
|
+
void canvas_native_webgpu_texture_reference(const struct CanvasGPUTexture *texture);
|
|
1084
3586
|
|
|
1085
|
-
|
|
3587
|
+
void canvas_native_webgpu_texture_release(const struct CanvasGPUTexture *texture);
|
|
1086
3588
|
|
|
1087
|
-
|
|
3589
|
+
const struct CanvasGPUTextureView *canvas_native_webgpu_texture_create_texture_view(const struct CanvasGPUTexture *texture,
|
|
3590
|
+
const struct CanvasCreateTextureViewDescriptor *descriptor);
|
|
1088
3591
|
|
|
1089
|
-
|
|
3592
|
+
uint32_t canvas_native_webgpu_texture_get_depth_or_array_layers(const struct CanvasGPUTexture *texture);
|
|
1090
3593
|
|
|
1091
|
-
|
|
3594
|
+
uint32_t canvas_native_webgpu_texture_get_width(const struct CanvasGPUTexture *texture);
|
|
1092
3595
|
|
|
1093
|
-
|
|
3596
|
+
uint32_t canvas_native_webgpu_texture_get_height(const struct CanvasGPUTexture *texture);
|
|
1094
3597
|
|
|
1095
|
-
|
|
3598
|
+
enum CanvasTextureDimension canvas_native_webgpu_texture_get_dimension(const struct CanvasGPUTexture *texture);
|
|
1096
3599
|
|
|
1097
|
-
|
|
3600
|
+
struct CanvasGPUTextureFormat canvas_native_webgpu_texture_get_format(const struct CanvasGPUTexture *texture);
|
|
1098
3601
|
|
|
1099
|
-
|
|
3602
|
+
uint32_t canvas_native_webgpu_texture_get_usage(const struct CanvasGPUTexture *texture);
|
|
1100
3603
|
|
|
1101
|
-
|
|
3604
|
+
uint32_t canvas_native_webgpu_texture_get_mip_level_count(const struct CanvasGPUTexture *texture);
|
|
1102
3605
|
|
|
1103
|
-
|
|
3606
|
+
uint32_t canvas_native_webgpu_texture_get_sample_count(const struct CanvasGPUTexture *texture);
|
|
1104
3607
|
|
|
1105
|
-
|
|
3608
|
+
void canvas_native_webgpu_texture_destroy(const struct CanvasGPUTexture *texture);
|
|
1106
3609
|
|
|
1107
|
-
|
|
3610
|
+
char *canvas_native_webgpu_texture_view_get_label(const struct CanvasGPUTextureView *texture_view);
|
|
1108
3611
|
|
|
1109
|
-
|
|
3612
|
+
void canvas_native_webgpu_texture_view_reference(const struct CanvasGPUTextureView *texture_view);
|
|
1110
3613
|
|
|
1111
|
-
void
|
|
3614
|
+
void canvas_native_webgpu_texture_view_release(const struct CanvasGPUTextureView *texture_view);
|
|
1112
3615
|
|
|
1113
|
-
|
|
3616
|
+
void canvas_native_webgpu_struct_surface_capabilities_release(struct CanvasSurfaceCapabilities *cap);
|
|
1114
3617
|
|
|
1115
|
-
|
|
3618
|
+
const uint8_t *canvas_native_u8_buffer_get_bytes(const struct U8Buffer *buffer);
|
|
1116
3619
|
|
|
1117
|
-
|
|
3620
|
+
uint8_t *canvas_native_u8_buffer_get_bytes_mut(struct U8Buffer *buffer);
|
|
1118
3621
|
|
|
1119
|
-
void
|
|
3622
|
+
void canvas_native_u8_buffer_release(struct U8Buffer *buffer);
|
|
1120
3623
|
|
|
1121
|
-
|
|
3624
|
+
uintptr_t canvas_native_u8_buffer_get_length(const struct U8Buffer *buffer);
|
|
1122
3625
|
|
|
1123
|
-
|
|
3626
|
+
const uint16_t *canvas_native_u16_buffer_get_bytes(const struct U16Buffer *buffer);
|
|
1124
3627
|
|
|
1125
|
-
|
|
3628
|
+
uint16_t *canvas_native_u16_buffer_get_bytes_mut(struct U16Buffer *buffer);
|
|
1126
3629
|
|
|
1127
|
-
void
|
|
3630
|
+
void canvas_native_u16_buffer_release(struct U16Buffer *buffer);
|
|
1128
3631
|
|
|
1129
|
-
|
|
3632
|
+
uintptr_t canvas_native_u16_buffer_get_length(const struct U16Buffer *buffer);
|
|
1130
3633
|
|
|
1131
|
-
|
|
3634
|
+
const uint32_t *canvas_native_u32_buffer_get_bytes(const struct U32Buffer *buffer);
|
|
1132
3635
|
|
|
1133
|
-
|
|
3636
|
+
uint32_t *canvas_native_u32_buffer_get_bytes_mut(struct U32Buffer *buffer);
|
|
1134
3637
|
|
|
1135
|
-
void
|
|
3638
|
+
void canvas_native_u32_buffer_release(struct U32Buffer *buffer);
|
|
1136
3639
|
|
|
1137
|
-
|
|
3640
|
+
uintptr_t canvas_native_u32_buffer_get_length(const struct U32Buffer *buffer);
|
|
1138
3641
|
|
|
1139
|
-
|
|
3642
|
+
const int32_t *canvas_native_i32_buffer_get_bytes(const struct I32Buffer *buffer);
|
|
1140
3643
|
|
|
1141
|
-
|
|
3644
|
+
int32_t *canvas_native_i32_buffer_get_bytes_mut(struct I32Buffer *buffer);
|
|
1142
3645
|
|
|
1143
|
-
|
|
3646
|
+
void canvas_native_i32_buffer_release(struct I32Buffer *buffer);
|
|
1144
3647
|
|
|
1145
|
-
|
|
3648
|
+
uintptr_t canvas_native_i32_buffer_get_length(const struct I32Buffer *buffer);
|
|
1146
3649
|
|
|
1147
|
-
|
|
3650
|
+
const float *canvas_native_f32_buffer_get_bytes(const struct F32Buffer *buffer);
|
|
1148
3651
|
|
|
1149
|
-
|
|
3652
|
+
float *canvas_native_f32_buffer_get_bytes_mut(struct F32Buffer *buffer);
|
|
1150
3653
|
|
|
1151
|
-
struct
|
|
3654
|
+
void canvas_native_f32_buffer_release(struct F32Buffer *buffer);
|
|
1152
3655
|
|
|
1153
|
-
|
|
3656
|
+
uintptr_t canvas_native_f32_buffer_get_length(const struct F32Buffer *buffer);
|
|
1154
3657
|
|
|
1155
|
-
|
|
3658
|
+
uintptr_t canvas_native_string_buffer_get_length(const struct StringBuffer *buffer);
|
|
1156
3659
|
|
|
1157
|
-
|
|
3660
|
+
char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer, uintptr_t index);
|
|
1158
3661
|
|
|
1159
|
-
|
|
1160
|
-
const uint8_t *array,
|
|
1161
|
-
uintptr_t size);
|
|
3662
|
+
void canvas_native_string_buffer_release(struct StringBuffer *buffer);
|
|
1162
3663
|
|
|
1163
|
-
|
|
3664
|
+
struct FileHelperMime *canvas_native_helper_get_mime(const uint8_t *data, uintptr_t size);
|
|
1164
3665
|
|
|
1165
|
-
|
|
3666
|
+
void canvas_native_helper_release_mime(struct FileHelperMime *mime);
|
|
1166
3667
|
|
|
1167
|
-
|
|
3668
|
+
void canvas_native_helper_release(struct FileHelper *value);
|
|
1168
3669
|
|
|
1169
|
-
|
|
3670
|
+
struct FileHelper *canvas_native_helper_read_file(const char *path);
|
|
1170
3671
|
|
|
1171
|
-
|
|
3672
|
+
char *canvas_native_helper_read_file_get_mime(struct FileHelper *file);
|
|
1172
3673
|
|
|
1173
|
-
|
|
3674
|
+
char *canvas_native_helper_read_file_get_extension(struct FileHelper *file);
|
|
1174
3675
|
|
|
1175
|
-
bool
|
|
3676
|
+
bool canvas_native_helper_read_file_has_error(const struct FileHelper *file);
|
|
1176
3677
|
|
|
1177
|
-
|
|
1178
|
-
const char *path,
|
|
1179
|
-
uint32_t format);
|
|
3678
|
+
struct U8Buffer *canvas_native_helper_read_file_get_data(struct FileHelper *file);
|
|
1180
3679
|
|
|
1181
|
-
|
|
3680
|
+
struct U8Buffer *canvas_native_helper_read_file_take_data(struct FileHelper *file);
|
|
1182
3681
|
|
|
1183
|
-
|
|
3682
|
+
const char *canvas_native_helper_read_file_get_error(const struct FileHelper *file);
|
|
1184
3683
|
|
|
1185
|
-
|
|
3684
|
+
int64_t canvas_native_image_asset_get_addr(const struct ImageAsset *asset);
|
|
1186
3685
|
|
|
1187
|
-
|
|
3686
|
+
void canvas_native_image_asset_close(const struct ImageAsset *asset);
|
|
1188
3687
|
|
|
1189
|
-
|
|
3688
|
+
const struct ImageAsset *canvas_native_image_asset_create(void);
|
|
1190
3689
|
|
|
1191
|
-
|
|
3690
|
+
const struct ImageAsset *canvas_native_image_asset_reference(const struct ImageAsset *asset);
|
|
1192
3691
|
|
|
1193
|
-
|
|
3692
|
+
void canvas_native_image_asset_release(const struct ImageAsset *asset);
|
|
1194
3693
|
|
|
1195
|
-
|
|
3694
|
+
bool canvas_native_image_asset_load_from_fd(const struct ImageAsset *asset, int fd);
|
|
1196
3695
|
|
|
1197
|
-
|
|
3696
|
+
bool canvas_native_image_asset_load_from_path(const struct ImageAsset *asset, const char *path);
|
|
1198
3697
|
|
|
1199
|
-
|
|
3698
|
+
bool canvas_native_image_asset_load_from_raw(const struct ImageAsset *asset,
|
|
3699
|
+
uint32_t width,
|
|
3700
|
+
uint32_t height,
|
|
3701
|
+
const uint8_t *array,
|
|
3702
|
+
uintptr_t size);
|
|
1200
3703
|
|
|
1201
|
-
|
|
3704
|
+
bool canvas_native_image_asset_load_from_raw_encoded(const struct ImageAsset *asset,
|
|
3705
|
+
const uint8_t *array,
|
|
3706
|
+
uintptr_t size);
|
|
1202
3707
|
|
|
1203
|
-
|
|
3708
|
+
bool canvas_native_image_asset_load_from_url(const struct ImageAsset *asset, const char *url);
|
|
1204
3709
|
|
|
1205
|
-
|
|
1206
|
-
int32_t repetition,
|
|
1207
|
-
int32_t width,
|
|
1208
|
-
int32_t height,
|
|
1209
|
-
const uint8_t *bytes,
|
|
1210
|
-
uintptr_t size);
|
|
3710
|
+
int64_t canvas_native_image_asset_addr(const struct ImageAsset *asset);
|
|
1211
3711
|
|
|
1212
|
-
struct
|
|
3712
|
+
uint32_t canvas_native_image_asset_width(const struct ImageAsset *asset);
|
|
1213
3713
|
|
|
1214
|
-
struct
|
|
3714
|
+
uint32_t canvas_native_image_asset_height(const struct ImageAsset *asset);
|
|
1215
3715
|
|
|
1216
|
-
|
|
3716
|
+
const char *canvas_native_image_asset_get_error(const struct ImageAsset *asset);
|
|
1217
3717
|
|
|
1218
|
-
|
|
3718
|
+
bool canvas_native_image_asset_has_error(const struct ImageAsset *asset);
|
|
3719
|
+
|
|
3720
|
+
void canvas_native_text_decoder_release(struct TextDecoder *value);
|
|
1219
3721
|
|
|
1220
3722
|
struct TextDecoder *canvas_native_text_decoder_create(const char *decoding);
|
|
1221
3723
|
|
|
@@ -1223,12 +3725,6 @@ const char *canvas_native_text_decoder_decode(const struct TextDecoder *decoder,
|
|
|
1223
3725
|
const uint8_t *data,
|
|
1224
3726
|
uintptr_t size);
|
|
1225
3727
|
|
|
1226
|
-
void canvas_native_ccow_destroy(struct CCow *cow);
|
|
1227
|
-
|
|
1228
|
-
const uint8_t *canvas_native_ccow_get_bytes(const struct CCow *cow);
|
|
1229
|
-
|
|
1230
|
-
uintptr_t canvas_native_ccow_get_length(const struct CCow *cow);
|
|
1231
|
-
|
|
1232
3728
|
struct CCow *canvas_native_text_decoder_decode_as_cow(const struct TextDecoder *decoder,
|
|
1233
3729
|
const uint8_t *data,
|
|
1234
3730
|
uintptr_t size);
|
|
@@ -1242,6 +3738,8 @@ const char *canvas_native_text_decoder_decode_c_string(const struct TextDecoder
|
|
|
1242
3738
|
|
|
1243
3739
|
const char *canvas_native_text_decoder_get_encoding(const struct TextDecoder *decoder);
|
|
1244
3740
|
|
|
3741
|
+
void canvas_native_text_encoder_release(struct TextEncoder *value);
|
|
3742
|
+
|
|
1245
3743
|
struct TextEncoder *canvas_native_text_encoder_create(const char *encoding);
|
|
1246
3744
|
|
|
1247
3745
|
struct U8Buffer *canvas_native_text_encoder_encode(const struct TextEncoder *encoder,
|
|
@@ -1249,13 +3747,9 @@ struct U8Buffer *canvas_native_text_encoder_encode(const struct TextEncoder *enc
|
|
|
1249
3747
|
|
|
1250
3748
|
const char *canvas_native_text_encoder_get_encoding(const struct TextEncoder *encoder);
|
|
1251
3749
|
|
|
1252
|
-
bool canvas_native_context_gl_make_current(const struct CanvasRenderingContext2D *context);
|
|
1253
|
-
|
|
1254
|
-
bool canvas_native_context_gl_swap_buffers(const struct CanvasRenderingContext2D *context);
|
|
1255
|
-
|
|
1256
3750
|
struct PaintStyle *canvas_native_context_create_pattern_webgl(struct WebGLState *source,
|
|
1257
3751
|
struct CanvasRenderingContext2D *context,
|
|
1258
|
-
|
|
3752
|
+
enum CanvasRepetition repetition);
|
|
1259
3753
|
|
|
1260
3754
|
bool canvas_native_webgl_make_current(struct WebGLState *state);
|
|
1261
3755
|
|
|
@@ -1353,7 +3847,7 @@ bool canvas_native_webgl_context_attribute_get_get_depth(const struct ContextAtt
|
|
|
1353
3847
|
|
|
1354
3848
|
bool canvas_native_webgl_context_attribute_get_get_fail_if_major_performance_caveat(const struct ContextAttributes *attr);
|
|
1355
3849
|
|
|
1356
|
-
|
|
3850
|
+
int32_t canvas_native_webgl_context_attribute_get_get_power_preference(const struct ContextAttributes *attr);
|
|
1357
3851
|
|
|
1358
3852
|
bool canvas_native_webgl_context_attribute_get_get_premultiplied_alpha(const struct ContextAttributes *attr);
|
|
1359
3853
|
|
|
@@ -1474,27 +3968,46 @@ bool canvas_native_webgl_oes_vertex_array_object_is_vertex_array_oes(uint32_t ar
|
|
|
1474
3968
|
void canvas_native_webgl_oes_vertex_array_object_bind_vertex_array_oes(uint32_t array_object,
|
|
1475
3969
|
const struct OES_vertex_array_object *object);
|
|
1476
3970
|
|
|
1477
|
-
|
|
1478
|
-
|
|
3971
|
+
#if defined(TARGET_OS_ANDROID)
|
|
3972
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3973
|
+
int32_t width,
|
|
3974
|
+
int32_t height,
|
|
3975
|
+
int32_t version,
|
|
3976
|
+
bool alpha,
|
|
3977
|
+
bool antialias,
|
|
3978
|
+
bool depth,
|
|
3979
|
+
bool fail_if_major_performance_caveat,
|
|
3980
|
+
int32_t power_preference,
|
|
3981
|
+
bool premultiplied_alpha,
|
|
3982
|
+
bool preserve_drawing_buffer,
|
|
3983
|
+
bool stencil,
|
|
3984
|
+
bool desynchronized,
|
|
3985
|
+
bool xr_compatible);
|
|
3986
|
+
#endif
|
|
3987
|
+
|
|
3988
|
+
#if !defined(TARGET_OS_ANDROID)
|
|
3989
|
+
struct WebGLState *canvas_native_webgl_create(void *view,
|
|
3990
|
+
int32_t version,
|
|
1479
3991
|
bool alpha,
|
|
1480
3992
|
bool antialias,
|
|
1481
3993
|
bool depth,
|
|
1482
3994
|
bool fail_if_major_performance_caveat,
|
|
1483
|
-
|
|
3995
|
+
int32_t power_preference,
|
|
1484
3996
|
bool premultiplied_alpha,
|
|
1485
3997
|
bool preserve_drawing_buffer,
|
|
1486
3998
|
bool stencil,
|
|
1487
3999
|
bool desynchronized,
|
|
1488
4000
|
bool xr_compatible);
|
|
4001
|
+
#endif
|
|
1489
4002
|
|
|
1490
4003
|
struct WebGLState *canvas_native_webgl_create_no_window(int32_t width,
|
|
1491
4004
|
int32_t height,
|
|
1492
|
-
|
|
4005
|
+
int32_t version,
|
|
1493
4006
|
bool alpha,
|
|
1494
4007
|
bool antialias,
|
|
1495
4008
|
bool depth,
|
|
1496
4009
|
bool fail_if_major_performance_caveat,
|
|
1497
|
-
|
|
4010
|
+
int32_t power_preference,
|
|
1498
4011
|
bool premultiplied_alpha,
|
|
1499
4012
|
bool preserve_drawing_buffer,
|
|
1500
4013
|
bool stencil,
|
|
@@ -1999,9 +4512,9 @@ void canvas_native_webgl_tex_image2d_canvas2d(int32_t target,
|
|
|
1999
4512
|
|
|
2000
4513
|
void canvas_native_webgl_tex_image2d_webgl(int32_t target,
|
|
2001
4514
|
int32_t level,
|
|
2002
|
-
int32_t
|
|
2003
|
-
int32_t
|
|
2004
|
-
int32_t
|
|
4515
|
+
int32_t internalformat,
|
|
4516
|
+
int32_t format,
|
|
4517
|
+
int32_t image_type,
|
|
2005
4518
|
struct WebGLState *webgl,
|
|
2006
4519
|
struct WebGLState *state);
|
|
2007
4520
|
|
|
@@ -2032,7 +4545,7 @@ void canvas_native_webgl_tex_image2d_image_asset(int32_t target,
|
|
|
2032
4545
|
int32_t internalformat,
|
|
2033
4546
|
int32_t format,
|
|
2034
4547
|
int32_t image_type,
|
|
2035
|
-
struct ImageAsset *image_asset,
|
|
4548
|
+
const struct ImageAsset *image_asset,
|
|
2036
4549
|
struct WebGLState *state);
|
|
2037
4550
|
|
|
2038
4551
|
void canvas_native_webgl_tex_parameterf(uint32_t target,
|
|
@@ -2051,7 +4564,7 @@ void canvas_native_webgl_tex_sub_image2d_asset(uint32_t target,
|
|
|
2051
4564
|
int32_t yoffset,
|
|
2052
4565
|
uint32_t format,
|
|
2053
4566
|
int32_t image_type,
|
|
2054
|
-
struct ImageAsset *asset,
|
|
4567
|
+
const struct ImageAsset *asset,
|
|
2055
4568
|
struct WebGLState *state);
|
|
2056
4569
|
|
|
2057
4570
|
void canvas_native_webgl_tex_sub_image2d_canvas2d(uint32_t target,
|
|
@@ -2067,8 +4580,8 @@ void canvas_native_webgl_tex_sub_image2d_webgl(uint32_t target,
|
|
|
2067
4580
|
int32_t level,
|
|
2068
4581
|
int32_t xoffset,
|
|
2069
4582
|
int32_t yoffset,
|
|
2070
|
-
uint32_t
|
|
2071
|
-
int32_t
|
|
4583
|
+
uint32_t format,
|
|
4584
|
+
int32_t image_type,
|
|
2072
4585
|
struct WebGLState *webgl,
|
|
2073
4586
|
struct WebGLState *state);
|
|
2074
4587
|
|
|
@@ -2555,6 +5068,18 @@ void canvas_native_webgl2_tex_image3d_asset(uint32_t target,
|
|
|
2555
5068
|
const struct ImageAsset *asset,
|
|
2556
5069
|
struct WebGLState *state);
|
|
2557
5070
|
|
|
5071
|
+
void canvas_native_webgl2_tex_image3d_canvas2d(uint32_t target,
|
|
5072
|
+
int32_t level,
|
|
5073
|
+
int32_t internalformat,
|
|
5074
|
+
int32_t _width,
|
|
5075
|
+
int32_t _height,
|
|
5076
|
+
int32_t depth,
|
|
5077
|
+
int32_t border,
|
|
5078
|
+
uint32_t format,
|
|
5079
|
+
uint32_t type_,
|
|
5080
|
+
struct CanvasRenderingContext2D *canvas,
|
|
5081
|
+
struct WebGLState *state);
|
|
5082
|
+
|
|
2558
5083
|
void canvas_native_webgl2_tex_image3d(uint32_t target,
|
|
2559
5084
|
int32_t level,
|
|
2560
5085
|
int32_t internalformat,
|
|
@@ -2637,6 +5162,19 @@ void canvas_native_webgl2_tex_sub_image3d_asset(uint32_t target,
|
|
|
2637
5162
|
const struct ImageAsset *asset,
|
|
2638
5163
|
struct WebGLState *state);
|
|
2639
5164
|
|
|
5165
|
+
void canvas_native_webgl2_tex_sub_image3d_canvas2d(uint32_t target,
|
|
5166
|
+
int32_t level,
|
|
5167
|
+
int32_t xoffset,
|
|
5168
|
+
int32_t yoffset,
|
|
5169
|
+
int32_t zoffset,
|
|
5170
|
+
int32_t _width,
|
|
5171
|
+
int32_t _height,
|
|
5172
|
+
int32_t depth,
|
|
5173
|
+
uint32_t format,
|
|
5174
|
+
uint32_t type_,
|
|
5175
|
+
struct CanvasRenderingContext2D *canvas,
|
|
5176
|
+
struct WebGLState *state);
|
|
5177
|
+
|
|
2640
5178
|
void canvas_native_webgl2_tex_sub_image3d_offset(uint32_t target,
|
|
2641
5179
|
int32_t level,
|
|
2642
5180
|
int32_t xoffset,
|
|
@@ -2767,120 +5305,72 @@ void canvas_native_webgl2_vertex_attrib_i4uiv(uint32_t index,
|
|
|
2767
5305
|
uintptr_t size,
|
|
2768
5306
|
struct WebGLState *state);
|
|
2769
5307
|
|
|
2770
|
-
void
|
|
2771
|
-
|
|
2772
|
-
|
|
2773
|
-
|
|
2774
|
-
|
|
2775
|
-
|
|
2776
|
-
|
|
2777
|
-
|
|
2778
|
-
|
|
2779
|
-
|
|
2780
|
-
const uint8_t *canvas_native_u8_buffer_get_bytes(const struct U8Buffer *buffer);
|
|
2781
|
-
|
|
2782
|
-
uint8_t *canvas_native_u8_buffer_get_bytes_mut(struct U8Buffer *buffer);
|
|
2783
|
-
|
|
2784
|
-
void canvas_native_u8_buffer_destroy(struct U8Buffer *buffer);
|
|
2785
|
-
|
|
2786
|
-
uintptr_t canvas_native_u8_buffer_mut_get_length(const struct U8Buffer *buffer);
|
|
2787
|
-
|
|
2788
|
-
uintptr_t canvas_native_u8_buffer_get_length(const struct U8Buffer *buffer);
|
|
2789
|
-
|
|
2790
|
-
const uint16_t *canvas_native_u16_buffer_get_bytes(const struct U16Buffer *buffer);
|
|
2791
|
-
|
|
2792
|
-
uint16_t *canvas_native_u16_buffer_get_bytes_mut(struct U16Buffer *buffer);
|
|
2793
|
-
|
|
2794
|
-
void canvas_native_u16_buffer_destroy(struct U16Buffer *buffer);
|
|
2795
|
-
|
|
2796
|
-
uintptr_t canvas_native_u16_buffer_mut_get_length(const struct U16Buffer *buffer);
|
|
2797
|
-
|
|
2798
|
-
uintptr_t canvas_native_u16_buffer_get_length(const struct U16Buffer *buffer);
|
|
2799
|
-
|
|
2800
|
-
const uint32_t *canvas_native_u32_buffer_get_bytes(const struct U32Buffer *buffer);
|
|
2801
|
-
|
|
2802
|
-
uint32_t *canvas_native_u32_buffer_get_bytes_mut(struct U32Buffer *buffer);
|
|
2803
|
-
|
|
2804
|
-
void canvas_native_u32_buffer_destroy(struct U32Buffer *buffer);
|
|
2805
|
-
|
|
2806
|
-
uintptr_t canvas_native_u32_buffer_mut_get_length(const struct U32Buffer *buffer);
|
|
2807
|
-
|
|
2808
|
-
uintptr_t canvas_native_u32_buffer_get_length(const struct U32Buffer *buffer);
|
|
2809
|
-
|
|
2810
|
-
const int32_t *canvas_native_i32_buffer_get_bytes(const struct I32Buffer *buffer);
|
|
2811
|
-
|
|
2812
|
-
int32_t *canvas_native_i32_buffer_get_bytes_mut(struct I32Buffer *buffer);
|
|
2813
|
-
|
|
2814
|
-
void canvas_native_i32_buffer_destroy(struct I32Buffer *buffer);
|
|
2815
|
-
|
|
2816
|
-
uintptr_t canvas_native_i32_buffer_mut_get_length(const struct I32Buffer *buffer);
|
|
2817
|
-
|
|
2818
|
-
uintptr_t canvas_native_i32_buffer_get_length(const struct I32Buffer *buffer);
|
|
2819
|
-
|
|
2820
|
-
const float *canvas_native_f32_buffer_get_bytes(const struct F32Buffer *buffer);
|
|
2821
|
-
|
|
2822
|
-
float *canvas_native_f32_buffer_get_bytes_mut(struct F32Buffer *buffer);
|
|
2823
|
-
|
|
2824
|
-
void canvas_native_f32_buffer_destroy(struct F32Buffer *buffer);
|
|
2825
|
-
|
|
2826
|
-
uintptr_t canvas_native_f32_buffer_mut_get_length(const struct F32Buffer *buffer);
|
|
2827
|
-
|
|
2828
|
-
uintptr_t canvas_native_f32_buffer_get_length(const struct F32Buffer *buffer);
|
|
2829
|
-
|
|
2830
|
-
uintptr_t canvas_native_string_buffer_get_length(const struct StringBuffer *buffer);
|
|
2831
|
-
|
|
2832
|
-
char *canvas_native_string_buffer_get_value_at(const struct StringBuffer *buffer, uintptr_t index);
|
|
2833
|
-
|
|
2834
|
-
void canvas_native_string_buffer_destroy(struct StringBuffer *buffer);
|
|
2835
|
-
|
|
2836
|
-
bool canvas_url_can_parse(const char *value, const char *base);
|
|
2837
|
-
|
|
2838
|
-
struct URL *canvas_url_create(const char *value, const char *base);
|
|
2839
|
-
|
|
2840
|
-
void canvas_url_destroy(struct URL *url);
|
|
2841
|
-
|
|
2842
|
-
struct CCow *canvas_url_to_string(struct URL *url);
|
|
2843
|
-
|
|
2844
|
-
const char *canvas_url_hash(struct URL *url);
|
|
2845
|
-
|
|
2846
|
-
void canvas_url_set_hash(struct URL *url, const char *hash);
|
|
2847
|
-
|
|
2848
|
-
const char *canvas_url_host(struct URL *url);
|
|
2849
|
-
|
|
2850
|
-
void canvas_url_set_host(struct URL *url, const char *host);
|
|
2851
|
-
|
|
2852
|
-
const char *canvas_url_host_name(struct URL *url);
|
|
2853
|
-
|
|
2854
|
-
void canvas_url_set_host_name(struct URL *url, const char *hostname);
|
|
2855
|
-
|
|
2856
|
-
const char *canvas_url_href(struct URL *url);
|
|
2857
|
-
|
|
2858
|
-
void canvas_url_set_href(struct URL *url, const char *href);
|
|
2859
|
-
|
|
2860
|
-
const char *canvas_url_origin(struct URL *url);
|
|
2861
|
-
|
|
2862
|
-
const char *canvas_url_password(struct URL *url);
|
|
2863
|
-
|
|
2864
|
-
void canvas_url_set_password(struct URL *url, const char *password);
|
|
2865
|
-
|
|
2866
|
-
const char *canvas_url_pathname(struct URL *url);
|
|
2867
|
-
|
|
2868
|
-
void canvas_url_set_pathname(struct URL *url, const char *pathname);
|
|
2869
|
-
|
|
2870
|
-
const char *canvas_url_port(struct URL *url);
|
|
2871
|
-
|
|
2872
|
-
void canvas_url_set_port(struct URL *url, const char *port);
|
|
2873
|
-
|
|
2874
|
-
const char *canvas_url_protocol(struct URL *url);
|
|
5308
|
+
void canvas_native_webgl2_tex_image2d_image_asset(int32_t target,
|
|
5309
|
+
int32_t level,
|
|
5310
|
+
int32_t internalformat,
|
|
5311
|
+
uint32_t width,
|
|
5312
|
+
uint32_t height,
|
|
5313
|
+
int32_t border,
|
|
5314
|
+
int32_t format,
|
|
5315
|
+
int32_t type_,
|
|
5316
|
+
const struct ImageAsset *image_asset,
|
|
5317
|
+
struct WebGLState *state);
|
|
2875
5318
|
|
|
2876
|
-
void
|
|
5319
|
+
void canvas_native_webgl2_tex_image2d_src_data_offset(int32_t target,
|
|
5320
|
+
int32_t level,
|
|
5321
|
+
int32_t internalformat,
|
|
5322
|
+
uint32_t width,
|
|
5323
|
+
uint32_t height,
|
|
5324
|
+
int32_t border,
|
|
5325
|
+
int32_t format,
|
|
5326
|
+
int32_t type_,
|
|
5327
|
+
const uint8_t *src_data,
|
|
5328
|
+
uintptr_t src_data_size,
|
|
5329
|
+
uint64_t offset,
|
|
5330
|
+
struct WebGLState *state);
|
|
2877
5331
|
|
|
2878
|
-
|
|
5332
|
+
void canvas_native_webgl2_tex_image2d_offset(int32_t target,
|
|
5333
|
+
int32_t level,
|
|
5334
|
+
int32_t internalformat,
|
|
5335
|
+
uint32_t width,
|
|
5336
|
+
uint32_t height,
|
|
5337
|
+
int32_t border,
|
|
5338
|
+
int32_t format,
|
|
5339
|
+
int32_t type_,
|
|
5340
|
+
uint64_t offset,
|
|
5341
|
+
struct WebGLState *state);
|
|
2879
5342
|
|
|
2880
|
-
void
|
|
5343
|
+
void canvas_native_webgl2_tex_image2d_webgl(int32_t target,
|
|
5344
|
+
int32_t level,
|
|
5345
|
+
int32_t internalformat,
|
|
5346
|
+
uint32_t width,
|
|
5347
|
+
uint32_t height,
|
|
5348
|
+
int32_t border,
|
|
5349
|
+
int32_t format,
|
|
5350
|
+
int32_t type_,
|
|
5351
|
+
struct WebGLState *webgl,
|
|
5352
|
+
struct WebGLState *state);
|
|
2881
5353
|
|
|
2882
|
-
|
|
5354
|
+
void canvas_native_webgl2_tex_image2d_canvas2d(int32_t target,
|
|
5355
|
+
int32_t level,
|
|
5356
|
+
int32_t internalformat,
|
|
5357
|
+
uint32_t width,
|
|
5358
|
+
uint32_t height,
|
|
5359
|
+
int32_t border,
|
|
5360
|
+
int32_t format,
|
|
5361
|
+
int32_t type_,
|
|
5362
|
+
struct CanvasRenderingContext2D *canvas,
|
|
5363
|
+
struct WebGLState *state);
|
|
2883
5364
|
|
|
2884
|
-
void
|
|
5365
|
+
void canvas_native_webgl2_tex_image2d_image_data(int32_t target,
|
|
5366
|
+
int32_t level,
|
|
5367
|
+
int32_t internalformat,
|
|
5368
|
+
uint32_t width,
|
|
5369
|
+
uint32_t height,
|
|
5370
|
+
int32_t border,
|
|
5371
|
+
int32_t format,
|
|
5372
|
+
int32_t type_,
|
|
5373
|
+
const struct ImageData *image_data,
|
|
5374
|
+
struct WebGLState *state);
|
|
2885
5375
|
|
|
2886
5376
|
#endif /* CANVAS_C_H */
|