@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,1304 @@
1
+ //
2
+ // Created by Osei Fortune on 17/06/2024.
3
+ //
4
+
5
+ #include "GPUSupportedLimitsImpl.h"
6
+ #include "Caches.h"
7
+
8
+ GPUSupportedLimitsImpl::GPUSupportedLimitsImpl(CanvasGPUSupportedLimits *limits) : limits_(
9
+ limits) {}
10
+
11
+ CanvasGPUSupportedLimits *GPUSupportedLimitsImpl::GetLimits() {
12
+ return this->limits_;
13
+ }
14
+
15
+
16
+ void GPUSupportedLimitsImpl::Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate) {
17
+ v8::Locker locker(isolate);
18
+ v8::Isolate::Scope isolate_scope(isolate);
19
+ v8::HandleScope handle_scope(isolate);
20
+
21
+ auto ctor = GetCtor(isolate);
22
+ auto context = isolate->GetCurrentContext();
23
+ auto func = ctor->GetFunction(context).ToLocalChecked();
24
+
25
+ canvasModule->Set(context, ConvertToV8String(isolate, "GPUSupportedLimits"), func).FromJust();
26
+ }
27
+
28
+ GPUSupportedLimitsImpl *GPUSupportedLimitsImpl::GetPointer(v8::Local<v8::Object> object) {
29
+ auto ptr = object->GetAlignedPointerFromInternalField(0);
30
+ if (ptr == nullptr) {
31
+ return nullptr;
32
+ }
33
+ return static_cast<GPUSupportedLimitsImpl *>(ptr);
34
+ }
35
+
36
+ v8::Local<v8::FunctionTemplate> GPUSupportedLimitsImpl::GetCtor(v8::Isolate *isolate) {
37
+ auto cache = Caches::Get(isolate);
38
+ auto ctor = cache->GPUSupportedLimitsTmpl.get();
39
+ if (ctor != nullptr) {
40
+ return ctor->Get(isolate);
41
+ }
42
+
43
+ v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate, Ctor);
44
+ ctorTmpl->InstanceTemplate()->SetInternalFieldCount(2);
45
+ ctorTmpl->SetClassName(ConvertToV8String(isolate, "GPUSupportedLimits"));
46
+
47
+ auto tmpl = ctorTmpl->InstanceTemplate();
48
+ tmpl->SetInternalFieldCount(2);
49
+
50
+ tmpl->SetAccessor(
51
+ ConvertToV8String(isolate, "maxTextureDimension1D"),
52
+ GetMaxTextureDimension1D,
53
+ SetMaxTextureDimension1D
54
+ );
55
+
56
+ tmpl->SetAccessor(
57
+ ConvertToV8String(isolate, "maxTextureDimension2D"),
58
+ GetMaxTextureDimension2D,
59
+ SetMaxTextureDimension2D
60
+ );
61
+
62
+ tmpl->SetAccessor(
63
+ ConvertToV8String(isolate, "maxTextureDimension3D"),
64
+ GetMaxTextureDimension3D,
65
+ SetMaxTextureDimension3D
66
+ );
67
+
68
+ tmpl->SetAccessor(
69
+ ConvertToV8String(isolate, "maxTextureArrayLayers"),
70
+ GetMaxTextureArrayLayers,
71
+ SetMaxTextureArrayLayers
72
+ );
73
+
74
+ tmpl->SetAccessor(
75
+ ConvertToV8String(isolate, "maxBindGroups"),
76
+ GetMaxBindGroups,
77
+ SetMaxBindGroups
78
+ );
79
+
80
+ tmpl->SetAccessor(
81
+ ConvertToV8String(isolate, "maxBindingsPerBindGroup"),
82
+ GetMaxBindingsPerBindGroup,
83
+ SetMaxBindingsPerBindGroup
84
+ );
85
+
86
+ tmpl->SetAccessor(
87
+ ConvertToV8String(isolate, "maxDynamicUniformBuffersPerPipelineLayout"),
88
+ GetMaxDynamicUniformBuffersPerPipelineLayout,
89
+ SetMaxDynamicUniformBuffersPerPipelineLayout
90
+ );
91
+
92
+
93
+ tmpl->SetAccessor(
94
+ ConvertToV8String(isolate, "maxDynamicStorageBuffersPerPipelineLayout"),
95
+ GetMaxDynamicStorageBuffersPerPipelineLayout,
96
+ SetMaxDynamicStorageBuffersPerPipelineLayout
97
+ );
98
+
99
+
100
+ tmpl->SetAccessor(
101
+ ConvertToV8String(isolate, "maxSampledTexturesPerShaderStage"),
102
+ GetMaxSampledTexturesPerShaderStage,
103
+ SetMaxSampledTexturesPerShaderStage
104
+ );
105
+
106
+
107
+ tmpl->SetAccessor(
108
+ ConvertToV8String(isolate, "maxSamplersPerShaderStage"),
109
+ GetMaxSamplersPerShaderStage,
110
+ SetMaxSamplersPerShaderStage
111
+ );
112
+
113
+ tmpl->SetAccessor(
114
+ ConvertToV8String(isolate, "maxStorageBuffersPerShaderStage"),
115
+ GetMaxStorageBuffersPerShaderStage,
116
+ SetMaxStorageBuffersPerShaderStage
117
+ );
118
+
119
+
120
+ tmpl->SetAccessor(
121
+ ConvertToV8String(isolate, "maxStorageTexturesPerShaderStage"),
122
+ GetMaxStorageTexturesPerShaderStage,
123
+ SetMaxStorageTexturesPerShaderStage
124
+ );
125
+
126
+
127
+ tmpl->SetAccessor(
128
+ ConvertToV8String(isolate, "maxUniformBuffersPerShaderStage"),
129
+ GetMaxUniformBuffersPerShaderStage,
130
+ SetMaxUniformBuffersPerShaderStage
131
+ );
132
+
133
+ tmpl->SetAccessor(
134
+ ConvertToV8String(isolate, "maxUniformBufferBindingSize"),
135
+ GetMaxUniformBufferBindingSize,
136
+ SetMaxUniformBufferBindingSize
137
+ );
138
+
139
+ tmpl->SetAccessor(
140
+ ConvertToV8String(isolate, "maxStorageBufferBindingSize"),
141
+ GetMaxStorageBufferBindingSize,
142
+ SetMaxStorageBufferBindingSize
143
+ );
144
+
145
+
146
+ tmpl->SetAccessor(
147
+ ConvertToV8String(isolate, "maxVertexBuffers"),
148
+ GetMaxVertexBuffers,
149
+ SetMaxVertexBuffers
150
+ );
151
+
152
+
153
+ tmpl->SetAccessor(
154
+ ConvertToV8String(isolate, "maxBufferSize"),
155
+ GetMaxBufferSize,
156
+ SetMaxBufferSize
157
+ );
158
+
159
+ tmpl->SetAccessor(
160
+ ConvertToV8String(isolate, "maxVertexAttributes"),
161
+ GetMaxVertexAttributes,
162
+ SetMaxVertexAttributes
163
+ );
164
+
165
+ tmpl->SetAccessor(
166
+ ConvertToV8String(isolate, "maxVertexBufferArrayStride"),
167
+ GetMaxVertexBufferArrayStride,
168
+ SetMaxVertexBufferArrayStride
169
+ );
170
+
171
+
172
+ tmpl->SetAccessor(
173
+ ConvertToV8String(isolate, "minUniformBufferOffsetAlignment"),
174
+ GetMinUniformBufferOffsetAlignment,
175
+ SetMinUniformBufferOffsetAlignment
176
+ );
177
+
178
+
179
+ tmpl->SetAccessor(
180
+ ConvertToV8String(isolate, "minStorageBufferOffsetAlignment"),
181
+ GetMinStorageBufferOffsetAlignment,
182
+ SetMinStorageBufferOffsetAlignment
183
+ );
184
+
185
+ tmpl->SetAccessor(
186
+ ConvertToV8String(isolate, "maxInterStageShaderComponents"),
187
+ GetMaxInterStageShaderComponents,
188
+ SetMaxInterStageShaderComponents
189
+ );
190
+
191
+ tmpl->SetAccessor(
192
+ ConvertToV8String(isolate, "maxColorAttachments"),
193
+ GetMaxColorAttachments,
194
+ SetMaxColorAttachments
195
+ );
196
+
197
+ tmpl->SetAccessor(
198
+ ConvertToV8String(isolate, "maxColorAttachmentBytesPerSample"),
199
+ GetMaxColorAttachmentBytesPerSample,
200
+ SetMaxColorAttachmentBytesPerSample
201
+ );
202
+
203
+ tmpl->SetAccessor(
204
+ ConvertToV8String(isolate, "maxComputeWorkgroupStorageSize"),
205
+ GetMaxComputeWorkgroupStorageSize,
206
+ SetMaxComputeWorkgroupStorageSize
207
+ );
208
+
209
+ tmpl->SetAccessor(
210
+ ConvertToV8String(isolate, "maxComputeInvocationsPerWorkgroup"),
211
+ GetMaxComputeInvocationsPerWorkgroup,
212
+ SetMaxComputeInvocationsPerWorkgroup
213
+ );
214
+
215
+ tmpl->SetAccessor(
216
+ ConvertToV8String(isolate, "maxComputeWorkgroupSizeX"),
217
+ GetMaxComputeWorkgroupSizeX,
218
+ SetMaxComputeWorkgroupSizeX
219
+ );
220
+
221
+
222
+ tmpl->SetAccessor(
223
+ ConvertToV8String(isolate, "maxComputeWorkgroupSizeY"),
224
+ GetMaxComputeWorkgroupSizeY,
225
+ SetMaxComputeWorkgroupSizeY
226
+ );
227
+
228
+
229
+ tmpl->SetAccessor(
230
+ ConvertToV8String(isolate, "maxComputeWorkgroupSizeZ"),
231
+ GetMaxComputeWorkgroupSizeZ,
232
+ SetMaxComputeWorkgroupSizeZ
233
+ );
234
+
235
+ tmpl->SetAccessor(
236
+ ConvertToV8String(isolate, "maxComputeWorkgroupsPerDimension"),
237
+ GetMaxComputeWorkgroupsPerDimension,
238
+ SetMaxComputeWorkgroupsPerDimension
239
+ );
240
+
241
+
242
+ tmpl->SetAccessor(
243
+ ConvertToV8String(isolate, "minSubgroupSize"),
244
+ GetMinSubgroupSize,
245
+ SetMinSubgroupSize
246
+ );
247
+
248
+ tmpl->SetAccessor(
249
+ ConvertToV8String(isolate, "maxSubgroupSize"),
250
+ GetMaxSubgroupSize,
251
+ SetMaxSubgroupSize
252
+ );
253
+
254
+
255
+ tmpl->SetAccessor(
256
+ ConvertToV8String(isolate, "maxPushConstantSize"),
257
+ GetMaxPushConstantSize,
258
+ SetMaxPushConstantSize
259
+ );
260
+
261
+
262
+ tmpl->SetAccessor(
263
+ ConvertToV8String(isolate, "maxNonSamplerBindings"),
264
+ GetMaxNonSamplerBindings,
265
+ SetMaxNonSamplerBindings
266
+ );
267
+
268
+
269
+ cache->GPUSupportedLimitsTmpl =
270
+ std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
271
+ return ctorTmpl;
272
+ }
273
+
274
+ void GPUSupportedLimitsImpl::Ctor(const v8::FunctionCallbackInfo<v8::Value> &args) {
275
+ auto isolate = args.GetIsolate();
276
+
277
+ auto ret = args.This();
278
+
279
+ auto limits = canvas_native_webgpu_create_limits();
280
+ auto object = new GPUSupportedLimitsImpl(limits);
281
+
282
+ ret->SetAlignedPointerInInternalField(0, object);
283
+
284
+ SetNativeType(object, NativeType::GPUSupportedLimits);
285
+
286
+ object->BindFinalizer(isolate, ret);
287
+
288
+ args.GetReturnValue().Set(ret);
289
+ return;
290
+ }
291
+
292
+ void GPUSupportedLimitsImpl::GetMaxTextureDimension1D(v8::Local<v8::String> property,
293
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
294
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
295
+ if (ptr == nullptr) {
296
+ // return default ??
297
+ info.GetReturnValue().Set(8192);
298
+ return;
299
+ }
300
+
301
+ auto limits = ptr->GetLimits();
302
+
303
+ info.GetReturnValue().Set(limits->max_texture_dimension_1d);
304
+ }
305
+
306
+
307
+ void GPUSupportedLimitsImpl::SetMaxTextureDimension1D(v8::Local<v8::String> property,
308
+ v8::Local<v8::Value> value,
309
+ const v8::PropertyCallbackInfo<void> &info) {
310
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
311
+ if (ptr == nullptr) {
312
+ return;
313
+ }
314
+ auto isolate = info.GetIsolate();
315
+ auto context = isolate->GetCurrentContext();
316
+ if (value->IsInt32()) {
317
+ ptr->limits_->max_texture_dimension_1d = value->Int32Value(context).ToChecked();
318
+ }
319
+ }
320
+
321
+ void GPUSupportedLimitsImpl::GetMaxTextureDimension2D(v8::Local<v8::String> property,
322
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
323
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
324
+ if (ptr == nullptr) {
325
+ // return default ??
326
+ info.GetReturnValue().Set(8192);
327
+ return;
328
+ }
329
+
330
+ auto limits = ptr->GetLimits();
331
+
332
+ info.GetReturnValue().Set(limits->max_texture_dimension_2d);
333
+ }
334
+
335
+
336
+ void GPUSupportedLimitsImpl::SetMaxTextureDimension2D(v8::Local<v8::String> property,
337
+ v8::Local<v8::Value> value,
338
+ const v8::PropertyCallbackInfo<void> &info) {
339
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
340
+ if (ptr == nullptr) {
341
+ return;
342
+ }
343
+ auto isolate = info.GetIsolate();
344
+ auto context = isolate->GetCurrentContext();
345
+ if (value->IsInt32()) {
346
+ ptr->limits_->max_texture_dimension_2d = value->Int32Value(context).ToChecked();
347
+ }
348
+ }
349
+
350
+ void GPUSupportedLimitsImpl::GetMaxTextureDimension3D(v8::Local<v8::String> property,
351
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
352
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
353
+ if (ptr == nullptr) {
354
+ // return default ??
355
+ info.GetReturnValue().Set(2048);
356
+ return;
357
+ }
358
+
359
+ auto limits = ptr->GetLimits();
360
+
361
+ info.GetReturnValue().Set(limits->max_texture_dimension_3d);
362
+ }
363
+
364
+ void GPUSupportedLimitsImpl::SetMaxTextureDimension3D(v8::Local<v8::String> property,
365
+ v8::Local<v8::Value> value,
366
+ const v8::PropertyCallbackInfo<void> &info) {
367
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
368
+ if (ptr == nullptr) {
369
+ return;
370
+ }
371
+ auto isolate = info.GetIsolate();
372
+ auto context = isolate->GetCurrentContext();
373
+ if (value->IsInt32()) {
374
+ ptr->limits_->max_texture_dimension_3d = value->Int32Value(context).ToChecked();
375
+ }
376
+ }
377
+
378
+ void GPUSupportedLimitsImpl::GetMaxTextureArrayLayers(v8::Local<v8::String> property,
379
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
380
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
381
+ if (ptr == nullptr) {
382
+ // return default ??
383
+ info.GetReturnValue().Set(256);
384
+ return;
385
+ }
386
+
387
+ auto limits = ptr->GetLimits();
388
+
389
+ info.GetReturnValue().Set(limits->max_texture_array_layers);
390
+ }
391
+
392
+
393
+ void GPUSupportedLimitsImpl::SetMaxTextureArrayLayers(v8::Local<v8::String> property,
394
+ v8::Local<v8::Value> value,
395
+ const v8::PropertyCallbackInfo<void> &info) {
396
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
397
+ if (ptr == nullptr) {
398
+ return;
399
+ }
400
+ auto isolate = info.GetIsolate();
401
+ auto context = isolate->GetCurrentContext();
402
+ if (value->IsInt32()) {
403
+ ptr->limits_->max_texture_array_layers = value->Int32Value(context).ToChecked();
404
+ }
405
+ }
406
+
407
+ void GPUSupportedLimitsImpl::GetMaxBindGroups(v8::Local<v8::String> property,
408
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
409
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
410
+ if (ptr == nullptr) {
411
+ // return default ??
412
+ info.GetReturnValue().Set(4);
413
+ return;
414
+ }
415
+
416
+ auto limits = ptr->GetLimits();
417
+
418
+ info.GetReturnValue().Set(limits->max_bind_groups);
419
+ }
420
+
421
+
422
+ void GPUSupportedLimitsImpl::SetMaxBindGroups(v8::Local<v8::String> property,
423
+ v8::Local<v8::Value> value,
424
+ const v8::PropertyCallbackInfo<void> &info) {
425
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
426
+ if (ptr == nullptr) {
427
+ return;
428
+ }
429
+ auto isolate = info.GetIsolate();
430
+ auto context = isolate->GetCurrentContext();
431
+ if (value->IsInt32()) {
432
+ ptr->limits_->max_bind_groups = value->Int32Value(context).ToChecked();
433
+ }
434
+ }
435
+
436
+ void GPUSupportedLimitsImpl::GetMaxBindingsPerBindGroup(v8::Local<v8::String> property,
437
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
438
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
439
+ if (ptr == nullptr) {
440
+ // return default ??
441
+ info.GetReturnValue().Set(1000);
442
+ return;
443
+ }
444
+
445
+ auto limits = ptr->GetLimits();
446
+
447
+ info.GetReturnValue().Set(limits->max_bindings_per_bind_group);
448
+
449
+ }
450
+
451
+
452
+ void GPUSupportedLimitsImpl::SetMaxBindingsPerBindGroup(v8::Local<v8::String> property,
453
+ v8::Local<v8::Value> value,
454
+ const v8::PropertyCallbackInfo<void> &info) {
455
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
456
+ if (ptr == nullptr) {
457
+ return;
458
+ }
459
+ auto isolate = info.GetIsolate();
460
+ auto context = isolate->GetCurrentContext();
461
+ if (value->IsInt32()) {
462
+ ptr->limits_->max_bindings_per_bind_group = value->Int32Value(context).ToChecked();
463
+ }
464
+ }
465
+
466
+ void
467
+ GPUSupportedLimitsImpl::GetMaxDynamicUniformBuffersPerPipelineLayout(v8::Local<v8::String> property,
468
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
469
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
470
+ if (ptr == nullptr) {
471
+ // return default ??
472
+ info.GetReturnValue().Set(8);
473
+ return;
474
+ }
475
+
476
+ auto limits = ptr->GetLimits();
477
+
478
+ info.GetReturnValue().Set(limits->max_dynamic_uniform_buffers_per_pipeline_layout);
479
+ }
480
+
481
+ void
482
+ GPUSupportedLimitsImpl::SetMaxDynamicUniformBuffersPerPipelineLayout(v8::Local<v8::String> property,
483
+ v8::Local<v8::Value> value,
484
+ const v8::PropertyCallbackInfo<void> &info) {
485
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
486
+ if (ptr == nullptr) {
487
+ return;
488
+ }
489
+ auto isolate = info.GetIsolate();
490
+ auto context = isolate->GetCurrentContext();
491
+ if (value->IsInt32()) {
492
+ ptr->limits_->max_dynamic_uniform_buffers_per_pipeline_layout = value->Int32Value(
493
+ context).ToChecked();
494
+ }
495
+ }
496
+
497
+ void
498
+ GPUSupportedLimitsImpl::GetMaxDynamicStorageBuffersPerPipelineLayout(v8::Local<v8::String> property,
499
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
500
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
501
+ if (ptr == nullptr) {
502
+ // return default ??
503
+ info.GetReturnValue().Set(4);
504
+ return;
505
+ }
506
+
507
+ auto limits = ptr->GetLimits();
508
+
509
+ info.GetReturnValue().Set(limits->max_dynamic_storage_buffers_per_pipeline_layout);
510
+ }
511
+
512
+ void
513
+ GPUSupportedLimitsImpl::SetMaxDynamicStorageBuffersPerPipelineLayout(v8::Local<v8::String> property,
514
+ v8::Local<v8::Value> value,
515
+ const v8::PropertyCallbackInfo<void> &info) {
516
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
517
+ if (ptr == nullptr) {
518
+ return;
519
+ }
520
+ auto isolate = info.GetIsolate();
521
+ auto context = isolate->GetCurrentContext();
522
+ if (value->IsInt32()) {
523
+ ptr->limits_->max_dynamic_storage_buffers_per_pipeline_layout = value->Int32Value(
524
+ context).ToChecked();
525
+ }
526
+ }
527
+
528
+ void GPUSupportedLimitsImpl::GetMaxSampledTexturesPerShaderStage(v8::Local<v8::String> property,
529
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
530
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
531
+ if (ptr == nullptr) {
532
+ // return default ??
533
+ info.GetReturnValue().Set(16);
534
+ return;
535
+ }
536
+
537
+ auto limits = ptr->GetLimits();
538
+
539
+ info.GetReturnValue().Set(limits->max_sampled_textures_per_shader_stage);
540
+ }
541
+
542
+ void GPUSupportedLimitsImpl::SetMaxSampledTexturesPerShaderStage(v8::Local<v8::String> property,
543
+ v8::Local<v8::Value> value,
544
+ const v8::PropertyCallbackInfo<void> &info) {
545
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
546
+ if (ptr == nullptr) {
547
+ return;
548
+ }
549
+ auto isolate = info.GetIsolate();
550
+ auto context = isolate->GetCurrentContext();
551
+ if (value->IsInt32()) {
552
+ ptr->limits_->max_sampled_textures_per_shader_stage = value->Int32Value(
553
+ context).ToChecked();
554
+ }
555
+ }
556
+
557
+
558
+ void GPUSupportedLimitsImpl::GetMaxSamplersPerShaderStage(v8::Local<v8::String> property,
559
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
560
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
561
+ if (ptr == nullptr) {
562
+ // return default ??
563
+ info.GetReturnValue().Set(16);
564
+ return;
565
+ }
566
+
567
+ auto limits = ptr->GetLimits();
568
+
569
+ info.GetReturnValue().Set(limits->max_samplers_per_shader_stage);
570
+
571
+ }
572
+
573
+ void GPUSupportedLimitsImpl::SetMaxSamplersPerShaderStage(v8::Local<v8::String> property,
574
+ v8::Local<v8::Value> value,
575
+ const v8::PropertyCallbackInfo<void> &info) {
576
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
577
+ if (ptr == nullptr) {
578
+ return;
579
+ }
580
+ auto isolate = info.GetIsolate();
581
+ auto context = isolate->GetCurrentContext();
582
+ if (value->IsInt32()) {
583
+ ptr->limits_->max_samplers_per_shader_stage = value->Int32Value(context).ToChecked();
584
+ }
585
+ }
586
+
587
+
588
+ void GPUSupportedLimitsImpl::GetMaxStorageBuffersPerShaderStage(v8::Local<v8::String> property,
589
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
590
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
591
+ if (ptr == nullptr) {
592
+ // return default ??
593
+ info.GetReturnValue().Set(8);
594
+ return;
595
+ }
596
+
597
+ auto limits = ptr->GetLimits();
598
+
599
+ info.GetReturnValue().Set(limits->max_storage_buffers_per_shader_stage);
600
+ }
601
+
602
+ void GPUSupportedLimitsImpl::SetMaxStorageBuffersPerShaderStage(v8::Local<v8::String> property,
603
+ v8::Local<v8::Value> value,
604
+ const v8::PropertyCallbackInfo<void> &info) {
605
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
606
+ if (ptr == nullptr) {
607
+ return;
608
+ }
609
+ auto isolate = info.GetIsolate();
610
+ auto context = isolate->GetCurrentContext();
611
+ if (value->IsInt32()) {
612
+ ptr->limits_->max_storage_buffers_per_shader_stage = value->Int32Value(context).ToChecked();
613
+ }
614
+ }
615
+
616
+
617
+ void GPUSupportedLimitsImpl::GetMaxStorageTexturesPerShaderStage(v8::Local<v8::String> property,
618
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
619
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
620
+ if (ptr == nullptr) {
621
+ // return default ??
622
+ info.GetReturnValue().Set(4);
623
+ return;
624
+ }
625
+
626
+ auto limits = ptr->GetLimits();
627
+
628
+ info.GetReturnValue().Set(limits->max_storage_textures_per_shader_stage);
629
+ }
630
+
631
+ void GPUSupportedLimitsImpl::SetMaxStorageTexturesPerShaderStage(v8::Local<v8::String> property,
632
+ v8::Local<v8::Value> value,
633
+ const v8::PropertyCallbackInfo<void> &info) {
634
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
635
+ if (ptr == nullptr) {
636
+ return;
637
+ }
638
+ auto isolate = info.GetIsolate();
639
+ auto context = isolate->GetCurrentContext();
640
+ if (value->IsInt32()) {
641
+ ptr->limits_->max_storage_textures_per_shader_stage = value->Int32Value(
642
+ context).ToChecked();
643
+ }
644
+ }
645
+
646
+
647
+ void GPUSupportedLimitsImpl::GetMaxUniformBuffersPerShaderStage(v8::Local<v8::String> property,
648
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
649
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
650
+ if (ptr == nullptr) {
651
+ // return default ??
652
+ info.GetReturnValue().Set(12);
653
+ return;
654
+ }
655
+
656
+ auto limits = ptr->GetLimits();
657
+
658
+ info.GetReturnValue().Set(limits->max_uniform_buffers_per_shader_stage);
659
+ }
660
+
661
+
662
+ void GPUSupportedLimitsImpl::SetMaxUniformBuffersPerShaderStage(v8::Local<v8::String> property,
663
+ v8::Local<v8::Value> value,
664
+ const v8::PropertyCallbackInfo<void> &info) {
665
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
666
+ if (ptr == nullptr) {
667
+ return;
668
+ }
669
+ auto isolate = info.GetIsolate();
670
+ auto context = isolate->GetCurrentContext();
671
+ if (value->IsInt32()) {
672
+ ptr->limits_->max_uniform_buffers_per_shader_stage = value->Int32Value(context).ToChecked();
673
+ }
674
+ }
675
+
676
+ void GPUSupportedLimitsImpl::GetMaxUniformBufferBindingSize(v8::Local<v8::String> property,
677
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
678
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
679
+ if (ptr == nullptr) {
680
+ // return default ??
681
+ info.GetReturnValue().Set(64);
682
+ return;
683
+ }
684
+
685
+ auto limits = ptr->GetLimits();
686
+
687
+ info.GetReturnValue().Set(limits->max_uniform_buffer_binding_size);
688
+ }
689
+
690
+
691
+ void GPUSupportedLimitsImpl::SetMaxUniformBufferBindingSize(v8::Local<v8::String> property,
692
+ v8::Local<v8::Value> value,
693
+ const v8::PropertyCallbackInfo<void> &info) {
694
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
695
+ if (ptr == nullptr) {
696
+ return;
697
+ }
698
+ auto isolate = info.GetIsolate();
699
+ auto context = isolate->GetCurrentContext();
700
+ if (value->IsInt32()) {
701
+ ptr->limits_->max_uniform_buffer_binding_size = value->Int32Value(context).ToChecked();
702
+ }
703
+ }
704
+
705
+ void GPUSupportedLimitsImpl::GetMaxStorageBufferBindingSize(v8::Local<v8::String> property,
706
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
707
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
708
+ if (ptr == nullptr) {
709
+ // return default ??
710
+ info.GetReturnValue().Set(128);
711
+ return;
712
+ }
713
+
714
+ auto limits = ptr->GetLimits();
715
+
716
+ info.GetReturnValue().Set(limits->max_storage_buffer_binding_size);
717
+ }
718
+
719
+
720
+ void GPUSupportedLimitsImpl::SetMaxStorageBufferBindingSize(v8::Local<v8::String> property,
721
+ v8::Local<v8::Value> value,
722
+ const v8::PropertyCallbackInfo<void> &info) {
723
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
724
+ if (ptr == nullptr) {
725
+ return;
726
+ }
727
+ auto isolate = info.GetIsolate();
728
+ auto context = isolate->GetCurrentContext();
729
+ if (value->IsInt32()) {
730
+ ptr->limits_->max_storage_buffer_binding_size = value->Int32Value(context).ToChecked();
731
+ }
732
+ }
733
+
734
+ void GPUSupportedLimitsImpl::GetMaxVertexBuffers(v8::Local<v8::String> property,
735
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
736
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
737
+ if (ptr == nullptr) {
738
+ // return default ??
739
+ info.GetReturnValue().Set(8);
740
+ return;
741
+ }
742
+
743
+ auto limits = ptr->GetLimits();
744
+
745
+ info.GetReturnValue().Set(limits->max_vertex_buffers);
746
+ }
747
+
748
+
749
+ void GPUSupportedLimitsImpl::SetMaxVertexBuffers(v8::Local<v8::String> property,
750
+ v8::Local<v8::Value> value,
751
+ const v8::PropertyCallbackInfo<void> &info) {
752
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
753
+ if (ptr == nullptr) {
754
+ return;
755
+ }
756
+ auto isolate = info.GetIsolate();
757
+ auto context = isolate->GetCurrentContext();
758
+ if (value->IsInt32()) {
759
+ ptr->limits_->max_vertex_buffers = value->Int32Value(context).ToChecked();
760
+ }
761
+ }
762
+
763
+ void GPUSupportedLimitsImpl::GetMaxBufferSize(v8::Local<v8::String> property,
764
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
765
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
766
+ if (ptr == nullptr) {
767
+ // return default ??
768
+ info.GetReturnValue().Set(256);
769
+ return;
770
+ }
771
+
772
+ auto limits = ptr->GetLimits();
773
+
774
+ info.GetReturnValue().Set(v8::Number::New(info.GetIsolate(), (double) limits->max_buffer_size));
775
+
776
+ }
777
+
778
+
779
+ void GPUSupportedLimitsImpl::SetMaxBufferSize(v8::Local<v8::String> property,
780
+ v8::Local<v8::Value> value,
781
+ const v8::PropertyCallbackInfo<void> &info) {
782
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
783
+ if (ptr == nullptr) {
784
+ return;
785
+ }
786
+ auto isolate = info.GetIsolate();
787
+ auto context = isolate->GetCurrentContext();
788
+ if (value->IsNumber()) {
789
+ ptr->limits_->max_buffer_size = (uint64_t) value->NumberValue(context).ToChecked();
790
+ }
791
+ }
792
+
793
+
794
+ void GPUSupportedLimitsImpl::GetMaxVertexAttributes(v8::Local<v8::String> property,
795
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
796
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
797
+ if (ptr == nullptr) {
798
+ // return default ??
799
+ info.GetReturnValue().Set(16);
800
+ return;
801
+ }
802
+
803
+ auto limits = ptr->GetLimits();
804
+
805
+ info.GetReturnValue().Set(limits->max_vertex_attributes);
806
+ }
807
+
808
+
809
+ void GPUSupportedLimitsImpl::SetMaxVertexAttributes(v8::Local<v8::String> property,
810
+ v8::Local<v8::Value> value,
811
+ const v8::PropertyCallbackInfo<void> &info) {
812
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
813
+ if (ptr == nullptr) {
814
+ return;
815
+ }
816
+ auto isolate = info.GetIsolate();
817
+ auto context = isolate->GetCurrentContext();
818
+ if (value->IsInt32()) {
819
+ ptr->limits_->max_vertex_attributes = value->Int32Value(context).ToChecked();
820
+ }
821
+ }
822
+
823
+
824
+ void GPUSupportedLimitsImpl::GetMaxVertexBufferArrayStride(v8::Local<v8::String> property,
825
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
826
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
827
+ if (ptr == nullptr) {
828
+ // return default ??
829
+ info.GetReturnValue().Set(2048);
830
+ return;
831
+ }
832
+
833
+ auto limits = ptr->GetLimits();
834
+
835
+ info.GetReturnValue().Set(limits->max_vertex_buffer_array_stride);
836
+
837
+ }
838
+
839
+
840
+ void GPUSupportedLimitsImpl::SetMaxVertexBufferArrayStride(v8::Local<v8::String> property,
841
+ v8::Local<v8::Value> value,
842
+ const v8::PropertyCallbackInfo<void> &info) {
843
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
844
+ if (ptr == nullptr) {
845
+ return;
846
+ }
847
+ auto isolate = info.GetIsolate();
848
+ auto context = isolate->GetCurrentContext();
849
+ if (value->IsInt32()) {
850
+ ptr->limits_->max_vertex_buffer_array_stride = value->Int32Value(context).ToChecked();
851
+ }
852
+ }
853
+
854
+
855
+ void GPUSupportedLimitsImpl::GetMinUniformBufferOffsetAlignment(v8::Local<v8::String> property,
856
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
857
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
858
+ if (ptr == nullptr) {
859
+ // return default ??
860
+ info.GetReturnValue().Set(256);
861
+ return;
862
+ }
863
+
864
+ auto limits = ptr->GetLimits();
865
+
866
+ info.GetReturnValue().Set(limits->min_uniform_buffer_offset_alignment);
867
+
868
+ }
869
+
870
+
871
+ void GPUSupportedLimitsImpl::SetMinUniformBufferOffsetAlignment(v8::Local<v8::String> property,
872
+ v8::Local<v8::Value> value,
873
+ const v8::PropertyCallbackInfo<void> &info) {
874
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
875
+ if (ptr == nullptr) {
876
+ return;
877
+ }
878
+ auto isolate = info.GetIsolate();
879
+ auto context = isolate->GetCurrentContext();
880
+ if (value->IsInt32()) {
881
+ ptr->limits_->min_uniform_buffer_offset_alignment = value->Int32Value(context).ToChecked();
882
+ }
883
+ }
884
+
885
+
886
+ void GPUSupportedLimitsImpl::GetMinStorageBufferOffsetAlignment(v8::Local<v8::String> property,
887
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
888
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
889
+ if (ptr == nullptr) {
890
+ // return default ??
891
+ info.GetReturnValue().Set(256);
892
+ return;
893
+ }
894
+
895
+ auto limits = ptr->GetLimits();
896
+
897
+ info.GetReturnValue().Set(limits->min_storage_buffer_offset_alignment);
898
+
899
+ }
900
+
901
+
902
+ void GPUSupportedLimitsImpl::SetMinStorageBufferOffsetAlignment(v8::Local<v8::String> property,
903
+ v8::Local<v8::Value> value,
904
+ const v8::PropertyCallbackInfo<void> &info) {
905
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
906
+ if (ptr == nullptr) {
907
+ return;
908
+ }
909
+ auto isolate = info.GetIsolate();
910
+ auto context = isolate->GetCurrentContext();
911
+ if (value->IsInt32()) {
912
+ ptr->limits_->min_storage_buffer_offset_alignment = value->Int32Value(context).ToChecked();
913
+ }
914
+ }
915
+
916
+
917
+ void GPUSupportedLimitsImpl::GetMaxInterStageShaderComponents(v8::Local<v8::String> property,
918
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
919
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
920
+ if (ptr == nullptr) {
921
+ // return default ??
922
+ info.GetReturnValue().Set(60);
923
+ return;
924
+ }
925
+
926
+ auto limits = ptr->GetLimits();
927
+
928
+ info.GetReturnValue().Set(limits->max_inter_stage_shader_components);
929
+
930
+ }
931
+
932
+
933
+ void GPUSupportedLimitsImpl::SetMaxInterStageShaderComponents(v8::Local<v8::String> property,
934
+ v8::Local<v8::Value> value,
935
+ const v8::PropertyCallbackInfo<void> &info) {
936
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
937
+ if (ptr == nullptr) {
938
+ return;
939
+ }
940
+ auto isolate = info.GetIsolate();
941
+ auto context = isolate->GetCurrentContext();
942
+ if (value->IsInt32()) {
943
+ ptr->limits_->max_inter_stage_shader_components = value->Int32Value(context).ToChecked();
944
+ }
945
+ }
946
+
947
+
948
+ void GPUSupportedLimitsImpl::GetMaxColorAttachments(v8::Local<v8::String> property,
949
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
950
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
951
+ if (ptr == nullptr) {
952
+ // return default ??
953
+ info.GetReturnValue().Set(8);
954
+ return;
955
+ }
956
+
957
+ auto limits = ptr->GetLimits();
958
+
959
+ info.GetReturnValue().Set(limits->max_color_attachments);
960
+
961
+ }
962
+
963
+
964
+ void GPUSupportedLimitsImpl::SetMaxColorAttachments(v8::Local<v8::String> property,
965
+ v8::Local<v8::Value> value,
966
+ const v8::PropertyCallbackInfo<void> &info) {
967
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
968
+ if (ptr == nullptr) {
969
+ return;
970
+ }
971
+ auto isolate = info.GetIsolate();
972
+ auto context = isolate->GetCurrentContext();
973
+ if (value->IsInt32()) {
974
+ ptr->limits_->max_color_attachments = value->Int32Value(context).ToChecked();
975
+ }
976
+ }
977
+
978
+
979
+ void GPUSupportedLimitsImpl::GetMaxColorAttachmentBytesPerSample(v8::Local<v8::String> property,
980
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
981
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
982
+ if (ptr == nullptr) {
983
+ // return default ??
984
+ info.GetReturnValue().Set(32);
985
+ return;
986
+ }
987
+
988
+ auto limits = ptr->GetLimits();
989
+
990
+ info.GetReturnValue().Set(limits->max_color_attachment_bytes_per_sample);
991
+
992
+ }
993
+
994
+ void GPUSupportedLimitsImpl::SetMaxColorAttachmentBytesPerSample(v8::Local<v8::String> property,
995
+ v8::Local<v8::Value> value,
996
+ const v8::PropertyCallbackInfo<void> &info) {
997
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
998
+ if (ptr == nullptr) {
999
+ return;
1000
+ }
1001
+ auto isolate = info.GetIsolate();
1002
+ auto context = isolate->GetCurrentContext();
1003
+ if (value->IsInt32()) {
1004
+ ptr->limits_->max_color_attachment_bytes_per_sample = value->Int32Value(
1005
+ context).ToChecked();
1006
+ }
1007
+ }
1008
+
1009
+
1010
+ void GPUSupportedLimitsImpl::GetMaxComputeWorkgroupStorageSize(v8::Local<v8::String> property,
1011
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1012
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1013
+ if (ptr == nullptr) {
1014
+ // return default ??
1015
+ info.GetReturnValue().Set(16384);
1016
+ return;
1017
+ }
1018
+
1019
+ auto limits = ptr->GetLimits();
1020
+
1021
+ info.GetReturnValue().Set(limits->max_compute_workgroup_storage_size);
1022
+ }
1023
+
1024
+
1025
+ void GPUSupportedLimitsImpl::SetMaxComputeWorkgroupStorageSize(v8::Local<v8::String> property,
1026
+ v8::Local<v8::Value> value,
1027
+ const v8::PropertyCallbackInfo<void> &info) {
1028
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1029
+ if (ptr == nullptr) {
1030
+ return;
1031
+ }
1032
+ auto isolate = info.GetIsolate();
1033
+ auto context = isolate->GetCurrentContext();
1034
+ if (value->IsInt32()) {
1035
+ ptr->limits_->max_compute_workgroup_storage_size = value->Int32Value(context).ToChecked();
1036
+ }
1037
+ }
1038
+
1039
+
1040
+ void GPUSupportedLimitsImpl::GetMaxComputeInvocationsPerWorkgroup(v8::Local<v8::String> property,
1041
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1042
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1043
+ if (ptr == nullptr) {
1044
+ // return default ??
1045
+ info.GetReturnValue().Set(256);
1046
+ return;
1047
+ }
1048
+
1049
+ auto limits = ptr->GetLimits();
1050
+
1051
+ info.GetReturnValue().Set(limits->max_compute_invocations_per_workgroup);
1052
+ }
1053
+
1054
+
1055
+ void GPUSupportedLimitsImpl::SetMaxComputeInvocationsPerWorkgroup(v8::Local<v8::String> property,
1056
+ v8::Local<v8::Value> value,
1057
+ const v8::PropertyCallbackInfo<void> &info) {
1058
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1059
+ if (ptr == nullptr) {
1060
+ return;
1061
+ }
1062
+ auto isolate = info.GetIsolate();
1063
+ auto context = isolate->GetCurrentContext();
1064
+ if (value->IsInt32()) {
1065
+ ptr->limits_->max_compute_invocations_per_workgroup = value->Int32Value(
1066
+ context).ToChecked();
1067
+ }
1068
+ }
1069
+
1070
+ void GPUSupportedLimitsImpl::GetMaxComputeWorkgroupSizeX(v8::Local<v8::String> property,
1071
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1072
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1073
+ if (ptr == nullptr) {
1074
+ // return default ??
1075
+ info.GetReturnValue().Set(256);
1076
+ return;
1077
+ }
1078
+
1079
+ auto limits = ptr->GetLimits();
1080
+
1081
+ info.GetReturnValue().Set(limits->max_compute_workgroup_size_x);
1082
+ }
1083
+
1084
+
1085
+ void GPUSupportedLimitsImpl::SetMaxComputeWorkgroupSizeX(v8::Local<v8::String> property,
1086
+ v8::Local<v8::Value> value,
1087
+ const v8::PropertyCallbackInfo<void> &info) {
1088
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1089
+ if (ptr == nullptr) {
1090
+ return;
1091
+ }
1092
+ auto isolate = info.GetIsolate();
1093
+ auto context = isolate->GetCurrentContext();
1094
+ if (value->IsInt32()) {
1095
+ ptr->limits_->max_compute_workgroup_size_x = value->Int32Value(context).ToChecked();
1096
+ }
1097
+ }
1098
+
1099
+
1100
+ void GPUSupportedLimitsImpl::GetMaxComputeWorkgroupSizeY(v8::Local<v8::String> property,
1101
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1102
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1103
+ if (ptr == nullptr) {
1104
+ // return default ??
1105
+ info.GetReturnValue().Set(256);
1106
+ return;
1107
+ }
1108
+
1109
+ auto limits = ptr->GetLimits();
1110
+
1111
+ info.GetReturnValue().Set(limits->max_compute_workgroup_size_y);
1112
+ }
1113
+
1114
+
1115
+ void GPUSupportedLimitsImpl::SetMaxComputeWorkgroupSizeY(v8::Local<v8::String> property,
1116
+ v8::Local<v8::Value> value,
1117
+ const v8::PropertyCallbackInfo<void> &info) {
1118
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1119
+ if (ptr == nullptr) {
1120
+ return;
1121
+ }
1122
+ auto isolate = info.GetIsolate();
1123
+ auto context = isolate->GetCurrentContext();
1124
+ if (value->IsInt32()) {
1125
+ ptr->limits_->max_compute_workgroup_size_y = value->Int32Value(context).ToChecked();
1126
+ }
1127
+ }
1128
+
1129
+
1130
+ void GPUSupportedLimitsImpl::GetMaxComputeWorkgroupSizeZ(v8::Local<v8::String> property,
1131
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1132
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1133
+ if (ptr == nullptr) {
1134
+ // return default ??
1135
+ info.GetReturnValue().Set(64);
1136
+ return;
1137
+ }
1138
+
1139
+ auto limits = ptr->GetLimits();
1140
+
1141
+ info.GetReturnValue().Set(limits->max_compute_workgroup_size_z);
1142
+ }
1143
+
1144
+
1145
+ void GPUSupportedLimitsImpl::SetMaxComputeWorkgroupSizeZ(v8::Local<v8::String> property,
1146
+ v8::Local<v8::Value> value,
1147
+ const v8::PropertyCallbackInfo<void> &info) {
1148
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1149
+ if (ptr == nullptr) {
1150
+ return;
1151
+ }
1152
+ auto isolate = info.GetIsolate();
1153
+ auto context = isolate->GetCurrentContext();
1154
+ if (value->IsInt32()) {
1155
+ ptr->limits_->max_compute_workgroup_size_z = value->Int32Value(context).ToChecked();
1156
+ }
1157
+ }
1158
+
1159
+ void GPUSupportedLimitsImpl::GetMaxComputeWorkgroupsPerDimension(v8::Local<v8::String> property,
1160
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1161
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1162
+ if (ptr == nullptr) {
1163
+ // return default ??
1164
+ info.GetReturnValue().Set(65535);
1165
+ return;
1166
+ }
1167
+
1168
+ auto limits = ptr->GetLimits();
1169
+
1170
+ info.GetReturnValue().Set(limits->max_compute_workgroups_per_dimension);
1171
+ }
1172
+
1173
+
1174
+ void GPUSupportedLimitsImpl::SetMaxComputeWorkgroupsPerDimension(v8::Local<v8::String> property,
1175
+ v8::Local<v8::Value> value,
1176
+ const v8::PropertyCallbackInfo<void> &info) {
1177
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1178
+ if (ptr == nullptr) {
1179
+ return;
1180
+ }
1181
+ auto isolate = info.GetIsolate();
1182
+ auto context = isolate->GetCurrentContext();
1183
+ if (value->IsInt32()) {
1184
+ ptr->limits_->max_compute_workgroups_per_dimension = value->Int32Value(context).ToChecked();
1185
+ }
1186
+ }
1187
+
1188
+ void GPUSupportedLimitsImpl::GetMinSubgroupSize(v8::Local<v8::String> property,
1189
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1190
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1191
+ if (ptr == nullptr) {
1192
+ // return default ??
1193
+ info.GetReturnValue().Set(0);
1194
+ return;
1195
+ }
1196
+
1197
+ auto limits = ptr->GetLimits();
1198
+
1199
+ info.GetReturnValue().Set(limits->min_subgroup_size);
1200
+ }
1201
+
1202
+
1203
+ void GPUSupportedLimitsImpl::SetMinSubgroupSize(v8::Local<v8::String> property,
1204
+ v8::Local<v8::Value> value,
1205
+ const v8::PropertyCallbackInfo<void> &info) {
1206
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1207
+ if (ptr == nullptr) {
1208
+ return;
1209
+ }
1210
+ auto isolate = info.GetIsolate();
1211
+ auto context = isolate->GetCurrentContext();
1212
+ if (value->IsInt32()) {
1213
+ ptr->limits_->min_subgroup_size = value->Int32Value(context).ToChecked();
1214
+ }
1215
+ }
1216
+
1217
+ void GPUSupportedLimitsImpl::GetMaxSubgroupSize(v8::Local<v8::String> property,
1218
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1219
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1220
+ if (ptr == nullptr) {
1221
+ // return default ??
1222
+ info.GetReturnValue().Set(0);
1223
+ return;
1224
+ }
1225
+
1226
+ auto limits = ptr->GetLimits();
1227
+
1228
+ info.GetReturnValue().Set(limits->max_subgroup_size);
1229
+ }
1230
+
1231
+
1232
+ void GPUSupportedLimitsImpl::SetMaxSubgroupSize(v8::Local<v8::String> property,
1233
+ v8::Local<v8::Value> value,
1234
+ const v8::PropertyCallbackInfo<void> &info) {
1235
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1236
+ if (ptr == nullptr) {
1237
+ return;
1238
+ }
1239
+ auto isolate = info.GetIsolate();
1240
+ auto context = isolate->GetCurrentContext();
1241
+ if (value->IsInt32()) {
1242
+ ptr->limits_->max_subgroup_size = value->Int32Value(context).ToChecked();
1243
+ }
1244
+ }
1245
+
1246
+
1247
+ void GPUSupportedLimitsImpl::GetMaxPushConstantSize(v8::Local<v8::String> property,
1248
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1249
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1250
+ if (ptr == nullptr) {
1251
+ // return default ??
1252
+ info.GetReturnValue().Set(0);
1253
+ return;
1254
+ }
1255
+
1256
+ auto limits = ptr->GetLimits();
1257
+
1258
+ info.GetReturnValue().Set(limits->max_push_constant_size);
1259
+ }
1260
+
1261
+
1262
+ void GPUSupportedLimitsImpl::SetMaxPushConstantSize(v8::Local<v8::String> property,
1263
+ v8::Local<v8::Value> value,
1264
+ const v8::PropertyCallbackInfo<void> &info) {
1265
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1266
+ if (ptr == nullptr) {
1267
+ return;
1268
+ }
1269
+ auto isolate = info.GetIsolate();
1270
+ auto context = isolate->GetCurrentContext();
1271
+ if (value->IsInt32()) {
1272
+ ptr->limits_->max_push_constant_size = value->Int32Value(context).ToChecked();
1273
+ }
1274
+ }
1275
+
1276
+ void GPUSupportedLimitsImpl::GetMaxNonSamplerBindings(v8::Local<v8::String> property,
1277
+ const v8::PropertyCallbackInfo<v8::Value> &info) {
1278
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1279
+ if (ptr == nullptr) {
1280
+ // return default ??
1281
+ info.GetReturnValue().Set(1000000);
1282
+ return;
1283
+ }
1284
+
1285
+ auto limits = ptr->GetLimits();
1286
+
1287
+ info.GetReturnValue().Set(limits->max_non_sampler_bindings);
1288
+
1289
+ }
1290
+
1291
+ void GPUSupportedLimitsImpl::SetMaxNonSamplerBindings(v8::Local<v8::String> property,
1292
+ v8::Local<v8::Value> value,
1293
+ const v8::PropertyCallbackInfo<void> &info) {
1294
+ GPUSupportedLimitsImpl *ptr = GetPointer(info.This());
1295
+ if (ptr == nullptr) {
1296
+ return;
1297
+ }
1298
+ auto isolate = info.GetIsolate();
1299
+ auto context = isolate->GetCurrentContext();
1300
+ if (value->IsInt32()) {
1301
+ ptr->limits_->max_non_sampler_bindings = value->Int32Value(context).ToChecked();
1302
+ }
1303
+ }
1304
+