@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.
Files changed (454) hide show
  1. package/Canvas/common.d.ts +15 -24
  2. package/Canvas/common.js +147 -203
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +13 -15
  5. package/Canvas/index.android.js +152 -151
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.d.ts +23 -11
  8. package/Canvas/index.ios.d.ts +14 -6
  9. package/Canvas/index.ios.js +213 -124
  10. package/Canvas/index.ios.js.map +1 -1
  11. package/Canvas/utils.d.ts +3 -0
  12. package/Canvas/utils.js +85 -0
  13. package/Canvas/utils.js.map +1 -0
  14. package/Canvas2D/CanvasRenderingContext2D/index.d.ts +4 -2
  15. package/Canvas2D/CanvasRenderingContext2D/index.js +79 -85
  16. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  17. package/Canvas2D/DOMMatrix/index.d.ts +14 -0
  18. package/Canvas2D/DOMMatrix/index.js +62 -0
  19. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  20. package/Canvas2D/ImageData/index.js +4 -6
  21. package/Canvas2D/ImageData/index.js.map +1 -1
  22. package/Canvas2D/Path2D/index.js.map +1 -1
  23. package/Dom/Dom.js +8 -1
  24. package/Dom/Dom.js.map +1 -1
  25. package/Dom/Group.d.ts +1 -2
  26. package/Dom/Group.js.map +1 -1
  27. package/Dom/Image.d.ts +4 -1
  28. package/Dom/Image.js +15 -2
  29. package/Dom/Image.js.map +1 -1
  30. package/Dom/Paint.d.ts +1 -1
  31. package/Dom/Paint.js.map +1 -1
  32. package/Dom/Text.js.map +1 -1
  33. package/Dom/shaders/LinearGradient.js.map +1 -1
  34. package/Dom/shaders/TwoPointConicalGradient.js.map +1 -1
  35. package/Dom/shapes/Atlas.js.map +1 -1
  36. package/Dom/shapes/Circle.js.map +1 -1
  37. package/Dom/shapes/Line.js.map +1 -1
  38. package/Dom/shapes/Oval.js.map +1 -1
  39. package/Dom/shapes/Path.d.ts +1 -1
  40. package/Dom/shapes/Path.js.map +1 -1
  41. package/Dom/shapes/Rect.js.map +1 -1
  42. package/Dom/shapes/RoundedRect.js.map +1 -1
  43. package/Dom/shapes/index.js.map +1 -1
  44. package/Fonts/FontFace.android.d.ts +46 -0
  45. package/Fonts/FontFace.android.js +197 -0
  46. package/Fonts/FontFace.android.js.map +1 -0
  47. package/Fonts/FontFace.ios.d.ts +45 -0
  48. package/Fonts/FontFace.ios.js +169 -0
  49. package/Fonts/FontFace.ios.js.map +1 -0
  50. package/Fonts/FontFaceSet.android.d.ts +31 -0
  51. package/Fonts/FontFaceSet.android.js +119 -0
  52. package/Fonts/FontFaceSet.android.js.map +1 -0
  53. package/Fonts/FontFaceSet.ios.d.ts +31 -0
  54. package/Fonts/FontFaceSet.ios.js +109 -0
  55. package/Fonts/FontFaceSet.ios.js.map +1 -0
  56. package/Fonts/index.d.ts +2 -0
  57. package/Fonts/index.js +3 -0
  58. package/Fonts/index.js.map +1 -0
  59. package/ImageAsset/index.d.ts +8 -3
  60. package/ImageAsset/index.js +206 -11
  61. package/ImageAsset/index.js.map +1 -1
  62. package/ImageBitmap/index.js +110 -23
  63. package/ImageBitmap/index.js.map +1 -1
  64. package/README.md +62 -3
  65. package/TextDecoder/index.js +3 -3
  66. package/TextDecoder/index.js.map +1 -1
  67. package/TextEncoder/index.js +3 -3
  68. package/TextEncoder/index.js.map +1 -1
  69. package/WebGL/WebGLExtensions/index.js +5 -5
  70. package/WebGL/WebGLExtensions/index.js.map +1 -1
  71. package/WebGL/WebGLRenderingContext/common.d.ts +1 -1
  72. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  73. package/WebGL/WebGLRenderingContext/index.d.ts +1 -0
  74. package/WebGL/WebGLRenderingContext/index.js +144 -46
  75. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  76. package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -0
  77. package/WebGL2/WebGL2RenderingContext/index.js +7 -8
  78. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  79. package/WebGPU/Constants.d.ts +36 -0
  80. package/WebGPU/Constants.js +42 -0
  81. package/WebGPU/Constants.js.map +1 -0
  82. package/WebGPU/Errors.d.ts +18 -0
  83. package/WebGPU/Errors.js +21 -0
  84. package/WebGPU/Errors.js.map +1 -0
  85. package/WebGPU/GPU.d.ts +13 -0
  86. package/WebGPU/GPU.js +36 -0
  87. package/WebGPU/GPU.js.map +1 -0
  88. package/WebGPU/GPUAdapter.d.ts +26 -0
  89. package/WebGPU/GPUAdapter.js +93 -0
  90. package/WebGPU/GPUAdapter.js.map +1 -0
  91. package/WebGPU/GPUAdapterInfo.d.ts +9 -0
  92. package/WebGPU/GPUAdapterInfo.js +24 -0
  93. package/WebGPU/GPUAdapterInfo.js.map +1 -0
  94. package/WebGPU/GPUBindGroup.d.ts +6 -0
  95. package/WebGPU/GPUBindGroup.js +15 -0
  96. package/WebGPU/GPUBindGroup.js.map +1 -0
  97. package/WebGPU/GPUBindGroupLayout.d.ts +6 -0
  98. package/WebGPU/GPUBindGroupLayout.js +15 -0
  99. package/WebGPU/GPUBindGroupLayout.js.map +1 -0
  100. package/WebGPU/GPUBuffer.d.ts +15 -0
  101. package/WebGPU/GPUBuffer.js +66 -0
  102. package/WebGPU/GPUBuffer.js.map +1 -0
  103. package/WebGPU/GPUCanvasContext.d.ts +42 -0
  104. package/WebGPU/GPUCanvasContext.js +149 -0
  105. package/WebGPU/GPUCanvasContext.js.map +1 -0
  106. package/WebGPU/GPUCommandBuffer.d.ts +6 -0
  107. package/WebGPU/GPUCommandBuffer.js +15 -0
  108. package/WebGPU/GPUCommandBuffer.js.map +1 -0
  109. package/WebGPU/GPUCommandEncoder.d.ts +35 -0
  110. package/WebGPU/GPUCommandEncoder.js +163 -0
  111. package/WebGPU/GPUCommandEncoder.js.map +1 -0
  112. package/WebGPU/GPUComputePassEncoder.d.ts +17 -0
  113. package/WebGPU/GPUComputePassEncoder.js +53 -0
  114. package/WebGPU/GPUComputePassEncoder.js.map +1 -0
  115. package/WebGPU/GPUComputePipeline.d.ts +8 -0
  116. package/WebGPU/GPUComputePipeline.js +19 -0
  117. package/WebGPU/GPUComputePipeline.js.map +1 -0
  118. package/WebGPU/GPUDevice.d.ts +111 -0
  119. package/WebGPU/GPUDevice.js +341 -0
  120. package/WebGPU/GPUDevice.js.map +1 -0
  121. package/WebGPU/GPUDeviceLostInfo.d.ts +1 -0
  122. package/WebGPU/GPUDeviceLostInfo.js +10 -0
  123. package/WebGPU/GPUDeviceLostInfo.js.map +1 -0
  124. package/WebGPU/GPUExternalTexture.d.ts +6 -0
  125. package/WebGPU/GPUExternalTexture.js +15 -0
  126. package/WebGPU/GPUExternalTexture.js.map +1 -0
  127. package/WebGPU/GPUPipelineLayout.d.ts +6 -0
  128. package/WebGPU/GPUPipelineLayout.js +15 -0
  129. package/WebGPU/GPUPipelineLayout.js.map +1 -0
  130. package/WebGPU/GPUQuerySet.d.ts +6 -0
  131. package/WebGPU/GPUQuerySet.js +15 -0
  132. package/WebGPU/GPUQuerySet.js.map +1 -0
  133. package/WebGPU/GPUQueue.d.ts +15 -0
  134. package/WebGPU/GPUQueue.js +128 -0
  135. package/WebGPU/GPUQueue.js.map +1 -0
  136. package/WebGPU/GPURenderBundle.d.ts +6 -0
  137. package/WebGPU/GPURenderBundle.js +15 -0
  138. package/WebGPU/GPURenderBundle.js.map +1 -0
  139. package/WebGPU/GPURenderBundleEncoder.d.ts +22 -0
  140. package/WebGPU/GPURenderBundleEncoder.js +65 -0
  141. package/WebGPU/GPURenderBundleEncoder.js.map +1 -0
  142. package/WebGPU/GPURenderPassEncoder.d.ts +33 -0
  143. package/WebGPU/GPURenderPassEncoder.js +106 -0
  144. package/WebGPU/GPURenderPassEncoder.js.map +1 -0
  145. package/WebGPU/GPURenderPipeline.d.ts +8 -0
  146. package/WebGPU/GPURenderPipeline.js +19 -0
  147. package/WebGPU/GPURenderPipeline.js.map +1 -0
  148. package/WebGPU/GPUSampler.d.ts +6 -0
  149. package/WebGPU/GPUSampler.js +15 -0
  150. package/WebGPU/GPUSampler.js.map +1 -0
  151. package/WebGPU/GPUShaderModule.d.ts +6 -0
  152. package/WebGPU/GPUShaderModule.js +15 -0
  153. package/WebGPU/GPUShaderModule.js.map +1 -0
  154. package/WebGPU/GPUTexture.d.ts +18 -0
  155. package/WebGPU/GPUTexture.js +47 -0
  156. package/WebGPU/GPUTexture.js.map +1 -0
  157. package/WebGPU/GPUTextureView.d.ts +6 -0
  158. package/WebGPU/GPUTextureView.js +15 -0
  159. package/WebGPU/GPUTextureView.js.map +1 -0
  160. package/WebGPU/Interfaces.d.ts +246 -0
  161. package/WebGPU/Interfaces.js +2 -0
  162. package/WebGPU/Interfaces.js.map +1 -0
  163. package/WebGPU/Types.d.ts +47 -0
  164. package/WebGPU/Types.js +2 -0
  165. package/WebGPU/Types.js.map +1 -0
  166. package/WebGPU/Utils.d.ts +7 -0
  167. package/WebGPU/Utils.js +301 -0
  168. package/WebGPU/Utils.js.map +1 -0
  169. package/WebGPU/index.d.ts +28 -0
  170. package/WebGPU/index.js +29 -0
  171. package/WebGPU/index.js.map +1 -0
  172. package/angular/{esm2020 → esm2022}/index.mjs +5 -5
  173. package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs +4 -4
  174. package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs.map +1 -1
  175. package/angular/package.json +4 -10
  176. package/common.d.ts +0 -3
  177. package/common.js +1 -5
  178. package/common.js.map +1 -1
  179. package/helpers.js.map +1 -1
  180. package/index.d.ts +4 -2
  181. package/index.js +37 -3
  182. package/index.js.map +1 -1
  183. package/package.json +2 -5
  184. package/platforms/android/canvas-release.aar +0 -0
  185. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  186. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +194 -56
  187. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +1 -0
  188. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
  189. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +152 -151
  190. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2901 -411
  191. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  192. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  193. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +10901 -8099
  194. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +259 -52
  195. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  196. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +259 -52
  197. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
  198. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
  199. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
  200. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
  201. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
  202. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
  203. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
  204. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
  205. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
  206. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
  207. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
  208. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
  209. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
  210. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
  211. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
  212. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
  213. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +0 -0
  214. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  215. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +994 -663
  216. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  217. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +388 -112
  218. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +1 -0
  219. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/NSCMTLView.h +32 -0
  220. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +152 -151
  221. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2901 -411
  222. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  223. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  224. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  225. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +10901 -8099
  226. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +259 -52
  227. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  228. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +259 -52
  229. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +10901 -8099
  230. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +259 -52
  231. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  232. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +259 -52
  233. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +143 -33
  234. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Black.ttf +0 -0
  235. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Bold.ttf +0 -0
  236. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraBold.ttf +0 -0
  237. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-ExtraLight.ttf +0 -0
  238. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Light.ttf +0 -0
  239. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Medium.ttf +0 -0
  240. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-Regular.ttf +0 -0
  241. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/Noto_Serif_CJK/NotoSerifTC-SemiBold.ttf +0 -0
  242. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoMath-Regular.ttf +0 -0
  243. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Bold.ttf +0 -0
  244. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-BoldItalic.ttf +0 -0
  245. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Italic.ttf +0 -0
  246. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Medium.ttf +0 -0
  247. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-MediumItalic.ttf +0 -0
  248. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-Regular.ttf +0 -0
  249. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBold.ttf +0 -0
  250. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/fonts/STIXTwoMath/STIXTwoText-SemiBoldItalic.ttf +0 -0
  251. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  252. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +993 -662
  253. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +1037 -641
  254. package/platforms/ios/build.xcconfig +3 -1
  255. package/platforms/ios/src/NSOperationQueueWrapper.h +3 -1
  256. package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
  257. package/platforms/ios/src/cpp/AsyncCallback.h +214 -0
  258. package/platforms/ios/src/cpp/Caches.h +69 -1
  259. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +647 -1166
  260. package/platforms/ios/src/cpp/CanvasJSIModule.h +11 -1
  261. package/platforms/ios/src/cpp/Helpers.h +2 -129
  262. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +600 -437
  263. package/platforms/ios/src/cpp/ImageAssetImpl.h +18 -10
  264. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +63 -6
  265. package/platforms/ios/src/cpp/ImageBitmapImpl.h +12 -4
  266. package/platforms/ios/src/cpp/JSIReadFileCallback.h +4 -4
  267. package/platforms/ios/src/cpp/NativeType.h +87 -0
  268. package/platforms/ios/src/cpp/ObjectWrapperImpl.h +50 -0
  269. package/platforms/ios/src/cpp/OneByteStringResource.cpp +2 -2
  270. package/platforms/ios/src/cpp/PromiseCallback.h +197 -0
  271. package/platforms/ios/src/cpp/RafImpl.h +2 -2
  272. package/platforms/ios/src/cpp/TextDecoderImpl.cpp +0 -6
  273. package/platforms/ios/src/cpp/TextDecoderImpl.h +3 -3
  274. package/platforms/ios/src/cpp/TextEncoderImpl.cpp +1 -1
  275. package/platforms/ios/src/cpp/TextEncoderImpl.h +3 -3
  276. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +8 -7
  277. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +1 -11
  278. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +3 -3
  279. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +193 -90
  280. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +77 -23
  281. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +5 -6
  282. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +4 -4
  283. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +409 -3
  284. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +29 -2
  285. package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +6 -3
  286. package/platforms/ios/src/cpp/canvas2d/Path2D.h +7 -7
  287. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +3 -3
  288. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +1 -1
  289. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +1 -1
  290. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +1 -1
  291. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +3 -3
  292. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +3 -3
  293. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +247 -160
  294. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +1 -1
  295. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +6 -6
  296. package/platforms/ios/src/cpp/webgl/WebGLShader.h +1 -1
  297. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +5 -5
  298. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +3 -2
  299. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +2 -2
  300. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +1 -1
  301. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +1 -1
  302. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +1 -1
  303. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +1 -1
  304. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +1 -1
  305. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +1 -1
  306. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +1 -1
  307. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +2 -2
  308. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +5 -5
  309. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +1 -1
  310. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +1 -1
  311. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +1 -1
  312. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +1 -1
  313. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +1 -1
  314. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +1 -1
  315. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +1 -1
  316. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +1 -1
  317. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +1 -1
  318. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +2 -2
  319. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +1 -1
  320. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +1 -1
  321. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +1 -1
  322. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +1 -1
  323. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +1 -1
  324. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +1 -1
  325. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +1067 -960
  326. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1 -1
  327. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +1 -1
  328. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +1 -1
  329. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +1 -1
  330. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +1 -1
  331. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +2 -2
  332. package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +371 -0
  333. package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.h +63 -0
  334. package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.cpp +174 -0
  335. package/platforms/ios/src/cpp/webgpu/GPUAdapterInfoImpl.h +58 -0
  336. package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.cpp +79 -0
  337. package/platforms/ios/src/cpp/webgpu/GPUBindGroupImpl.h +48 -0
  338. package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.cpp +79 -0
  339. package/platforms/ios/src/cpp/webgpu/GPUBindGroupLayoutImpl.h +48 -0
  340. package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.cpp +277 -0
  341. package/platforms/ios/src/cpp/webgpu/GPUBufferImpl.h +63 -0
  342. package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +379 -0
  343. package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.h +57 -0
  344. package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.cpp +81 -0
  345. package/platforms/ios/src/cpp/webgpu/GPUCommandBufferImpl.h +48 -0
  346. package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +1217 -0
  347. package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.h +73 -0
  348. package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.cpp +293 -0
  349. package/platforms/ios/src/cpp/webgpu/GPUComputePassEncoderImpl.h +65 -0
  350. package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.cpp +109 -0
  351. package/platforms/ios/src/cpp/webgpu/GPUComputePipelineImpl.h +51 -0
  352. package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +3701 -0
  353. package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +97 -0
  354. package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +200 -0
  355. package/platforms/ios/src/cpp/webgpu/GPUImpl.h +55 -0
  356. package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
  357. package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.cpp +80 -0
  358. package/platforms/ios/src/cpp/webgpu/GPUPipelineLayoutImpl.h +49 -0
  359. package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.cpp +136 -0
  360. package/platforms/ios/src/cpp/webgpu/GPUQuerySetImpl.h +55 -0
  361. package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +605 -0
  362. package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.h +59 -0
  363. package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +501 -0
  364. package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.h +74 -0
  365. package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.cpp +78 -0
  366. package/platforms/ios/src/cpp/webgpu/GPURenderBundleImpl.h +48 -0
  367. package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +723 -0
  368. package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +92 -0
  369. package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.cpp +109 -0
  370. package/platforms/ios/src/cpp/webgpu/GPURenderPipelineImpl.h +52 -0
  371. package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.cpp +79 -0
  372. package/platforms/ios/src/cpp/webgpu/GPUSamplerImpl.h +48 -0
  373. package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.cpp +80 -0
  374. package/platforms/ios/src/cpp/webgpu/GPUShaderModuleImpl.h +48 -0
  375. package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.cpp +1304 -0
  376. package/platforms/ios/src/cpp/webgpu/GPUSupportedLimitsImpl.h +288 -0
  377. package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.cpp +386 -0
  378. package/platforms/ios/src/cpp/webgpu/GPUTextureImpl.h +77 -0
  379. package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.cpp +79 -0
  380. package/platforms/ios/src/cpp/webgpu/GPUTextureViewImpl.h +48 -0
  381. package/platforms/ios/src/cpp/webgpu/GPUUtils.h +756 -0
  382. package/react/index.d.ts +1 -1
  383. package/utils.d.ts +1 -1
  384. package/utils.js.map +1 -1
  385. package/SVG/Circle.d.ts +0 -11
  386. package/SVG/Circle.js +0 -21
  387. package/SVG/Circle.js.map +0 -1
  388. package/SVG/ClipPath.d.ts +0 -4
  389. package/SVG/ClipPath.js +0 -9
  390. package/SVG/ClipPath.js.map +0 -1
  391. package/SVG/Defs.d.ts +0 -4
  392. package/SVG/Defs.js +0 -9
  393. package/SVG/Defs.js.map +0 -1
  394. package/SVG/Ellipse.d.ts +0 -13
  395. package/SVG/Ellipse.js +0 -26
  396. package/SVG/Ellipse.js.map +0 -1
  397. package/SVG/G.d.ts +0 -7
  398. package/SVG/G.js +0 -9
  399. package/SVG/G.js.map +0 -1
  400. package/SVG/Image.d.ts +0 -11
  401. package/SVG/Image.js +0 -40
  402. package/SVG/Image.js.map +0 -1
  403. package/SVG/Line.d.ts +0 -13
  404. package/SVG/Line.js +0 -26
  405. package/SVG/Line.js.map +0 -1
  406. package/SVG/LinearGradient.d.ts +0 -10
  407. package/SVG/LinearGradient.js +0 -13
  408. package/SVG/LinearGradient.js.map +0 -1
  409. package/SVG/Path.d.ts +0 -7
  410. package/SVG/Path.js +0 -14
  411. package/SVG/Path.js.map +0 -1
  412. package/SVG/Pattern.d.ts +0 -4
  413. package/SVG/Pattern.js +0 -9
  414. package/SVG/Pattern.js.map +0 -1
  415. package/SVG/Polygon.d.ts +0 -7
  416. package/SVG/Polygon.js +0 -14
  417. package/SVG/Polygon.js.map +0 -1
  418. package/SVG/Polyline.d.ts +0 -7
  419. package/SVG/Polyline.js +0 -14
  420. package/SVG/Polyline.js.map +0 -1
  421. package/SVG/Rect.d.ts +0 -8
  422. package/SVG/Rect.js +0 -13
  423. package/SVG/Rect.js.map +0 -1
  424. package/SVG/SVG.d.ts +0 -32
  425. package/SVG/SVG.js +0 -204
  426. package/SVG/SVG.js.map +0 -1
  427. package/SVG/SVGItem.d.ts +0 -5
  428. package/SVG/SVGItem.js +0 -8
  429. package/SVG/SVGItem.js.map +0 -1
  430. package/SVG/Stop.d.ts +0 -5
  431. package/SVG/Stop.js +0 -9
  432. package/SVG/Stop.js.map +0 -1
  433. package/SVG/Symbol.d.ts +0 -4
  434. package/SVG/Symbol.js +0 -9
  435. package/SVG/Symbol.js.map +0 -1
  436. package/SVG/Text.d.ts +0 -14
  437. package/SVG/Text.js +0 -26
  438. package/SVG/Text.js.map +0 -1
  439. package/SVG/Use.d.ts +0 -4
  440. package/SVG/Use.js +0 -9
  441. package/SVG/Use.js.map +0 -1
  442. package/SVG/index.d.ts +0 -18
  443. package/SVG/index.js +0 -19
  444. package/SVG/index.js.map +0 -1
  445. package/angular/fesm2020/nativescript-canvas-angular.mjs +0 -24
  446. package/angular/fesm2020/nativescript-canvas-angular.mjs.map +0 -1
  447. package/platforms/ios/src/cpp/PerIsolateData.cpp +0 -49
  448. package/platforms/ios/src/cpp/PerIsolateData.h +0 -54
  449. package/platforms/ios/src/cpp/URLImpl.cpp +0 -464
  450. package/platforms/ios/src/cpp/URLImpl.h +0 -121
  451. package/typings/objc!CanvasNative.d.ts +0 -2038
  452. package/typings/objc!CanvasNative.js +0 -1
  453. package/typings/objc!CanvasNative.js.map +0 -1
  454. /package/angular/{esm2020 → esm2022}/nativescript-canvas-angular.mjs +0 -0
@@ -0,0 +1,288 @@
1
+ //
2
+ // Created by Osei Fortune on 17/06/2024.
3
+ //
4
+
5
+ #ifndef CANVAS_ANDROID_GPUSUPPORTEDLIMITSIMPL_H
6
+ #define CANVAS_ANDROID_GPUSUPPORTEDLIMITSIMPL_H
7
+
8
+ #include "Helpers.h"
9
+ #include "ObjectWrapperImpl.h"
10
+
11
+ class GPUSupportedLimitsImpl : public ObjectWrapperImpl {
12
+ public:
13
+ explicit GPUSupportedLimitsImpl(CanvasGPUSupportedLimits *limits);
14
+
15
+ ~GPUSupportedLimitsImpl() {
16
+ canvas_native_webgpu_limits_release(this->limits_);
17
+ }
18
+
19
+ CanvasGPUSupportedLimits *GetLimits();
20
+
21
+ static v8::Local<v8::Object> NewInstance(v8::Isolate *isolate, GPUSupportedLimitsImpl *limits) {
22
+ auto context = isolate->GetCurrentContext();
23
+ v8::EscapableHandleScope scope(isolate);
24
+ auto object = GPUSupportedLimitsImpl::GetCtor(isolate)->GetFunction(
25
+ context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
26
+ SetNativeType(limits, NativeType::GPUSupportedLimits);
27
+ object->SetAlignedPointerInInternalField(0, limits);
28
+ limits->BindFinalizer(isolate, object);
29
+ return scope.Escape(object);
30
+ }
31
+
32
+ static void Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate);
33
+
34
+ static GPUSupportedLimitsImpl *GetPointer(v8::Local<v8::Object> object);
35
+
36
+ static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
37
+
38
+ static void Ctor(const v8::FunctionCallbackInfo<v8::Value> &args);
39
+
40
+ static void GetMaxTextureDimension1D(v8::Local<v8::String> property,
41
+ const v8::PropertyCallbackInfo<v8::Value> &info);
42
+
43
+ static void SetMaxTextureDimension1D(v8::Local<v8::String> property,
44
+ v8::Local<v8::Value> value,
45
+ const v8::PropertyCallbackInfo<void> &info);
46
+
47
+ static void GetMaxTextureDimension2D(v8::Local<v8::String> property,
48
+ const v8::PropertyCallbackInfo<v8::Value> &info);
49
+
50
+ static void SetMaxTextureDimension2D(v8::Local<v8::String> property,
51
+ v8::Local<v8::Value> value,
52
+ const v8::PropertyCallbackInfo<void> &info);
53
+
54
+ static void GetMaxTextureDimension3D(v8::Local<v8::String> property,
55
+ const v8::PropertyCallbackInfo<v8::Value> &info);
56
+
57
+ static void SetMaxTextureDimension3D(v8::Local<v8::String> property,
58
+ v8::Local<v8::Value> value,
59
+ const v8::PropertyCallbackInfo<void> &info);
60
+
61
+ static void GetMaxTextureArrayLayers(v8::Local<v8::String> property,
62
+ const v8::PropertyCallbackInfo<v8::Value> &info);
63
+
64
+ static void SetMaxTextureArrayLayers(v8::Local<v8::String> property,
65
+ v8::Local<v8::Value> value,
66
+ const v8::PropertyCallbackInfo<void> &info);
67
+
68
+ static void GetMaxBindGroups(v8::Local<v8::String> property,
69
+ const v8::PropertyCallbackInfo<v8::Value> &info);
70
+
71
+ static void SetMaxBindGroups(v8::Local<v8::String> property,
72
+ v8::Local<v8::Value> value,
73
+ const v8::PropertyCallbackInfo<void> &info);
74
+
75
+ static void GetMaxBindingsPerBindGroup(v8::Local<v8::String> property,
76
+ const v8::PropertyCallbackInfo<v8::Value> &info);
77
+
78
+ static void SetMaxBindingsPerBindGroup(v8::Local<v8::String> property,
79
+ v8::Local<v8::Value> value,
80
+ const v8::PropertyCallbackInfo<void> &info);
81
+
82
+
83
+ static void GetMaxDynamicUniformBuffersPerPipelineLayout(v8::Local<v8::String> property,
84
+ const v8::PropertyCallbackInfo<v8::Value> &info);
85
+
86
+ static void SetMaxDynamicUniformBuffersPerPipelineLayout(v8::Local<v8::String> property,
87
+ v8::Local<v8::Value> value,
88
+ const v8::PropertyCallbackInfo<void> &info);
89
+
90
+ static void GetMaxDynamicStorageBuffersPerPipelineLayout(v8::Local<v8::String> property,
91
+ const v8::PropertyCallbackInfo<v8::Value> &info);
92
+
93
+ static void SetMaxDynamicStorageBuffersPerPipelineLayout(v8::Local<v8::String> property,
94
+ v8::Local<v8::Value> value,
95
+ const v8::PropertyCallbackInfo<void> &info);
96
+
97
+ static void GetMaxSampledTexturesPerShaderStage(v8::Local<v8::String> property,
98
+ const v8::PropertyCallbackInfo<v8::Value> &info);
99
+
100
+ static void SetMaxSampledTexturesPerShaderStage(v8::Local<v8::String> property,
101
+ v8::Local<v8::Value> value,
102
+ const v8::PropertyCallbackInfo<void> &info);
103
+
104
+ static void GetMaxSamplersPerShaderStage(v8::Local<v8::String> property,
105
+ const v8::PropertyCallbackInfo<v8::Value> &info);
106
+
107
+ static void SetMaxSamplersPerShaderStage(v8::Local<v8::String> property,
108
+ v8::Local<v8::Value> value,
109
+ const v8::PropertyCallbackInfo<void> &info);
110
+
111
+
112
+ static void GetMaxStorageBuffersPerShaderStage(v8::Local<v8::String> property,
113
+ const v8::PropertyCallbackInfo<v8::Value> &info);
114
+
115
+ static void SetMaxStorageBuffersPerShaderStage(v8::Local<v8::String> property,
116
+ v8::Local<v8::Value> value,
117
+ const v8::PropertyCallbackInfo<void> &info);
118
+
119
+ static void GetMaxStorageTexturesPerShaderStage(v8::Local<v8::String> property,
120
+ const v8::PropertyCallbackInfo<v8::Value> &info);
121
+
122
+ static void SetMaxStorageTexturesPerShaderStage(v8::Local<v8::String> property,
123
+ v8::Local<v8::Value> value,
124
+ const v8::PropertyCallbackInfo<void> &info);
125
+
126
+ static void GetMaxUniformBuffersPerShaderStage(v8::Local<v8::String> property,
127
+ const v8::PropertyCallbackInfo<v8::Value> &info);
128
+
129
+ static void SetMaxUniformBuffersPerShaderStage(v8::Local<v8::String> property,
130
+ v8::Local<v8::Value> value,
131
+ const v8::PropertyCallbackInfo<void> &info);
132
+
133
+ static void GetMaxUniformBufferBindingSize(v8::Local<v8::String> property,
134
+ const v8::PropertyCallbackInfo<v8::Value> &info);
135
+
136
+ static void SetMaxUniformBufferBindingSize(v8::Local<v8::String> property,
137
+ v8::Local<v8::Value> value,
138
+ const v8::PropertyCallbackInfo<void> &info);
139
+
140
+ static void GetMaxStorageBufferBindingSize(v8::Local<v8::String> property,
141
+ const v8::PropertyCallbackInfo<v8::Value> &info);
142
+
143
+ static void SetMaxStorageBufferBindingSize(v8::Local<v8::String> property,
144
+ v8::Local<v8::Value> value,
145
+ const v8::PropertyCallbackInfo<void> &info);
146
+
147
+ static void GetMaxVertexBuffers(v8::Local<v8::String> property,
148
+ const v8::PropertyCallbackInfo<v8::Value> &info);
149
+
150
+ static void SetMaxVertexBuffers(v8::Local<v8::String> property,
151
+ v8::Local<v8::Value> value,
152
+ const v8::PropertyCallbackInfo<void> &info);
153
+
154
+ static void GetMaxBufferSize(v8::Local<v8::String> property,
155
+ const v8::PropertyCallbackInfo<v8::Value> &info);
156
+
157
+ static void SetMaxBufferSize(v8::Local<v8::String> property,
158
+ v8::Local<v8::Value> value,
159
+ const v8::PropertyCallbackInfo<void> &info);
160
+
161
+ static void GetMaxVertexAttributes(v8::Local<v8::String> property,
162
+ const v8::PropertyCallbackInfo<v8::Value> &info);
163
+
164
+ static void SetMaxVertexAttributes(v8::Local<v8::String> property,
165
+ v8::Local<v8::Value> value,
166
+ const v8::PropertyCallbackInfo<void> &info);
167
+
168
+ static void GetMaxVertexBufferArrayStride(v8::Local<v8::String> property,
169
+ const v8::PropertyCallbackInfo<v8::Value> &info);
170
+
171
+ static void SetMaxVertexBufferArrayStride(v8::Local<v8::String> property,
172
+ v8::Local<v8::Value> value,
173
+ const v8::PropertyCallbackInfo<void> &info);
174
+
175
+ static void GetMinUniformBufferOffsetAlignment(v8::Local<v8::String> property,
176
+ const v8::PropertyCallbackInfo<v8::Value> &info);
177
+
178
+ static void SetMinUniformBufferOffsetAlignment(v8::Local<v8::String> property,
179
+ v8::Local<v8::Value> value,
180
+ const v8::PropertyCallbackInfo<void> &info);
181
+
182
+ static void GetMinStorageBufferOffsetAlignment(v8::Local<v8::String> property,
183
+ const v8::PropertyCallbackInfo<v8::Value> &info);
184
+
185
+ static void SetMinStorageBufferOffsetAlignment(v8::Local<v8::String> property,
186
+ v8::Local<v8::Value> value,
187
+ const v8::PropertyCallbackInfo<void> &info);
188
+
189
+ static void GetMaxInterStageShaderComponents(v8::Local<v8::String> property,
190
+ const v8::PropertyCallbackInfo<v8::Value> &info);
191
+
192
+ static void SetMaxInterStageShaderComponents(v8::Local<v8::String> property,
193
+ v8::Local<v8::Value> value,
194
+ const v8::PropertyCallbackInfo<void> &info);
195
+
196
+ static void GetMaxColorAttachments(v8::Local<v8::String> property,
197
+ const v8::PropertyCallbackInfo<v8::Value> &info);
198
+
199
+ static void SetMaxColorAttachments(v8::Local<v8::String> property,
200
+ v8::Local<v8::Value> value,
201
+ const v8::PropertyCallbackInfo<void> &info);
202
+
203
+ static void GetMaxColorAttachmentBytesPerSample(v8::Local<v8::String> property,
204
+ const v8::PropertyCallbackInfo<v8::Value> &info);
205
+
206
+ static void SetMaxColorAttachmentBytesPerSample(v8::Local<v8::String> property,
207
+ v8::Local<v8::Value> value,
208
+ const v8::PropertyCallbackInfo<void> &info);
209
+
210
+ static void GetMaxComputeWorkgroupStorageSize(v8::Local<v8::String> property,
211
+ const v8::PropertyCallbackInfo<v8::Value> &info);
212
+
213
+ static void SetMaxComputeWorkgroupStorageSize(v8::Local<v8::String> property,
214
+ v8::Local<v8::Value> value,
215
+ const v8::PropertyCallbackInfo<void> &info);
216
+
217
+ static void GetMaxComputeInvocationsPerWorkgroup(v8::Local<v8::String> property,
218
+ const v8::PropertyCallbackInfo<v8::Value> &info);
219
+
220
+
221
+ static void SetMaxComputeInvocationsPerWorkgroup(v8::Local<v8::String> property,
222
+ v8::Local<v8::Value> value,
223
+ const v8::PropertyCallbackInfo<void> &info);
224
+
225
+ static void GetMaxComputeWorkgroupSizeX(v8::Local<v8::String> property,
226
+ const v8::PropertyCallbackInfo<v8::Value> &info);
227
+
228
+ static void SetMaxComputeWorkgroupSizeX(v8::Local<v8::String> property,
229
+ v8::Local<v8::Value> value,
230
+ const v8::PropertyCallbackInfo<void> &info);
231
+
232
+ static void GetMaxComputeWorkgroupSizeY(v8::Local<v8::String> property,
233
+ const v8::PropertyCallbackInfo<v8::Value> &info);
234
+
235
+ static void SetMaxComputeWorkgroupSizeY(v8::Local<v8::String> property,
236
+ v8::Local<v8::Value> value,
237
+ const v8::PropertyCallbackInfo<void> &info);
238
+
239
+ static void GetMaxComputeWorkgroupSizeZ(v8::Local<v8::String> property,
240
+ const v8::PropertyCallbackInfo<v8::Value> &info);
241
+
242
+ static void SetMaxComputeWorkgroupSizeZ(v8::Local<v8::String> property,
243
+ v8::Local<v8::Value> value,
244
+ const v8::PropertyCallbackInfo<void> &info);
245
+
246
+ static void GetMaxComputeWorkgroupsPerDimension(v8::Local<v8::String> property,
247
+ const v8::PropertyCallbackInfo<v8::Value> &info);
248
+
249
+ static void SetMaxComputeWorkgroupsPerDimension(v8::Local<v8::String> property,
250
+ v8::Local<v8::Value> value,
251
+ const v8::PropertyCallbackInfo<void> &info);
252
+
253
+ static void GetMinSubgroupSize(v8::Local<v8::String> property,
254
+ const v8::PropertyCallbackInfo<v8::Value> &info);
255
+
256
+ static void SetMinSubgroupSize(v8::Local<v8::String> property,
257
+ v8::Local<v8::Value> value,
258
+ const v8::PropertyCallbackInfo<void> &info);
259
+
260
+ static void GetMaxSubgroupSize(v8::Local<v8::String> property,
261
+ const v8::PropertyCallbackInfo<v8::Value> &info);
262
+
263
+ static void SetMaxSubgroupSize(v8::Local<v8::String> property,
264
+ v8::Local<v8::Value> value,
265
+ const v8::PropertyCallbackInfo<void> &info);
266
+
267
+ static void GetMaxPushConstantSize(v8::Local<v8::String> property,
268
+ const v8::PropertyCallbackInfo<v8::Value> &info);
269
+
270
+
271
+ static void SetMaxPushConstantSize(v8::Local<v8::String> property,
272
+ v8::Local<v8::Value> value,
273
+ const v8::PropertyCallbackInfo<void> &info);
274
+
275
+ static void GetMaxNonSamplerBindings(v8::Local<v8::String> property,
276
+ const v8::PropertyCallbackInfo<v8::Value> &info);
277
+
278
+
279
+ static void SetMaxNonSamplerBindings(v8::Local<v8::String> property,
280
+ v8::Local<v8::Value> value,
281
+ const v8::PropertyCallbackInfo<void> &info);
282
+
283
+ private:
284
+ CanvasGPUSupportedLimits *limits_;
285
+ };
286
+
287
+
288
+ #endif //CANVAS_ANDROID_GPUSUPPORTEDLIMITSIMPL_H
@@ -0,0 +1,386 @@
1
+ //
2
+ // Created by Osei Fortune on 21/06/2024.
3
+ //
4
+
5
+ #include "GPUTextureImpl.h"
6
+ #include "Caches.h"
7
+ #include "GPUTextureViewImpl.h"
8
+ #include "GPULabel.h"
9
+
10
+ GPUTextureImpl::GPUTextureImpl(const CanvasGPUTexture *texture) : texture_(texture) {}
11
+
12
+ const CanvasGPUTexture *GPUTextureImpl::GetTexture() {
13
+ return this->texture_;
14
+ }
15
+
16
+
17
+ void GPUTextureImpl::Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate) {
18
+ v8::Locker locker(isolate);
19
+ v8::Isolate::Scope isolate_scope(isolate);
20
+ v8::HandleScope handle_scope(isolate);
21
+
22
+ auto ctor = GetCtor(isolate);
23
+ auto context = isolate->GetCurrentContext();
24
+ auto func = ctor->GetFunction(context).ToLocalChecked();
25
+
26
+ canvasModule->Set(context, ConvertToV8String(isolate, "GPUTexture"), func).FromJust();
27
+ }
28
+
29
+ GPUTextureImpl *GPUTextureImpl::GetPointer(const v8::Local<v8::Object> &object) {
30
+ auto ptr = object->GetAlignedPointerFromInternalField(0);
31
+ if (ptr == nullptr) {
32
+ return nullptr;
33
+ }
34
+ return static_cast<GPUTextureImpl *>(ptr);
35
+ }
36
+
37
+ v8::Local<v8::FunctionTemplate> GPUTextureImpl::GetCtor(v8::Isolate *isolate) {
38
+ auto cache = Caches::Get(isolate);
39
+ auto ctor = cache->GPUTextureTmpl.get();
40
+ if (ctor != nullptr) {
41
+ return ctor->Get(isolate);
42
+ }
43
+
44
+ v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate);
45
+ ctorTmpl->InstanceTemplate()->SetInternalFieldCount(2);
46
+ ctorTmpl->SetClassName(ConvertToV8String(isolate, "GPUTexture"));
47
+
48
+ auto tmpl = ctorTmpl->InstanceTemplate();
49
+ tmpl->SetInternalFieldCount(2);
50
+
51
+ tmpl->SetLazyDataProperty(
52
+ ConvertToV8String(isolate, "label"),
53
+ GetLabel
54
+ );
55
+
56
+ tmpl->Set(
57
+ ConvertToV8String(isolate, "destroy"),
58
+ v8::FunctionTemplate::New(isolate, &Destroy));
59
+
60
+
61
+ tmpl->SetLazyDataProperty(
62
+ ConvertToV8String(isolate, "width"),
63
+ GetWidth
64
+ );
65
+
66
+
67
+ tmpl->SetLazyDataProperty(
68
+ ConvertToV8String(isolate, "height"),
69
+ GetHeight
70
+ );
71
+
72
+ tmpl->SetLazyDataProperty(
73
+ ConvertToV8String(isolate, "format"),
74
+ GetFormat
75
+ );
76
+
77
+ tmpl->SetLazyDataProperty(
78
+ ConvertToV8String(isolate, "usage"),
79
+ GetUsage
80
+ );
81
+
82
+
83
+ tmpl->SetLazyDataProperty(
84
+ ConvertToV8String(isolate, "depthOrArrayLayers"),
85
+ GetDepthOrArrayLayers
86
+ );
87
+
88
+
89
+ tmpl->SetLazyDataProperty(
90
+ ConvertToV8String(isolate, "dimension"),
91
+ GetDimension
92
+ );
93
+
94
+
95
+ tmpl->SetLazyDataProperty(
96
+ ConvertToV8String(isolate, "sampleCount"),
97
+ GetSampleCount
98
+ );
99
+
100
+
101
+ tmpl->SetLazyDataProperty(
102
+ ConvertToV8String(isolate, "mipLevelCount"),
103
+ GetMipLevelCount
104
+ );
105
+
106
+ tmpl->Set(
107
+ ConvertToV8String(isolate, "createView"),
108
+ v8::FunctionTemplate::New(isolate, &CreateView));
109
+
110
+ cache->GPUTextureTmpl =
111
+ std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
112
+ return ctorTmpl;
113
+ }
114
+
115
+
116
+ void
117
+ GPUTextureImpl::GetLabel(v8::Local<v8::Name> name,
118
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
119
+ auto ptr = GetPointer(info.This());
120
+ if (ptr != nullptr) {
121
+ auto label = canvas_native_webgpu_texture_get_label(ptr->texture_);
122
+ if (label == nullptr) {
123
+ info.GetReturnValue().SetEmptyString();
124
+ return;
125
+ }
126
+ info.GetReturnValue().Set(
127
+ ConvertToV8String(info.GetIsolate(), label)
128
+ );
129
+ canvas_native_string_destroy(label);
130
+ return;
131
+ }
132
+
133
+ info.GetReturnValue().SetEmptyString();
134
+ }
135
+
136
+ void
137
+ GPUTextureImpl::GetDimension(v8::Local<v8::Name> name,
138
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
139
+ auto ptr = GetPointer(info.This());
140
+ if (ptr != nullptr) {
141
+ auto width = canvas_native_webgpu_texture_get_dimension(ptr->GetTexture());
142
+ auto isolate = info.GetIsolate();
143
+ switch (width) {
144
+ case CanvasTextureDimensionD1:
145
+ info.GetReturnValue().Set(ConvertToV8String(isolate, "1d"));
146
+ break;
147
+ case CanvasTextureDimensionD2:
148
+ info.GetReturnValue().Set(ConvertToV8String(isolate, "2d"));
149
+ break;
150
+ case CanvasTextureDimensionD3:
151
+ info.GetReturnValue().Set(ConvertToV8String(isolate, "3d"));
152
+ break;
153
+ }
154
+
155
+ return;
156
+ }
157
+ }
158
+
159
+
160
+ void
161
+ GPUTextureImpl::GetWidth(v8::Local<v8::Name> name,
162
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
163
+ auto ptr = GetPointer(info.This());
164
+ if (ptr != nullptr) {
165
+ auto width = canvas_native_webgpu_texture_get_width(ptr->GetTexture());
166
+ info.GetReturnValue().Set(width);
167
+ return;
168
+ }
169
+ info.GetReturnValue().Set(0);
170
+ }
171
+
172
+
173
+ void
174
+ GPUTextureImpl::GetHeight(v8::Local<v8::Name> name,
175
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
176
+ auto ptr = GetPointer(info.This());
177
+ if (ptr != nullptr) {
178
+ auto value = canvas_native_webgpu_texture_get_height(ptr->GetTexture());
179
+ info.GetReturnValue().Set(value);
180
+ return;
181
+ }
182
+ info.GetReturnValue().Set(0);
183
+ }
184
+
185
+ void
186
+ GPUTextureImpl::GetDepthOrArrayLayers(v8::Local<v8::Name> name,
187
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
188
+ auto ptr = GetPointer(info.This());
189
+ if (ptr != nullptr) {
190
+ auto value = canvas_native_webgpu_texture_get_depth_or_array_layers(ptr->GetTexture());
191
+ info.GetReturnValue().Set(value);
192
+ return;
193
+ }
194
+ info.GetReturnValue().Set(0);
195
+ }
196
+
197
+
198
+ void
199
+ GPUTextureImpl::GetUsage(v8::Local<v8::Name> name,
200
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
201
+ auto ptr = GetPointer(info.This());
202
+ if (ptr != nullptr) {
203
+ auto value = canvas_native_webgpu_texture_get_usage(ptr->GetTexture());
204
+ info.GetReturnValue().Set(value);
205
+ return;
206
+ }
207
+ info.GetReturnValue().Set(0);
208
+ }
209
+
210
+
211
+ void
212
+ GPUTextureImpl::GetFormat(v8::Local<v8::Name> name,
213
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
214
+ auto ptr = GetPointer(info.This());
215
+ if (ptr != nullptr) {
216
+ auto isolate = info.GetIsolate();
217
+ auto value = canvas_native_webgpu_texture_get_format(ptr->GetTexture());
218
+ auto str = canvas_native_webgpu_enum_gpu_texture_to_string(value);
219
+ info.GetReturnValue().Set(ConvertToV8String(isolate, str));
220
+ return;
221
+ }
222
+ info.GetReturnValue().Set(0);
223
+ }
224
+
225
+ void
226
+ GPUTextureImpl::GetSampleCount(v8::Local<v8::Name> name,
227
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
228
+ auto ptr = GetPointer(info.This());
229
+ if (ptr != nullptr) {
230
+ auto value = canvas_native_webgpu_texture_get_sample_count(ptr->GetTexture());
231
+ info.GetReturnValue().Set(value);
232
+ return;
233
+ }
234
+ info.GetReturnValue().Set(0);
235
+ }
236
+
237
+ void
238
+ GPUTextureImpl::GetMipLevelCount(v8::Local<v8::Name> name,
239
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
240
+ auto ptr = GetPointer(info.This());
241
+ if (ptr != nullptr) {
242
+ auto value = canvas_native_webgpu_texture_get_mip_level_count(ptr->GetTexture());
243
+ info.GetReturnValue().Set(value);
244
+ return;
245
+ }
246
+ info.GetReturnValue().Set(0);
247
+ }
248
+
249
+
250
+ void GPUTextureImpl::Destroy(const v8::FunctionCallbackInfo<v8::Value> &args) {
251
+ GPUTextureImpl *ptr = GetPointer(args.This());
252
+ if (ptr == nullptr) {
253
+ return;
254
+ }
255
+ canvas_native_webgpu_texture_destroy(ptr->GetTexture());
256
+ }
257
+
258
+
259
+ void GPUTextureImpl::CreateView(const v8::FunctionCallbackInfo<v8::Value> &args) {
260
+ GPUTextureImpl *ptr = GetPointer(args.This());
261
+ if (ptr == nullptr) {
262
+ args.GetReturnValue().SetUndefined();
263
+ return;
264
+ }
265
+ auto isolate = args.GetIsolate();
266
+ auto context = isolate->GetCurrentContext();
267
+
268
+ auto descVal = args[0];
269
+
270
+ CanvasCreateTextureViewDescriptor *descriptor = nullptr;
271
+
272
+ CanvasTextureAspect aspect = CanvasTextureAspectAll;
273
+
274
+ CanvasImageSubresourceRange range = {
275
+ aspect, 0, -1, 0, -1
276
+ };
277
+
278
+ GPULabel label;
279
+
280
+ if (descVal->IsObject()) {
281
+ descriptor = new CanvasCreateTextureViewDescriptor{};
282
+ descriptor->label = nullptr;
283
+ auto descObj = descVal.As<v8::Object>();
284
+
285
+ v8::Local<v8::Value> aspectVal;
286
+
287
+ if (descObj->Get(context, ConvertToV8String(isolate, "aspect")).ToLocal(&aspectVal)) {
288
+ auto aspectStr = ConvertFromV8String(isolate, aspectVal);
289
+ if (aspectStr == "all") {
290
+ aspect = CanvasTextureAspectAll;
291
+ } else if (aspectStr == "stencil-only") {
292
+ aspect = CanvasTextureAspectStencilOnly;
293
+ } else if (aspectStr == "depth-only") {
294
+ aspect = CanvasTextureAspectDepthOnly;
295
+ }
296
+ }
297
+
298
+
299
+ v8::Local<v8::Value> arrayLayerCountVal;
300
+ if (descObj->Get(context, ConvertToV8String(isolate, "arrayLayerCount")).ToLocal(
301
+ &arrayLayerCountVal) && arrayLayerCountVal->IsInt32()) {
302
+ range.array_layer_count = arrayLayerCountVal->Int32Value(context).FromJust();
303
+ }
304
+
305
+ v8::Local<v8::Value> mipLevelCountVal;
306
+ if (descObj->Get(context, ConvertToV8String(isolate, "mipLevelCount")).ToLocal(
307
+ &mipLevelCountVal) && mipLevelCountVal->IsInt32()) {
308
+ range.mip_level_count = mipLevelCountVal->Int32Value(context).FromJust();
309
+ }
310
+
311
+ v8::Local<v8::Value> baseArrayLayerVal;
312
+ if (descObj->Get(context, ConvertToV8String(isolate, "baseArrayLayer")).ToLocal(
313
+ &baseArrayLayerVal) && baseArrayLayerVal->IsUint32()) {
314
+ range.base_array_layer = baseArrayLayerVal->Uint32Value(context).FromJust();
315
+ }
316
+
317
+ v8::Local<v8::Value> baseMipLevelVal;
318
+ if (descObj->Get(context, ConvertToV8String(isolate, "baseMipLevel")).ToLocal(
319
+ &baseMipLevelVal) && baseMipLevelVal->IsUint32()) {
320
+ range.base_mip_level = baseMipLevelVal->Uint32Value(context).FromJust();
321
+ }
322
+
323
+ descriptor->range = &range;
324
+
325
+
326
+ v8::Local<v8::Value> formatVal;
327
+ descObj->Get(context, ConvertToV8String(isolate, "format")).ToLocal(&formatVal);
328
+ auto formatStr = ConvertFromV8String(isolate, formatVal);
329
+
330
+ descriptor->format = CanvasOptionalGPUTextureFormat{
331
+ CanvasOptionalGPUTextureFormatNone
332
+ };
333
+
334
+ if (!formatStr.empty()) {
335
+ auto format = canvas_native_webgpu_enum_string_to_gpu_texture(formatStr.c_str());
336
+ descriptor->format = format;
337
+ }
338
+
339
+ auto dimension = CanvasOptionalTextureViewDimensionNone;
340
+
341
+
342
+ v8::Local<v8::Value> labelVal;
343
+ descObj->Get(context, ConvertToV8String(isolate, "label")).ToLocal(&labelVal);
344
+
345
+ label = GPULabel(isolate, labelVal);
346
+
347
+ descriptor->label = *label;
348
+
349
+ v8::Local<v8::Value> dimensionVal;
350
+ if (descObj->Get(context, ConvertToV8String(isolate, "dimension")).ToLocal(&dimensionVal)) {
351
+ auto dimensionStr = ConvertFromV8String(isolate, dimensionVal);
352
+ if (dimensionStr == "1d") {
353
+ dimension = CanvasOptionalTextureViewDimensionD1;
354
+ } else if (dimensionStr == "2d") {
355
+ dimension = CanvasOptionalTextureViewDimensionD2;
356
+ } else if (dimensionStr == "2d-array") {
357
+ dimension = CanvasOptionalTextureViewDimensionD2Array;
358
+ } else if (dimensionStr == "cube") {
359
+ dimension = CanvasOptionalTextureViewDimensionCube;
360
+ } else if (dimensionStr == "cube-array") {
361
+ dimension = CanvasOptionalTextureViewDimensionCubeArray;
362
+ } else if (dimensionStr == "3d") {
363
+ dimension = CanvasOptionalTextureViewDimensionD3;
364
+ }
365
+ }
366
+
367
+ descriptor->dimension = dimension;
368
+
369
+
370
+ }
371
+ auto view = canvas_native_webgpu_texture_create_texture_view(ptr->GetTexture(), descriptor);
372
+
373
+ if (descriptor != nullptr) {
374
+ delete descriptor;
375
+ descriptor = nullptr;
376
+ }
377
+
378
+ if (view != nullptr) {
379
+ auto ret = GPUTextureViewImpl::NewInstance(isolate, new GPUTextureViewImpl(view));
380
+ args.GetReturnValue().Set(ret);
381
+ return;
382
+ }
383
+
384
+ args.GetReturnValue().SetUndefined();
385
+
386
+ }