@nativescript/canvas 2.0.0-alpha.8 → 2.0.0-beta.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 (541) hide show
  1. package/Canvas/common.d.ts +213 -25
  2. package/Canvas/common.js +705 -452
  3. package/Canvas/common.js.map +1 -1
  4. package/Canvas/index.android.d.ts +10 -1
  5. package/Canvas/index.android.js +155 -52
  6. package/Canvas/index.android.js.map +1 -1
  7. package/Canvas/index.d.ts +8 -0
  8. package/Canvas/index.ios.d.ts +7 -4
  9. package/Canvas/index.ios.js +159 -106
  10. package/Canvas/index.ios.js.map +1 -1
  11. package/Canvas2D/CanvasGradient/index.d.ts +1 -3
  12. package/Canvas2D/CanvasGradient/index.js +1 -10
  13. package/Canvas2D/CanvasGradient/index.js.map +1 -1
  14. package/Canvas2D/CanvasPattern/index.d.ts +1 -3
  15. package/Canvas2D/CanvasPattern/index.js +1 -10
  16. package/Canvas2D/CanvasPattern/index.js.map +1 -1
  17. package/Canvas2D/CanvasRenderingContext2D/index.d.ts +9 -5
  18. package/Canvas2D/CanvasRenderingContext2D/index.js +174 -245
  19. package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
  20. package/Canvas2D/DOMMatrix/index.js +3 -3
  21. package/Canvas2D/DOMMatrix/index.js.map +1 -1
  22. package/Canvas2D/ImageData/index.js +6 -6
  23. package/Canvas2D/ImageData/index.js.map +1 -1
  24. package/Canvas2D/Path2D/index.d.ts +0 -2
  25. package/Canvas2D/Path2D/index.js +32 -42
  26. package/Canvas2D/Path2D/index.js.map +1 -1
  27. package/Dom/Paint.js +2 -3
  28. package/Dom/Paint.js.map +1 -1
  29. package/Dom/shapes/Circle.js +1 -2
  30. package/Dom/shapes/Circle.js.map +1 -1
  31. package/Dom/shapes/Points.js +1 -2
  32. package/Dom/shapes/Points.js.map +1 -1
  33. package/ImageAsset/index.d.ts +2 -2
  34. package/ImageAsset/index.js +33 -37
  35. package/ImageAsset/index.js.map +1 -1
  36. package/ImageBitmap/index.d.ts +0 -2
  37. package/ImageBitmap/index.js +47 -33
  38. package/ImageBitmap/index.js.map +1 -1
  39. package/LICENSE +201 -0
  40. package/SVG/SVG.js +1 -1
  41. package/SVG/SVG.js.map +1 -1
  42. package/TextDecoder/index.d.ts +0 -2
  43. package/TextDecoder/index.js +3 -12
  44. package/TextDecoder/index.js.map +1 -1
  45. package/TextEncoder/index.d.ts +0 -2
  46. package/TextEncoder/index.js +4 -13
  47. package/TextEncoder/index.js.map +1 -1
  48. package/WebGL/WebGLExtensions/index.d.ts +4 -12
  49. package/WebGL/WebGLExtensions/index.js +27 -77
  50. package/WebGL/WebGLExtensions/index.js.map +1 -1
  51. package/WebGL/WebGLProgram.d.ts +0 -1
  52. package/WebGL/WebGLProgram.js +0 -3
  53. package/WebGL/WebGLProgram.js.map +1 -1
  54. package/WebGL/WebGLRenderingContext/common.d.ts +1 -3
  55. package/WebGL/WebGLRenderingContext/common.js +3 -13
  56. package/WebGL/WebGLRenderingContext/common.js.map +1 -1
  57. package/WebGL/WebGLRenderingContext/index.d.ts +19 -17
  58. package/WebGL/WebGLRenderingContext/index.js +354 -728
  59. package/WebGL/WebGLRenderingContext/index.js.map +1 -1
  60. package/WebGL2/WebGL2RenderingContext/common.d.ts +2 -2
  61. package/WebGL2/WebGL2RenderingContext/common.js +2 -2
  62. package/WebGL2/WebGL2RenderingContext/common.js.map +1 -1
  63. package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
  64. package/WebGL2/WebGL2RenderingContext/index.js +116 -285
  65. package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
  66. package/angular/esm2020/index.mjs +4 -4
  67. package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
  68. package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
  69. package/angular/package.json +2 -2
  70. package/index.js.map +1 -1
  71. package/package.json +3 -2
  72. package/platforms/android/canvas-release.aar +0 -0
  73. package/platforms/android/include.gradle +15 -0
  74. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
  75. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +135 -68
  76. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  77. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +144 -0
  78. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2808 -68
  79. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
  80. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
  81. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +5677 -2409
  82. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +44 -25
  83. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
  84. package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +44 -25
  85. package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  86. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
  87. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +270 -136
  88. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
  89. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +144 -0
  90. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2808 -68
  91. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
  92. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
  93. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
  94. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +5677 -2409
  95. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +44 -25
  96. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
  97. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +44 -25
  98. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5677 -2409
  99. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +44 -25
  100. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
  101. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +44 -25
  102. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
  103. package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
  104. package/platforms/ios/Podfile +5 -2
  105. package/platforms/ios/build.xcconfig +3 -3
  106. package/platforms/ios/src/CanvasModule.h +0 -2
  107. package/platforms/ios/src/CanvasModule.mm +4 -4
  108. package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
  109. package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
  110. package/platforms/ios/src/cpp/Caches.cpp +35 -0
  111. package/platforms/ios/src/cpp/Caches.h +190 -0
  112. package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1593 -0
  113. package/platforms/ios/src/cpp/CanvasJSIModule.h +16 -34
  114. package/platforms/ios/src/cpp/Common.h +30 -0
  115. package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
  116. package/platforms/ios/src/cpp/Helpers.h +336 -38
  117. package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
  118. package/platforms/ios/src/cpp/ImageAssetImpl.h +46 -12
  119. package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
  120. package/platforms/ios/src/cpp/ImageBitmapImpl.h +42 -16
  121. package/platforms/ios/src/cpp/JSICallback.h +83 -5
  122. package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
  123. package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
  124. package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
  125. package/platforms/ios/src/cpp/ObjectWrapperImpl.h +31 -0
  126. package/platforms/ios/src/cpp/OneByteStringResource.cpp +55 -0
  127. package/platforms/ios/src/cpp/OneByteStringResource.h +36 -0
  128. package/platforms/ios/src/cpp/PerIsolateData.cpp +49 -0
  129. package/platforms/ios/src/cpp/PerIsolateData.h +54 -0
  130. package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
  131. package/platforms/ios/src/cpp/RafImpl.h +11 -8
  132. package/platforms/ios/src/cpp/TextDecoderImpl.cpp +193 -0
  133. package/platforms/ios/src/cpp/TextDecoderImpl.h +23 -13
  134. package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
  135. package/platforms/ios/src/cpp/TextEncoderImpl.h +21 -12
  136. package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
  137. package/platforms/ios/src/cpp/URLImpl.h +121 -0
  138. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
  139. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +29 -13
  140. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
  141. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +49 -12
  142. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2809 -0
  143. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +1331 -21
  144. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +207 -0
  145. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +27 -13
  146. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +807 -0
  147. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +173 -13
  148. package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +499 -0
  149. package/platforms/ios/src/cpp/canvas2d/Path2D.h +422 -12
  150. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
  151. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +51 -12
  152. package/platforms/ios/src/cpp/gl.h +57 -7
  153. package/platforms/ios/src/cpp/gl3stub.c +425 -0
  154. package/platforms/ios/src/cpp/gl3stub.h +665 -0
  155. package/platforms/ios/src/cpp/gles3jni.h +37 -0
  156. package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
  157. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
  158. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
  159. package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +42 -7
  160. package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +47 -11
  161. package/platforms/ios/src/cpp/webgl/WebGLProgram.h +41 -6
  162. package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +41 -7
  163. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6845 -0
  164. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +3217 -388
  165. package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +18 -17
  166. package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +16 -36
  167. package/platforms/ios/src/cpp/webgl/WebGLShader.h +41 -7
  168. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
  169. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +67 -12
  170. package/platforms/ios/src/cpp/webgl/WebGLTexture.h +41 -7
  171. package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +45 -9
  172. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +136 -0
  173. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +88 -12
  174. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
  175. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +26 -6
  176. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
  177. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +26 -6
  178. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
  179. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
  180. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
  181. package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
  182. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
  183. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
  184. package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +41 -16
  185. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
  186. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +39 -16
  187. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
  188. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +42 -6
  189. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
  190. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +110 -0
  191. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +149 -14
  192. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
  193. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
  194. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
  195. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
  196. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
  197. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
  198. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
  199. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
  200. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +38 -0
  201. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +157 -14
  202. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
  203. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -13
  204. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4564 -0
  205. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +1790 -342
  206. package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +41 -4
  207. package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
  208. package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +45 -11
  209. package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +43 -4
  210. package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +44 -4
  211. package/platforms/ios/src/module.modulemap +1 -0
  212. package/{pods → src-native/ios}/NativeScript.podspec +12 -25
  213. package/typings/objc!CanvasNative.d.ts +2038 -0
  214. package/typings/objc!CanvasNative.js +1 -0
  215. package/typings/objc!CanvasNative.js.map +1 -0
  216. package/utils.d.ts +3 -1
  217. package/utils.js +7 -20
  218. package/utils.js.map +1 -1
  219. package/angular/nativescript-canvas-angular.d.ts +0 -5
  220. package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
  221. package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
  222. package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
  223. package/platforms/ios/src/cpp/RafImpl.mm +0 -10
  224. package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
  225. package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
  226. package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -46
  227. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6156
  228. package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2867
  229. package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
  230. package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
  231. package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1972
  232. package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
  233. package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
  234. package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
  235. package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
  236. package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
  237. package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
  238. package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
  239. package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5958
  240. package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
  241. package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
  242. package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
  243. package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
  244. package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
  245. package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
  246. package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
  247. package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
  248. package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
  249. package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
  250. package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
  251. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
  252. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
  253. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
  254. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
  255. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
  256. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
  257. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
  258. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
  259. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
  260. package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
  261. package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4556
  262. package/pods/Headers/jsi/decorator.h +0 -770
  263. package/pods/Headers/jsi/instrumentation.h +0 -117
  264. package/pods/Headers/jsi/jsi-inl.h +0 -338
  265. package/pods/Headers/jsi/jsi.h +0 -1571
  266. package/pods/Headers/jsi/jsilib.h +0 -59
  267. package/pods/Headers/jsi/threadsafe.h +0 -79
  268. package/pods/Headers/v8runtime/HostProxy.h +0 -71
  269. package/pods/Headers/v8runtime/JSIV8ValueConverter.h +0 -74
  270. package/pods/Headers/v8runtime/V8PointerValue.h +0 -44
  271. package/pods/Headers/v8runtime/V8Runtime.h +0 -240
  272. package/pods/Headers/v8runtime/V8RuntimeConfig.h +0 -26
  273. package/pods/Headers/v8runtime/V8RuntimeFactory.h +0 -21
  274. /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +0 -0
  275. /package/{pods → src-native/ios}/Headers/include/APIDesign.md +0 -0
  276. /package/{pods → src-native/ios}/Headers/include/DEPS +0 -0
  277. /package/{pods → src-native/ios}/Headers/include/DIR_METADATA +0 -0
  278. /package/{pods → src-native/ios}/Headers/include/OWNERS +0 -0
  279. /package/{pods → src-native/ios}/Headers/include/cppgc/DEPS +0 -0
  280. /package/{pods → src-native/ios}/Headers/include/cppgc/OWNERS +0 -0
  281. /package/{pods → src-native/ios}/Headers/include/cppgc/README.md +0 -0
  282. /package/{pods → src-native/ios}/Headers/include/cppgc/allocation.h +0 -0
  283. /package/{pods → src-native/ios}/Headers/include/cppgc/common.h +0 -0
  284. /package/{pods → src-native/ios}/Headers/include/cppgc/cross-thread-persistent.h +0 -0
  285. /package/{pods → src-native/ios}/Headers/include/cppgc/custom-space.h +0 -0
  286. /package/{pods → src-native/ios}/Headers/include/cppgc/default-platform.h +0 -0
  287. /package/{pods → src-native/ios}/Headers/include/cppgc/ephemeron-pair.h +0 -0
  288. /package/{pods → src-native/ios}/Headers/include/cppgc/explicit-management.h +0 -0
  289. /package/{pods → src-native/ios}/Headers/include/cppgc/garbage-collected.h +0 -0
  290. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-consistency.h +0 -0
  291. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-state.h +0 -0
  292. /package/{pods → src-native/ios}/Headers/include/cppgc/heap-statistics.h +0 -0
  293. /package/{pods → src-native/ios}/Headers/include/cppgc/heap.h +0 -0
  294. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/api-constants.h +0 -0
  295. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/atomic-entry-flag.h +0 -0
  296. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/caged-heap-local-data.h +0 -0
  297. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/compiler-specific.h +0 -0
  298. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/finalizer-trait.h +0 -0
  299. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/gc-info.h +0 -0
  300. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/logging.h +0 -0
  301. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/name-trait.h +0 -0
  302. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/persistent-node.h +0 -0
  303. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/pointer-policies.h +0 -0
  304. /package/{pods → src-native/ios}/Headers/include/cppgc/internal/write-barrier.h +0 -0
  305. /package/{pods → src-native/ios}/Headers/include/cppgc/liveness-broker.h +0 -0
  306. /package/{pods → src-native/ios}/Headers/include/cppgc/macros.h +0 -0
  307. /package/{pods → src-native/ios}/Headers/include/cppgc/member.h +0 -0
  308. /package/{pods → src-native/ios}/Headers/include/cppgc/name-provider.h +0 -0
  309. /package/{pods → src-native/ios}/Headers/include/cppgc/object-size-trait.h +0 -0
  310. /package/{pods → src-native/ios}/Headers/include/cppgc/persistent.h +0 -0
  311. /package/{pods → src-native/ios}/Headers/include/cppgc/platform.h +0 -0
  312. /package/{pods → src-native/ios}/Headers/include/cppgc/prefinalizer.h +0 -0
  313. /package/{pods → src-native/ios}/Headers/include/cppgc/process-heap-statistics.h +0 -0
  314. /package/{pods → src-native/ios}/Headers/include/cppgc/sentinel-pointer.h +0 -0
  315. /package/{pods → src-native/ios}/Headers/include/cppgc/source-location.h +0 -0
  316. /package/{pods → src-native/ios}/Headers/include/cppgc/testing.h +0 -0
  317. /package/{pods → src-native/ios}/Headers/include/cppgc/trace-trait.h +0 -0
  318. /package/{pods → src-native/ios}/Headers/include/cppgc/type-traits.h +0 -0
  319. /package/{pods → src-native/ios}/Headers/include/cppgc/visitor.h +0 -0
  320. /package/{pods → src-native/ios}/Headers/include/js_protocol-1.2.json +0 -0
  321. /package/{pods → src-native/ios}/Headers/include/js_protocol-1.3.json +0 -0
  322. /package/{pods → src-native/ios}/Headers/include/js_protocol.pdl +0 -0
  323. /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffi.h +0 -0
  324. /package/{pods → src-native/ios}/Headers/include/libffi/arm64/ffitarget.h +0 -0
  325. /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffi.h +0 -0
  326. /package/{pods → src-native/ios}/Headers/include/libffi/x86_64/ffitarget.h +0 -0
  327. /package/{pods → src-native/ios}/Headers/include/libffi.h +0 -0
  328. /package/{pods → src-native/ios}/Headers/include/libplatform/DEPS +0 -0
  329. /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform-export.h +0 -0
  330. /package/{pods → src-native/ios}/Headers/include/libplatform/libplatform.h +0 -0
  331. /package/{pods → src-native/ios}/Headers/include/libplatform/v8-tracing.h +0 -0
  332. /package/{pods → src-native/ios}/Headers/include/v8-array-buffer.h +0 -0
  333. /package/{pods → src-native/ios}/Headers/include/v8-callbacks.h +0 -0
  334. /package/{pods → src-native/ios}/Headers/include/v8-container.h +0 -0
  335. /package/{pods → src-native/ios}/Headers/include/v8-context.h +0 -0
  336. /package/{pods → src-native/ios}/Headers/include/v8-cppgc.h +0 -0
  337. /package/{pods → src-native/ios}/Headers/include/v8-data.h +0 -0
  338. /package/{pods → src-native/ios}/Headers/include/v8-date.h +0 -0
  339. /package/{pods → src-native/ios}/Headers/include/v8-debug.h +0 -0
  340. /package/{pods → src-native/ios}/Headers/include/v8-embedder-heap.h +0 -0
  341. /package/{pods → src-native/ios}/Headers/include/v8-embedder-state-scope.h +0 -0
  342. /package/{pods → src-native/ios}/Headers/include/v8-exception.h +0 -0
  343. /package/{pods → src-native/ios}/Headers/include/v8-extension.h +0 -0
  344. /package/{pods → src-native/ios}/Headers/include/v8-external.h +0 -0
  345. /package/{pods → src-native/ios}/Headers/include/v8-fast-api-calls.h +0 -0
  346. /package/{pods → src-native/ios}/Headers/include/v8-forward.h +0 -0
  347. /package/{pods → src-native/ios}/Headers/include/v8-function-callback.h +0 -0
  348. /package/{pods → src-native/ios}/Headers/include/v8-function.h +0 -0
  349. /package/{pods → src-native/ios}/Headers/include/v8-initialization.h +0 -0
  350. /package/{pods → src-native/ios}/Headers/include/v8-inspector-protocol.h +0 -0
  351. /package/{pods → src-native/ios}/Headers/include/v8-inspector.h +0 -0
  352. /package/{pods → src-native/ios}/Headers/include/v8-internal.h +0 -0
  353. /package/{pods → src-native/ios}/Headers/include/v8-isolate.h +0 -0
  354. /package/{pods → src-native/ios}/Headers/include/v8-json.h +0 -0
  355. /package/{pods → src-native/ios}/Headers/include/v8-local-handle.h +0 -0
  356. /package/{pods → src-native/ios}/Headers/include/v8-locker.h +0 -0
  357. /package/{pods → src-native/ios}/Headers/include/v8-maybe.h +0 -0
  358. /package/{pods → src-native/ios}/Headers/include/v8-memory-span.h +0 -0
  359. /package/{pods → src-native/ios}/Headers/include/v8-message.h +0 -0
  360. /package/{pods → src-native/ios}/Headers/include/v8-metrics.h +0 -0
  361. /package/{pods → src-native/ios}/Headers/include/v8-microtask-queue.h +0 -0
  362. /package/{pods → src-native/ios}/Headers/include/v8-microtask.h +0 -0
  363. /package/{pods → src-native/ios}/Headers/include/v8-object.h +0 -0
  364. /package/{pods → src-native/ios}/Headers/include/v8-persistent-handle.h +0 -0
  365. /package/{pods → src-native/ios}/Headers/include/v8-platform.h +0 -0
  366. /package/{pods → src-native/ios}/Headers/include/v8-primitive-object.h +0 -0
  367. /package/{pods → src-native/ios}/Headers/include/v8-primitive.h +0 -0
  368. /package/{pods → src-native/ios}/Headers/include/v8-profiler.h +0 -0
  369. /package/{pods → src-native/ios}/Headers/include/v8-promise.h +0 -0
  370. /package/{pods → src-native/ios}/Headers/include/v8-proxy.h +0 -0
  371. /package/{pods → src-native/ios}/Headers/include/v8-regexp.h +0 -0
  372. /package/{pods → src-native/ios}/Headers/include/v8-script.h +0 -0
  373. /package/{pods → src-native/ios}/Headers/include/v8-snapshot.h +0 -0
  374. /package/{pods → src-native/ios}/Headers/include/v8-statistics.h +0 -0
  375. /package/{pods → src-native/ios}/Headers/include/v8-template.h +0 -0
  376. /package/{pods → src-native/ios}/Headers/include/v8-traced-handle.h +0 -0
  377. /package/{pods → src-native/ios}/Headers/include/v8-typed-array.h +0 -0
  378. /package/{pods → src-native/ios}/Headers/include/v8-unwinder-state.h +0 -0
  379. /package/{pods → src-native/ios}/Headers/include/v8-unwinder.h +0 -0
  380. /package/{pods → src-native/ios}/Headers/include/v8-util.h +0 -0
  381. /package/{pods → src-native/ios}/Headers/include/v8-value-serializer-version.h +0 -0
  382. /package/{pods → src-native/ios}/Headers/include/v8-value-serializer.h +0 -0
  383. /package/{pods → src-native/ios}/Headers/include/v8-value.h +0 -0
  384. /package/{pods → src-native/ios}/Headers/include/v8-version-string.h +0 -0
  385. /package/{pods → src-native/ios}/Headers/include/v8-version.h +0 -0
  386. /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-posix.h +0 -0
  387. /package/{pods → src-native/ios}/Headers/include/v8-wasm-trap-handler-win.h +0 -0
  388. /package/{pods → src-native/ios}/Headers/include/v8-wasm.h +0 -0
  389. /package/{pods → src-native/ios}/Headers/include/v8-weak-callback-info.h +0 -0
  390. /package/{pods → src-native/ios}/Headers/include/v8.h +0 -0
  391. /package/{pods → src-native/ios}/Headers/include/v8config.h +0 -0
  392. /package/{pods → src-native/ios}/Headers/inspector/InspectorServer.h +0 -0
  393. /package/{pods → src-native/ios}/Headers/inspector/JsV8InspectorClient.h +0 -0
  394. /package/{pods → src-native/ios}/Headers/inspector/base/trace_event/common/trace_event_common.h +0 -0
  395. /package/{pods → src-native/ios}/Headers/inspector/base64.h +0 -0
  396. /package/{pods → src-native/ios}/Headers/inspector/src/base/address-region.h +0 -0
  397. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomic-utils.h +0 -0
  398. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops.h +0 -0
  399. /package/{pods → src-native/ios}/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +0 -0
  400. /package/{pods → src-native/ios}/Headers/inspector/src/base/base-export.h +0 -0
  401. /package/{pods → src-native/ios}/Headers/inspector/src/base/bits.h +0 -0
  402. /package/{pods → src-native/ios}/Headers/inspector/src/base/build_config.h +0 -0
  403. /package/{pods → src-native/ios}/Headers/inspector/src/base/compiler-specific.h +0 -0
  404. /package/{pods → src-native/ios}/Headers/inspector/src/base/export-template.h +0 -0
  405. /package/{pods → src-native/ios}/Headers/inspector/src/base/flags.h +0 -0
  406. /package/{pods → src-native/ios}/Headers/inspector/src/base/immediate-crash.h +0 -0
  407. /package/{pods → src-native/ios}/Headers/inspector/src/base/lazy-instance.h +0 -0
  408. /package/{pods → src-native/ios}/Headers/inspector/src/base/logging.h +0 -0
  409. /package/{pods → src-native/ios}/Headers/inspector/src/base/macros.h +0 -0
  410. /package/{pods → src-native/ios}/Headers/inspector/src/base/memory.h +0 -0
  411. /package/{pods → src-native/ios}/Headers/inspector/src/base/once.h +0 -0
  412. /package/{pods → src-native/ios}/Headers/inspector/src/base/optional.h +0 -0
  413. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/mutex.h +0 -0
  414. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/platform.h +0 -0
  415. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/semaphore.h +0 -0
  416. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/v8-time.h +0 -0
  417. /package/{pods → src-native/ios}/Headers/inspector/src/base/platform/wrappers.h +0 -0
  418. /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions.h +0 -0
  419. /package/{pods → src-native/ios}/Headers/inspector/src/base/safe_conversions_impl.h +0 -0
  420. /package/{pods → src-native/ios}/Headers/inspector/src/base/template-utils.h +0 -0
  421. /package/{pods → src-native/ios}/Headers/inspector/src/base/v8-fallthrough.h +0 -0
  422. /package/{pods → src-native/ios}/Headers/inspector/src/common/checks.h +0 -0
  423. /package/{pods → src-native/ios}/Headers/inspector/src/common/globals.h +0 -0
  424. /package/{pods → src-native/ios}/Headers/inspector/src/debug/debug-interface.h +0 -0
  425. /package/{pods → src-native/ios}/Headers/inspector/src/debug/interface-types.h +0 -0
  426. /package/{pods → src-native/ios}/Headers/inspector/src/init/v8.h +0 -0
  427. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/custom-preview.h +0 -0
  428. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/injected-script.h +0 -0
  429. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/inspected-context.h +0 -0
  430. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/CSS.h +0 -0
  431. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Console.h +0 -0
  432. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/DOM.h +0 -0
  433. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Debugger.h +0 -0
  434. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Forward.h +0 -0
  435. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/HeapProfiler.h +0 -0
  436. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Log.h +0 -0
  437. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Network.h +0 -0
  438. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Overlay.h +0 -0
  439. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Page.h +0 -0
  440. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Profiler.h +0 -0
  441. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Protocol.h +0 -0
  442. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Runtime.h +0 -0
  443. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Schema.h +0 -0
  444. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/protocol/Security.h +0 -0
  445. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/remote-object-id.h +0 -0
  446. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/search-util.h +0 -0
  447. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-16.h +0 -0
  448. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/string-util.h +0 -0
  449. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-agent-impl.h +0 -0
  450. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console-message.h +0 -0
  451. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-console.h +0 -0
  452. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-css-agent-impl.h +0 -0
  453. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +0 -0
  454. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-id.h +0 -0
  455. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger-script.h +0 -0
  456. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-debugger.h +0 -0
  457. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-dom-agent-impl.h +0 -0
  458. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +0 -0
  459. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-impl.h +0 -0
  460. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-inspector-session-impl.h +0 -0
  461. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-log-agent-impl.h +0 -0
  462. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-network-agent-impl.h +0 -0
  463. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +0 -0
  464. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +0 -0
  465. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-page-agent-impl.h +0 -0
  466. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +0 -0
  467. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-regex.h +0 -0
  468. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +0 -0
  469. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-schema-agent-impl.h +0 -0
  470. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-stack-trace-impl.h +0 -0
  471. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-string-conversions.h +0 -0
  472. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/v8-value-utils.h +0 -0
  473. /package/{pods → src-native/ios}/Headers/inspector/src/inspector/value-mirror.h +0 -0
  474. /package/{pods → src-native/ios}/Headers/inspector/src/libplatform/default-platform.h +0 -0
  475. /package/{pods → src-native/ios}/Headers/inspector/src/logging/tracing-flags.h +0 -0
  476. /package/{pods → src-native/ios}/Headers/inspector/src/numbers/conversions.h +0 -0
  477. /package/{pods → src-native/ios}/Headers/inspector/src/tracing/trace-event.h +0 -0
  478. /package/{pods → src-native/ios}/Headers/inspector/src/utils/allocation.h +0 -0
  479. /package/{pods → src-native/ios}/Headers/inspector/src/utils/vector.h +0 -0
  480. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +0 -0
  481. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +0 -0
  482. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +0 -0
  483. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +0 -0
  484. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +0 -0
  485. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +0 -0
  486. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +0 -0
  487. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +0 -0
  488. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +0 -0
  489. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +0 -0
  490. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +0 -0
  491. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +0 -0
  492. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +0 -0
  493. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +0 -0
  494. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +0 -0
  495. /package/{pods → src-native/ios}/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +0 -0
  496. /package/{pods → src-native/ios}/Headers/inspector/utils.h +0 -0
  497. /package/{pods → src-native/ios}/Headers/inspector/v8-inspector-platform.h +0 -0
  498. /package/{pods → src-native/ios}/Headers/runtime/ArgConverter.h +0 -0
  499. /package/{pods → src-native/ios}/Headers/runtime/ArrayAdapter.h +0 -0
  500. /package/{pods → src-native/ios}/Headers/runtime/Caches.h +0 -0
  501. /package/{pods → src-native/ios}/Headers/runtime/ClassBuilder.h +0 -0
  502. /package/{pods → src-native/ios}/Headers/runtime/Common.h +0 -0
  503. /package/{pods → src-native/ios}/Headers/runtime/ConcurrentMap.h +0 -0
  504. /package/{pods → src-native/ios}/Headers/runtime/ConcurrentQueue.h +0 -0
  505. /package/{pods → src-native/ios}/Headers/runtime/Console.h +0 -0
  506. /package/{pods → src-native/ios}/Headers/runtime/Constants.h +0 -0
  507. /package/{pods → src-native/ios}/Headers/runtime/DataWrapper.h +0 -0
  508. /package/{pods → src-native/ios}/Headers/runtime/DictionaryAdapter.h +0 -0
  509. /package/{pods → src-native/ios}/Headers/runtime/ExtVector.h +0 -0
  510. /package/{pods → src-native/ios}/Headers/runtime/FFICall.h +0 -0
  511. /package/{pods → src-native/ios}/Headers/runtime/FastEnumerationAdapter.h +0 -0
  512. /package/{pods → src-native/ios}/Headers/runtime/FunctionReference.h +0 -0
  513. /package/{pods → src-native/ios}/Headers/runtime/Helpers.h +0 -0
  514. /package/{pods → src-native/ios}/Headers/runtime/InlineFunctions.h +0 -0
  515. /package/{pods → src-native/ios}/Headers/runtime/Interop.h +0 -0
  516. /package/{pods → src-native/ios}/Headers/runtime/KnownUnknownClassPair.h +0 -0
  517. /package/{pods → src-native/ios}/Headers/runtime/Metadata.h +0 -0
  518. /package/{pods → src-native/ios}/Headers/runtime/MetadataBuilder.h +0 -0
  519. /package/{pods → src-native/ios}/Headers/runtime/MetadataInlines.h +0 -0
  520. /package/{pods → src-native/ios}/Headers/runtime/ModuleInternal.h +0 -0
  521. /package/{pods → src-native/ios}/Headers/runtime/NSDataAdapter.h +0 -0
  522. /package/{pods → src-native/ios}/Headers/runtime/NativeScriptException.h +0 -0
  523. /package/{pods → src-native/ios}/Headers/runtime/ObjectManager.h +0 -0
  524. /package/{pods → src-native/ios}/Headers/runtime/OneByteStringResource.h +0 -0
  525. /package/{pods → src-native/ios}/Headers/runtime/Pointer.h +0 -0
  526. /package/{pods → src-native/ios}/Headers/runtime/PromiseProxy.h +0 -0
  527. /package/{pods → src-native/ios}/Headers/runtime/Reference.h +0 -0
  528. /package/{pods → src-native/ios}/Headers/runtime/Runtime.h +0 -0
  529. /package/{pods → src-native/ios}/Headers/runtime/RuntimeConfig.h +0 -0
  530. /package/{pods → src-native/ios}/Headers/runtime/SetTimeout.h +0 -0
  531. /package/{pods → src-native/ios}/Headers/runtime/SimpleAllocator.h +0 -0
  532. /package/{pods → src-native/ios}/Headers/runtime/StringHasher.h +0 -0
  533. /package/{pods → src-native/ios}/Headers/runtime/SymbolIterator.h +0 -0
  534. /package/{pods → src-native/ios}/Headers/runtime/SymbolLoader.h +0 -0
  535. /package/{pods → src-native/ios}/Headers/runtime/TNSDerivedClass.h +0 -0
  536. /package/{pods → src-native/ios}/Headers/runtime/TSHelpers.h +0 -0
  537. /package/{pods → src-native/ios}/Headers/runtime/Tasks.h +0 -0
  538. /package/{pods → src-native/ios}/Headers/runtime/UnmanagedType.h +0 -0
  539. /package/{pods → src-native/ios}/Headers/runtime/WeakRef.h +0 -0
  540. /package/{pods → src-native/ios}/Headers/runtime/Worker.h +0 -0
  541. /package/{pods → src-native/ios}/Headers/runtime/robin_hood.h +0 -0
@@ -6,18 +6,13 @@
6
6
  #pragma process_pending_includes
7
7
 
8
8
  #include <vector>
9
- #include "rust/cxx.h"
10
9
 
11
- #include "canvas2d/CanvasRenderingContext2DImpl.h"
10
+ #include "CanvasRenderingContext2DImpl.h"
12
11
  #include "RafImpl.h"
13
-
14
- #include "canvas-cxx/src/lib.rs.h"
15
- #import "NativeScript/JSIRuntime.h"
16
- #include "VecMutableBuffer.h"
17
12
  #include <cmath>
18
13
  #include "Helpers.h"
19
- #include "webgl/WebGLRenderingContextBase.h"
20
- #include "webgl/WebGLRenderingContext.h"
14
+ #include "WebGLRenderingContextBase.h"
15
+ #include "WebGLRenderingContext.h"
21
16
  #include "WebGLQuery.h"
22
17
  #include "WebGLSampler.h"
23
18
  #include "WebGLSyncImpl.h"
@@ -26,406 +21,1859 @@
26
21
  #include "gl.h"
27
22
 
28
23
 
29
- using namespace facebook;
30
- using namespace org::nativescript::canvas;
31
-
32
- class JSI_EXPORT WebGL2RenderingContext : public WebGLRenderingContext {
24
+ class WebGL2RenderingContext : public WebGLRenderingContext {
33
25
  public:
34
26
 
35
- WebGL2RenderingContext(rust::Box<WebGLState> state);
27
+ WebGL2RenderingContext(WebGLState *state);
28
+
29
+ WebGL2RenderingContext(WebGLState *state, WebGLRenderingVersion version);
30
+
31
+ static v8::CFunction fast_begin_query_;
32
+ static v8::CFunction fast_begin_transform_feedback_;
33
+ static v8::CFunction fast_bind_vertex_array_;
34
+ static v8::CFunction fast_bind_buffer_base_;
35
+ static v8::CFunction fast_bind_buffer_range_;
36
+ static v8::CFunction fast_bind_sampler_;
37
+ static v8::CFunction fast_bind_transform_feedback_;
38
+ static v8::CFunction fast_blit_framebuffer_;
39
+ static v8::CFunction fast_clear_buffer_fi_;
40
+ static v8::CFunction fast_clear_buffer_fv_;
41
+ static v8::CFunction fast_clear_buffer_fv_array_;
42
+ static v8::CFunction fast_clear_buffer_iv_;
43
+ static v8::CFunction fast_clear_buffer_iv_array_;
44
+ static v8::CFunction fast_clear_buffer_uiv_;
45
+ static v8::CFunction fast_clear_buffer_uiv_array_;
46
+ static v8::CFunction fast_draw_arrays_instanced_;
47
+ static v8::CFunction fast_draw_buffers_;
48
+ static v8::CFunction fast_draw_elements_instanced_;
49
+ static v8::CFunction fast_draw_range_elements_;
50
+ static v8::CFunction fast_resume_transform_feedback_;
51
+ static v8::CFunction fast_sampler_parameterf_;
52
+ static v8::CFunction fast_sampler_parameteri_;
53
+ static v8::CFunction fast_uniform_1ui_;
54
+ static v8::CFunction fast_uniform_1uiv_;
55
+ static v8::CFunction fast_uniform_2ui_;
56
+ static v8::CFunction fast_uniform_2uiv_;
57
+ static v8::CFunction fast_uniform_3ui_;
58
+ static v8::CFunction fast_uniform_3uiv_;
59
+ static v8::CFunction fast_uniform_4ui_;
60
+ static v8::CFunction fast_uniform_4uiv_;
61
+ static v8::CFunction fast_uniform_matrix_2x3fv_;
62
+ static v8::CFunction fast_uniform_matrix_2x3fv_array_;
63
+ static v8::CFunction fast_uniform_matrix_2x4fv_;
64
+ static v8::CFunction fast_uniform_matrix_2x4fv_array_;
65
+ static v8::CFunction fast_uniform_matrix_3x2fv_;
66
+ static v8::CFunction fast_uniform_matrix_3x2fv_array_;
67
+ static v8::CFunction fast_uniform_matrix_3x4fv_;
68
+ static v8::CFunction fast_uniform_matrix_3x4fv_array_;
69
+ static v8::CFunction fast_uniform_matrix_4x2fv_;
70
+ static v8::CFunction fast_uniform_matrix_4x2fv_array_;
71
+ static v8::CFunction fast_uniform_matrix_4x3fv_;
72
+ static v8::CFunction fast_uniform_matrix_4x3fv_array_;
73
+ static v8::CFunction fast_vertex_attrib_divisor_;
74
+ static v8::CFunction fast_vertex_attrib_i_4i_;
75
+ static v8::CFunction fast_vertex_attrib_i_4iv_;
76
+ static v8::CFunction fast_vertex_attrib_i_4iv_array_;
77
+ static v8::CFunction fast_vertex_attrib_i_4ui_;
78
+ static v8::CFunction fast_vertex_attrib_i_4uiv_;
79
+ static v8::CFunction fast_vertex_attrib_i_4uiv_array_;
80
+ static v8::CFunction fast_uniform_block_binding_;
81
+
82
+ static v8::CFunction fast_invalidate_framebuffer_;
83
+ static v8::CFunction fast_invalidate_sub_framebuffer_;
84
+
85
+
86
+ static v8::CFunction fast_copy_tex_sub_image_3d_;
87
+ static v8::CFunction fast_copy_buffer_sub_data_;
88
+
89
+ static v8::CFunction fast_delete_query_;
90
+ static v8::CFunction fast_delete_sampler_;
91
+ static v8::CFunction fast_delete_sync_;
92
+ static v8::CFunction fast_delete_transform_feedback_;
93
+ static v8::CFunction fast_delete_vertex_array_;
94
+
95
+ static v8::CFunction fast_end_query_;
96
+ static v8::CFunction fast_end_transform_feedback_;
97
+ static v8::CFunction fast_framebuffer_texture_layer_;
98
+
99
+
100
+ static v8::CFunction fast_pause_transform_feedback_;
101
+ static v8::CFunction fast_read_buffer_;
102
+ static v8::CFunction fast_renderbuffer_storage_multisample_;
103
+
104
+ static v8::CFunction fast_is_query_;
105
+ static v8::CFunction fast_is_sampler_;
106
+ static v8::CFunction fast_is_sync_;
107
+ static v8::CFunction fast_is_transform_feedback_;
108
+ static v8::CFunction fast_is_vertex_array_;
109
+
110
+ static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
111
+
112
+ static v8::Local<v8::Object>
113
+ NewInstance(v8::Isolate *isolate, WebGL2RenderingContext *renderingContext) {
114
+ auto context = isolate->GetCurrentContext();
115
+ v8::EscapableHandleScope scope(isolate);
116
+ auto object = WebGL2RenderingContext::GetCtor(isolate)->GetFunction(
117
+ context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
118
+ SetNativeType(object, NativeType::WebGLRenderingContextBase);
119
+ object->SetAlignedPointerInInternalField(0, renderingContext);
120
+ renderingContext->BindFinalizer(isolate, object);
121
+ return scope.Escape(object);
122
+ }
123
+
124
+ static WebGL2RenderingContext *GetPointer(const v8::Local<v8::Object> &object);
125
+
126
+ static void SetConstants(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
127
+
128
+ static void
129
+ SetProps(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &webgl2RenderingContextTpl);
130
+
131
+ static void SetMethods(v8::Isolate *isolate,
132
+ const v8::Local<v8::ObjectTemplate> &tmpl);
133
+
134
+ static void BeginQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
135
+
136
+ static void FastBeginQuery(v8::Local<v8::Object> receiver_obj, uint32_t target,
137
+ v8::Local<v8::Object> query_obj) {
138
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
139
+ if (ptr == nullptr) {
140
+ return;
141
+ }
142
+
143
+ auto type = GetNativeType(query_obj);
144
+ if (type == NativeType::WebGLQuery) {
145
+ auto query = WebGLQuery::GetPointer(query_obj);
146
+
147
+ if (query != nullptr) {
148
+ canvas_native_webgl2_begin_query(
149
+ target,
150
+ query->GetQuery(),
151
+ ptr->GetState()
152
+ );
153
+ }
154
+ }
155
+ }
156
+
157
+ static void BeginTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
158
+
159
+ static void FastBeginTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t value) {
160
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
161
+ if (ptr == nullptr) {
162
+ return;
163
+ }
164
+
165
+ canvas_native_webgl2_begin_transform_feedback(
166
+ value,
167
+ ptr->GetState()
168
+ );
169
+ }
170
+
171
+ static void BindBufferBase(const v8::FunctionCallbackInfo<v8::Value> &args);
172
+
173
+ static void
174
+ FastBindBufferBase(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
175
+ v8::Local<v8::Object> buffer_obj) {
176
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
177
+ if (ptr == nullptr) {
178
+ return;
179
+ }
180
+
181
+ auto type = GetNativeType(buffer_obj);
182
+
183
+ if (type == NativeType::WebGLBuffer) {
184
+ auto buffer = WebGLBuffer::GetPointer(buffer_obj);
185
+
186
+ canvas_native_webgl2_bind_buffer_base(
187
+ target,
188
+ index,
189
+ buffer->GetBuffer(),
190
+ ptr->GetState()
191
+ );
192
+ }
193
+ }
194
+
195
+ static void BindBufferRange(const v8::FunctionCallbackInfo<v8::Value> &args);
196
+
197
+ static void
198
+ FastBindBufferRange(v8::Local<v8::Object> receiver_obj, uint32_t target, uint32_t index,
199
+ v8::Local<v8::Object> buffer_obj, int32_t offset, int32_t size) {
200
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
201
+ if (ptr == nullptr) {
202
+ return;
203
+ }
204
+
205
+
206
+ auto type = GetNativeType(buffer_obj);
207
+ if (type == NativeType::WebGLBuffer) {
208
+ auto buffer = WebGLBuffer::GetPointer(buffer_obj);
209
+ canvas_native_webgl2_bind_buffer_range(
210
+ target,
211
+ index,
212
+ buffer->GetBuffer(),
213
+ static_cast<ssize_t>(offset),
214
+ static_cast<ssize_t>(size),
215
+ ptr->GetState()
216
+ );
217
+ }
218
+ }
219
+
220
+ static void BindSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
221
+
222
+ static void FastBindSampler(v8::Local<v8::Object> receiver_obj, uint32_t unit,
223
+ v8::Local<v8::Object> sampler_obj) {
224
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
225
+ if (ptr == nullptr) {
226
+ return;
227
+ }
228
+
229
+ auto type = GetNativeType(sampler_obj);
230
+ if (type == NativeType::WebGLSampler) {
231
+ auto sampler = WebGLSampler::GetPointer(sampler_obj);
232
+
233
+ canvas_native_webgl2_bind_sampler(
234
+ unit,
235
+ sampler->GetSampler(),
236
+ ptr->GetState()
237
+ );
238
+ }
239
+ }
240
+
241
+ static void BindTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
242
+
243
+ static void FastBindTransformFeedback(v8::Local<v8::Object> receiver_obj, uint32_t target,
244
+ v8::Local<v8::Object> transformer_obj) {
245
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
246
+ if (ptr == nullptr) {
247
+ return;
248
+ }
249
+
250
+
251
+ auto type = GetNativeType(transformer_obj);
252
+
253
+ if (type == NativeType::WebGLTransformFeedback) {
254
+ auto transformFeedback = WebGLTransformFeedback::GetPointer(transformer_obj);
255
+
256
+ canvas_native_webgl2_bind_transform_feedback(
257
+ target,
258
+ transformFeedback->GetFeedback(),
259
+ ptr->GetState()
260
+ );
261
+ }
262
+ }
263
+
264
+ static void BindVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
265
+
266
+ static void
267
+ BindVertexArrayImpl(WebGL2RenderingContext *ptr, uint32_t vertex_array) {
268
+ canvas_native_webgl2_bind_vertex_array(
269
+ vertex_array,
270
+ ptr->GetState()
271
+ );
272
+
273
+ }
274
+
275
+ static void FastBindVertexArray(v8::Local<v8::Object> receiver_obj, uint32_t vertex_array) {
276
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
277
+ if (ptr == nullptr) {
278
+ return;
279
+ }
280
+
281
+ BindVertexArrayImpl(
282
+ ptr,
283
+ vertex_array
284
+ );
285
+ }
286
+
287
+ static void BlitFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
288
+
289
+ static void
290
+ FastBlitFramebuffer(v8::Local<v8::Object> receiver_obj, int32_t srcX0, int32_t srcY0,
291
+ int32_t srcX1, int32_t srcY1, int32_t dstX0, int32_t dstY0, int32_t dstX1,
292
+ int32_t dstY1, uint32_t mask, uint32_t filter) {
293
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
294
+ if (ptr == nullptr) {
295
+ return;
296
+ }
297
+
298
+
299
+ canvas_native_webgl2_blit_framebuffer(
300
+ srcX0,
301
+ srcY0,
302
+ srcX1,
303
+ srcY1,
304
+ dstX0,
305
+ dstY0,
306
+ dstX1,
307
+ dstY1,
308
+ mask,
309
+ filter,
310
+ ptr->GetState()
311
+ );
312
+ }
313
+
314
+ static void ClearBufferfi(const v8::FunctionCallbackInfo<v8::Value> &args);
315
+
316
+ static void
317
+ FastClearBufferfi(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
318
+ double depth, int32_t stencil) {
319
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
320
+ if (ptr == nullptr) {
321
+ return;
322
+ }
36
323
 
37
- WebGL2RenderingContext(rust::Box<WebGLState> state, WebGLRenderingVersion version);
38
324
 
39
- std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt) override;
325
+ canvas_native_webgl2_clear_bufferfi(
326
+ buffer,
327
+ drawbuffer,
328
+ static_cast<float>(depth),
329
+ stencil,
330
+ ptr->GetState()
331
+ );
332
+ }
40
333
 
41
- jsi::Value get(jsi::Runtime &, const jsi::PropNameID &name) override;
334
+ static void ClearBufferfv(const v8::FunctionCallbackInfo<v8::Value> &args);
42
335
 
43
- static inline jsi::Value GetProperty(const std::string &methodName) {
44
- if (methodName == "READ_BUFFER") { return {0x0C02}; }
336
+ static void
337
+ FastClearBufferfv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
338
+ const v8::FastApiTypedArray<float> &values) {
339
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
340
+ if (ptr == nullptr) {
341
+ return;
342
+ }
45
343
 
46
- if (methodName == "UNPACK_ROW_LENGTH") { return {0x0CF2}; }
344
+ auto size = values.length();
345
+ float *data;
346
+ values.getStorageIfAligned(&data);
47
347
 
48
- if (methodName == "UNPACK_SKIP_ROWS") { return {0x0CF3}; }
49
348
 
50
- if (methodName == "UNPACK_SKIP_PIXELS") { return {0x0CF4}; }
349
+ canvas_native_webgl2_clear_bufferfv(
350
+ buffer,
351
+ drawbuffer,
352
+ data,
353
+ size,
354
+ ptr->GetState()
355
+ );
356
+ }
51
357
 
52
- if (methodName == "PACK_ROW_LENGTH") { return {0x0D02}; }
358
+ static void
359
+ FastClearBufferfvArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
360
+ v8::Local<v8::Array> values) {
361
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
362
+ if (ptr == nullptr) {
363
+ return;
364
+ }
365
+
366
+ auto len = values->Length();
367
+ std::vector<float> buf;
368
+ buf.reserve(len);
369
+
370
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
371
+ values, buf.data(), len);
372
+
373
+
374
+ if (copied) {
375
+ canvas_native_webgl2_clear_bufferfv(
376
+ buffer,
377
+ drawbuffer,
378
+ buf.data(),
379
+ buf.size(),
380
+ ptr->GetState()
381
+ );
382
+ }
383
+ }
53
384
 
54
- if (methodName == "PACK_SKIP_ROWS") { return {0x0D03}; }
385
+ static void ClearBufferiv(const v8::FunctionCallbackInfo<v8::Value> &args);
55
386
 
56
- if (methodName == "PACK_SKIP_PIXELS") { return {0x0D04}; }
387
+ static void
388
+ FastClearBufferiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
389
+ const v8::FastApiTypedArray<int32_t> &values) {
390
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
391
+ if (ptr == nullptr) {
392
+ return;
393
+ }
57
394
 
58
- if (methodName == "TEXTURE_BINDING_3D") { return {0x806A}; }
395
+ auto size = values.length();
396
+ int32_t *data;
397
+ values.getStorageIfAligned(&data);
59
398
 
60
- if (methodName == "UNPACK_SKIP_IMAGES") { return {0x806D}; }
61
399
 
62
- if (methodName == "UNPACK_IMAGE_HEIGHT") { return {0x806E}; }
400
+ canvas_native_webgl2_clear_bufferiv(
401
+ buffer,
402
+ drawbuffer,
403
+ data,
404
+ size,
405
+ ptr->GetState()
406
+ );
407
+ }
63
408
 
64
- if (methodName == "MAX_3D_TEXTURE_SIZE") { return {0x8073}; }
409
+ static void
410
+ FastClearBufferivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
411
+ v8::Local<v8::Array> values) {
412
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
413
+ if (ptr == nullptr) {
414
+ return;
415
+ }
416
+
417
+ auto len = values->Length();
418
+ std::vector<int32_t> buf;
419
+ buf.reserve(len);
420
+
421
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
422
+ values, buf.data(), len);
423
+
424
+
425
+ if (copied) {
426
+ canvas_native_webgl2_clear_bufferiv(
427
+ buffer,
428
+ drawbuffer,
429
+ buf.data(),
430
+ buf.size(),
431
+ ptr->GetState()
432
+ );
433
+ }
434
+ }
65
435
 
66
- if (methodName == "MAX_ELEMENTS_VERTICES") { return {0x80E8}; }
67
436
 
68
- if (methodName == "MAX_ELEMENTS_INDICES") { return {0x80E9}; }
437
+ static void ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args);
69
438
 
70
- if (methodName == "MAX_TEXTURE_LOD_BIAS") { return {0x84FD}; }
71
439
 
72
- if (methodName == "MAX_FRAGMENT_UNIFORM_COMPONENTS") { return {0x8B49}; }
440
+ static void
441
+ FastClearBufferuiv(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
442
+ const v8::FastApiTypedArray<uint32_t> &values) {
443
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
444
+ if (ptr == nullptr) {
445
+ return;
446
+ }
73
447
 
74
- if (methodName == "MAX_VERTEX_UNIFORM_COMPONENTS") { return {0x8B4A}; }
448
+ auto size = values.length();
449
+ uint32_t *data;
450
+ values.getStorageIfAligned(&data);
75
451
 
76
- if (methodName == "MAX_ARRAY_TEXTURE_LAYERS") { return {0x88FF}; }
77
452
 
78
- if (methodName == "MIN_PROGRAM_TEXEL_OFFSET") { return {0x8904}; }
453
+ canvas_native_webgl2_clear_bufferuiv(
454
+ buffer,
455
+ drawbuffer,
456
+ data,
457
+ size,
458
+ ptr->GetState()
459
+ );
460
+ }
79
461
 
80
- if (methodName == "MAX_PROGRAM_TEXEL_OFFSET") { return {0x8905}; }
462
+ static void
463
+ FastClearBufferuivArray(v8::Local<v8::Object> receiver_obj, uint32_t buffer, int32_t drawbuffer,
464
+ v8::Local<v8::Array> values) {
465
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
466
+ if (ptr == nullptr) {
467
+ return;
468
+ }
469
+
470
+ auto len = values->Length();
471
+ std::vector<uint32_t> buf;
472
+ buf.reserve(len);
473
+
474
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
475
+ values, buf.data(), len);
476
+
477
+
478
+ if (copied) {
479
+ canvas_native_webgl2_clear_bufferuiv(
480
+ buffer,
481
+ drawbuffer,
482
+ buf.data(),
483
+ buf.size(),
484
+ ptr->GetState()
485
+ );
486
+ }
487
+ }
81
488
 
82
- if (methodName == "MAX_VARYING_COMPONENTS") { return {0x8B4B}; }
489
+ static void ClientWaitSync(const v8::FunctionCallbackInfo<v8::Value> &args);
83
490
 
84
- if (methodName == "FRAGMENT_SHADER_DERIVATIVE_HINT") { return {0x8B8B}; }
491
+ static void CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
85
492
 
86
- if (methodName == "RASTERIZER_DISCARD") { return {0x8C89}; }
493
+ static void CopyBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
87
494
 
88
- if (methodName == "VERTEX_ARRAY_BINDING") { return {0x85B5}; }
89
- if (methodName == "MAX_VERTEX_OUTPUT_COMPONENTS") { return {0x9122}; }
90
- if (methodName == "MAX_FRAGMENT_INPUT_COMPONENTS") { return {0x9125}; }
91
- if (methodName == "MAX_SERVER_WAIT_TIMEOUT") { return {0x9111}; }
92
- if (methodName == "MAX_ELEMENT_INDEX") { return {0x8D6B}; }
495
+ static void FastCopyBufferSubData(v8::Local<v8::Object> receiver_obj, uint32_t readTarget,
496
+ uint32_t writeTarget, int32_t readOffset, int32_t writeOffset,
497
+ uint32_t size) {
498
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
499
+ if (ptr == nullptr) {
500
+ return;
501
+ }
93
502
 
94
- if (methodName == "RED") { return {0x1903}; }
95
- if (methodName == "RGB8") { return {0x8051}; }
96
- if (methodName == "RGBA8") { return {0x8058}; }
97
- if (methodName == "RGB10_A2") { return {0x8059}; }
98
- if (methodName == "TEXTURE_3D") { return {0x806F}; }
503
+ canvas_native_webgl2_copy_buffer_sub_data(
504
+ readTarget,
505
+ writeTarget,
506
+ static_cast<ssize_t>(readOffset),
507
+ static_cast<ssize_t>(writeOffset),
508
+ static_cast<ssize_t>(size),
509
+ ptr->GetState()
510
+ );
511
+ }
99
512
 
100
- if (methodName == "TEXTURE_WRAP_R") { return {0x8072}; }
101
- if (methodName == "TEXTURE_MIN_LOD") { return {0x813A}; }
102
- if (methodName == "TEXTURE_MAX_LOD") { return {0x813B}; }
103
- if (methodName == "TEXTURE_BASE_LEVEL") { return {0x813C}; }
104
- if (methodName == "TEXTURE_MAX_LEVEL") { return {0x813D}; }
513
+ static void CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
514
+
515
+ static void
516
+ FastCopyTexSubImage3D(v8::Local<v8::Object> receiver_obj, uint32_t target, int32_t level,
517
+ int32_t xoffset, int32_t yoffset, int32_t zoffset, int32_t x, int32_t y,
518
+ int32_t width, int32_t height) {
519
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
520
+ if (ptr == nullptr) {
521
+ return;
522
+ }
523
+
524
+
525
+ canvas_native_webgl2_copy_tex_sub_image3d(
526
+ target,
527
+ level,
528
+ xoffset,
529
+ yoffset,
530
+ zoffset,
531
+ x,
532
+ y,
533
+ width,
534
+ height,
535
+ ptr->GetState()
536
+ );
537
+ }
105
538
 
539
+ static void CreateQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
106
540
 
107
- if (methodName == "TEXTURE_COMPARE_MODE") { return {0x884C}; }
108
- if (methodName == "TEXTURE_COMPARE_FUNC") { return {0x884D}; }
109
- if (methodName == "SRGB") { return {0x8C40}; }
110
- if (methodName == "SRGB8") { return {0x8C41}; }
111
- if (methodName == "SRGB8_ALPHA8") { return {0x8C43}; }
541
+ static void CreateSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
112
542
 
113
- if (methodName == "COMPARE_REF_TO_TEXTURE") { return {0x884E}; }
114
- if (methodName == "RGBA32F") { return {0x8814}; }
115
- if (methodName == "RGB32F") { return {0x8815}; }
116
- if (methodName == "RGBA16F") { return {0x881A}; }
117
- if (methodName == "RGB16F") { return {0x881B}; }
543
+ static void CreateTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
118
544
 
119
- if (methodName == "TEXTURE_2D_ARRAY") { return {0x8C1A}; }
120
- if (methodName == "TEXTURE_BINDING_2D_ARRAY") { return {0x8C1D}; }
121
- if (methodName == "R11F_G11F_B10F") { return {0x8C3A}; }
122
- if (methodName == "RGB9_E5") { return {0x8C3D}; }
123
- if (methodName == "RGBA32UI") { return {0x8D70}; }
545
+ static void CreateVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
124
546
 
547
+ static void DeleteQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
125
548
 
126
- if (methodName == "RGB32UI") { return {0x8D71}; }
127
- if (methodName == "RGBA16UI") { return {0x8D76}; }
128
- if (methodName == "RGB16UI") { return {0x8D77}; }
129
- if (methodName == "RGBA8UI") { return {0x8D7C}; }
130
- if (methodName == "RGB8UI") { return {0x8D7D}; }
549
+ static void
550
+ FastDeleteQuery(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> query_obj) {
551
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
552
+ if (ptr == nullptr) {
553
+ return;
554
+ }
131
555
 
556
+ auto type = GetNativeType(query_obj);
557
+ if (type == NativeType::WebGLQuery) {
558
+ auto query = WebGLQuery::GetPointer(query_obj);
132
559
 
133
- if (methodName == "RGBA32I") { return {0x8D82}; }
134
- if (methodName == "RGB32I") { return {0x8D83}; }
135
- if (methodName == "RGBA16I") { return {0x8D88}; }
136
- if (methodName == "RGB16I") { return {0x8D89}; }
137
- if (methodName == "RGBA8I") { return {0x8D8E}; }
560
+ if (query != nullptr) {
561
+ canvas_native_webgl2_delete_query_with_query(
562
+ query->GetQuery(),
563
+ ptr->GetState()
564
+ );
565
+ }
566
+ }
567
+ }
138
568
 
569
+ static void DeleteSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
139
570
 
140
- if (methodName == "RGB8I") { return {0x8D8F}; }
141
- if (methodName == "RED_INTEGER") { return {0x8D94}; }
142
- if (methodName == "RGB_INTEGER") { return {0x8D98}; }
143
- if (methodName == "RGBA_INTEGER") { return {0x8D99}; }
144
- if (methodName == "R8") { return {0x8229}; }
571
+ static void
572
+ FastDeleteSampler(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj) {
573
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
574
+ if (ptr == nullptr) {
575
+ return;
576
+ }
145
577
 
578
+ auto type = GetNativeType(sampler_obj);
146
579
 
147
- if (methodName == "RG8") { return {0x822B}; }
148
- if (methodName == "R16F") { return {0x822D}; }
149
- if (methodName == "R32F") { return {0x822E}; }
150
- if (methodName == "RG16F") { return {0x822F}; }
151
- if (methodName == "RG32F") { return {0x8230}; }
580
+ if (type == NativeType::WebGLSampler) {
581
+ auto sampler = WebGLSampler::GetPointer(sampler_obj);
152
582
 
583
+ if (sampler != nullptr) {
584
+ canvas_native_webgl2_delete_sampler_with_sampler(
585
+ sampler->GetSampler(),
586
+ ptr->GetState()
587
+ );
588
+ }
589
+ }
590
+ }
153
591
 
154
- if (methodName == "R8I") { return {0x8231}; }
155
- if (methodName == "R8UI") { return {0x8232}; }
156
- if (methodName == "R16I") { return {0x8233}; }
157
- if (methodName == "R16UI") { return {0x8234}; }
158
- if (methodName == "R32I") { return {0x8235}; }
592
+ static void DeleteSync(const v8::FunctionCallbackInfo<v8::Value> &args);
593
+
594
+ static void FastDeleteSync(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sync_obj) {
595
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
596
+ if (ptr == nullptr) {
597
+ return;
598
+ }
599
+
600
+ auto type = GetNativeType(sync_obj);
601
+ if (type == NativeType::WebGLSync) {
602
+ auto sync = WebGLSyncImpl::GetPointer(sync_obj);
603
+
604
+ if (sync != nullptr) {
605
+ canvas_native_webgl2_delete_sync_with_sync(
606
+ sync->GetSync(),
607
+ ptr->GetState()
608
+ );
609
+ }
610
+ }
611
+ }
159
612
 
613
+ static void DeleteTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
160
614
 
161
- if (methodName == "R32UI") { return {0x8236}; }
162
- if (methodName == "RG8I") { return {0x8237}; }
163
- if (methodName == "RG8UI") { return {0x8238}; }
164
- if (methodName == "RG16I") { return {0x8239}; }
165
- if (methodName == "RG16UI") { return {0x823A}; }
166
-
167
- if (methodName == "RG32I") { return {0x823B}; }
168
- if (methodName == "RG32UI") { return {0x823C}; }
169
- if (methodName == "R8_SNORM") { return {0x8F94}; }
170
- if (methodName == "RG8_SNORM") { return {0x8F95}; }
171
- if (methodName == "RGB8_SNORM") { return {0x8F96}; }
172
-
173
-
174
- if (methodName == "RGBA8_SNORM") { return {0x8F97}; }
175
- if (methodName == "RGB10_A2UI") { return {0x906F}; }
176
- if (methodName == "TEXTURE_IMMUTABLE_FORMAT") { return {0x912F}; }
177
- if (methodName == "TEXTURE_IMMUTABLE_LEVELS") { return {0x82DF}; }
178
- if (methodName == "UNSIGNED_INT_2_10_10_10_REV") { return {0x8368}; }
179
-
180
-
181
- if (methodName == "UNSIGNED_INT_10F_11F_11F_REV") { return {0x8C3B}; }
182
- if (methodName == "UNSIGNED_INT_5_9_9_9_REV") { return {0x8C3E}; }
183
- if (methodName == "FLOAT_32_UNSIGNED_INT_24_8_REV") { return {0x8DAD}; }
184
- if (methodName == "UNSIGNED_INT_24_8") { return {0x84FA}; }
185
- if (methodName == "HALF_FLOAT") { return {0x140B}; }
186
-
187
-
188
- if (methodName == "RG") { return {0x8227}; }
189
- if (methodName == "RG_INTEGER") { return {0x8228}; }
190
- if (methodName == "INT_2_10_10_10_REV") { return {0x8D9F}; }
191
- if (methodName == "QUERY_RESULT_AVAILABLE") { return {0x8865}; }
192
- if (methodName == "QUERY_RESULT") { return {0x8866}; }
193
-
194
-
195
- if (methodName == "CURRENT_QUERY") { return {0x8867}; }
196
- if (methodName == "ANY_SAMPLES_PASSED") { return {0x8C2F}; }
197
- if (methodName == "ANY_SAMPLES_PASSED_CONSERVATIVE") { return {0x8D6A}; }
198
- if (methodName == "MAX_DRAW_BUFFERS") { return {0x8824}; }
199
-
200
- if (methodName == "DRAW_BUFFER0") { return {0x8825}; }
201
- if (methodName == "DRAW_BUFFER1") { return {0x8826}; }
202
- if (methodName == "DRAW_BUFFER2") { return {0x8827}; }
203
- if (methodName == "DRAW_BUFFER3") { return {0x8828}; }
204
- if (methodName == "DRAW_BUFFER4") { return {0x8829}; }
205
- if (methodName == "DRAW_BUFFER5") { return {0x882A}; }
206
- if (methodName == "DRAW_BUFFER6") { return {0x882B}; }
207
- if (methodName == "DRAW_BUFFER7") { return {0x882C}; }
208
- if (methodName == "DRAW_BUFFER8") { return {0x882D}; }
209
- if (methodName == "DRAW_BUFFER9") { return {0x882E}; }
210
- if (methodName == "DRAW_BUFFER10") { return {0x882F}; }
211
-
212
- /* Getting GL parameter information */
213
-
214
- /* Textures */
215
-
216
- if (methodName == "DRAW_BUFFER11") { return {0x8830}; }
217
- if (methodName == "DRAW_BUFFER12") { return {0x8831}; }
218
- if (methodName == "DRAW_BUFFER13") { return {0x8832}; }
219
- if (methodName == "DRAW_BUFFER14") { return {0x8833}; }
220
- if (methodName == "DRAW_BUFFER15") { return {0x8834}; }
221
-
222
- if (methodName == "MAX_COLOR_ATTACHMENTS") { return {0x8CDF}; }
223
- if (methodName == "COLOR_ATTACHMENT1") { return {0x8CE1}; }
224
- if (methodName == "COLOR_ATTACHMENT2") { return {0x8CE2}; }
225
- if (methodName == "COLOR_ATTACHMENT3") { return {0x8CE3}; }
226
- if (methodName == "COLOR_ATTACHMENT4") { return {0x8CE4}; }
227
- if (methodName == "COLOR_ATTACHMENT5") { return {0x8CE5}; }
228
- if (methodName == "COLOR_ATTACHMENT6") { return {0x8CE6}; }
229
- if (methodName == "COLOR_ATTACHMENT7") { return {0x8CE7}; }
230
- if (methodName == "COLOR_ATTACHMENT8") { return {0x8CE8}; }
231
- if (methodName == "COLOR_ATTACHMENT9") { return {0x8CE9}; }
232
- if (methodName == "COLOR_ATTACHMENT10") { return {0x8CEA}; }
233
- if (methodName == "COLOR_ATTACHMENT11") { return {0x8CEB}; }
234
- if (methodName == "COLOR_ATTACHMENT12") { return {0x8CEC}; }
235
- if (methodName == "COLOR_ATTACHMENT13") { return {0x8CED}; }
236
- if (methodName == "COLOR_ATTACHMENT14") { return {0x8CEE}; }
237
- if (methodName == "COLOR_ATTACHMENT15") { return {0x8CEF}; }
238
-
239
- if (methodName == "SAMPLER_3D") { return {0x8B5F}; }
240
- if (methodName == "SAMPLER_2D_SHADOW") { return {0x8B62}; }
241
- if (methodName == "SAMPLER_2D_ARRAY") { return {0x8DC1}; }
242
- if (methodName == "SAMPLER_2D_ARRAY_SHADOW") { return {0x8DC4}; }
243
- if (methodName == "SAMPLER_CUBE_SHADOW") { return {0x8DC5}; }
244
-
245
- if (methodName == "INT_SAMPLER_2D") { return {0x8DCA}; }
246
- if (methodName == "INT_SAMPLER_3D") { return {0x8DCB}; }
247
- if (methodName == "INT_SAMPLER_CUBE") { return {0x8DCC}; }
248
- if (methodName == "INT_SAMPLER_2D_ARRAY") { return {0x8DCF}; }
249
- if (methodName == "UNSIGNED_INT_SAMPLER_2D") { return {0x8DD2}; }
250
-
251
- if (methodName == "UNSIGNED_INT_SAMPLER_3D") { return {0x8DD3}; }
252
- if (methodName == "UNSIGNED_INT_SAMPLER_CUBE") { return {0x8DD4}; }
253
- if (methodName == "UNSIGNED_INT_SAMPLER_2D_ARRAY") { return {0x8DD7}; }
254
- if (methodName == "MAX_SAMPLES") { return {0x8D57}; }
255
- if (methodName == "SAMPLER_BINDING") { return {0x8919}; }
256
-
257
- if (methodName == "PIXEL_PACK_BUFFER") { return {0x88EB}; }
258
- if (methodName == "PIXEL_UNPACK_BUFFER") { return {0x88EC}; }
259
- if (methodName == "PIXEL_PACK_BUFFER_BINDING") { return {0x88ED}; }
260
- if (methodName == "PIXEL_UNPACK_BUFFER_BINDING") { return {0x88EF}; }
261
- if (methodName == "COPY_READ_BUFFER") { return {0x8F36}; }
262
-
263
- if (methodName == "COPY_WRITE_BUFFER") { return {0x8F37}; }
264
- if (methodName == "COPY_READ_BUFFER_BINDING") { return {0x8F36}; }
265
- if (methodName == "COPY_WRITE_BUFFER_BINDING") { return {0x8F37}; }
266
- if (methodName == "FLOAT_MAT2x3") { return {0x8B65}; }
267
- if (methodName == "FLOAT_MAT2x4") { return {0x8B66}; }
268
-
269
- if (methodName == "FLOAT_MAT3x2") { return {0x8B67}; }
270
- if (methodName == "FLOAT_MAT3x4") { return {0x8B68}; }
271
- if (methodName == "FLOAT_MAT4x2") { return {0x8B69}; }
272
- if (methodName == "FLOAT_MAT4x3") { return {0x8B6A}; }
273
- if (methodName == "UNSIGNED_INT_VEC2") { return {0x8DC6}; }
274
-
275
- if (methodName == "UNSIGNED_INT_VEC3") { return {0x8DC7}; }
276
- if (methodName == "UNSIGNED_INT_VEC4") { return {0x8DC8}; }
277
- if (methodName == "UNSIGNED_NORMALIZED") { return {0x8C17}; }
278
- if (methodName == "SIGNED_NORMALIZED") { return {0x8F9C}; }
279
-
280
- /* Vertex attributes */
281
-
282
- if (methodName == "VERTEX_ATTRIB_ARRAY_INTEGER") { return {0x88FD}; }
283
- if (methodName == "VERTEX_ATTRIB_ARRAY_DIVISOR") { return {0x88FE}; }
284
- if (methodName == "TRANSFORM_FEEDBACK_BUFFER_MODE") { return {0x8C7F}; }
285
- if (methodName == "MAX_TRANSFORM_FEEDBACK_SEPARATE_COMPONENTS") { return {0x8C80}; }
286
- if (methodName == "TRANSFORM_FEEDBACK_VARYINGS") { return {0x8C83}; }
287
-
288
- if (methodName == "TRANSFORM_FEEDBACK_BUFFER_START") { return {0x8C84}; }
289
- if (methodName == "TRANSFORM_FEEDBACK_BUFFER_SIZE") { return {0x8C85}; }
290
- if (methodName == "TRANSFORM_FEEDBACK_PRIMITIVES_WRITTEN") { return {0x8C88}; }
291
- if (methodName == "MAX_TRANSFORM_FEEDBACK_INTERLEAVED_COMPONENTS") { return {0x8C8A}; }
292
-
293
- /* Textures */
294
-
295
- /* Pixel types */
296
-
297
- if (methodName == "MAX_TRANSFORM_FEEDBACK_SEPARATE_ATTRIBS") { return {0x8C8B}; }
298
- if (methodName == "INTERLEAVED_ATTRIBS") { return {0x8C8C}; }
299
- if (methodName == "SEPARATE_ATTRIBS") { return {0x8C8D}; }
300
- if (methodName == "TRANSFORM_FEEDBACK_BUFFER") { return {0x8C8E}; }
301
- if (methodName == "TRANSFORM_FEEDBACK_BUFFER_BINDING") { return {0x8C8F}; }
302
-
303
- if (methodName == "TRANSFORM_FEEDBACK") { return {0x8E22}; }
304
- if (methodName == "TRANSFORM_FEEDBACK_PAUSED") { return {0x8E23}; }
305
- if (methodName == "TRANSFORM_FEEDBACK_ACTIVE") { return {0x8E24}; }
306
- if (methodName == "TRANSFORM_FEEDBACK_BINDING") { return {0x8E25}; }
307
-
308
- /* Pixel types */
309
-
310
- /* Queries */
311
-
312
- if (methodName == "FRAMEBUFFER_ATTACHMENT_COLOR_ENCODING") { return {0x8210}; }
313
- if (methodName == "FRAMEBUFFER_ATTACHMENT_COMPONENT_TYPE") { return {0x8211}; }
314
- if (methodName == "FRAMEBUFFER_ATTACHMENT_RED_SIZE") { return {0x8212}; }
315
- if (methodName == "FRAMEBUFFER_ATTACHMENT_GREEN_SIZE") { return {0x8213}; }
316
- if (methodName == "FRAMEBUFFER_ATTACHMENT_BLUE_SIZE") { return {0x8214}; }
317
-
318
- /* Queries */
319
-
320
- /* Draw buffers */
321
-
322
- if (methodName == "FRAMEBUFFER_ATTACHMENT_ALPHA_SIZE") { return {0x8215}; }
323
- if (methodName == "FRAMEBUFFER_ATTACHMENT_DEPTH_SIZE") { return {0x8216}; }
324
- if (methodName == "FRAMEBUFFER_ATTACHMENT_STENCIL_SIZE") { return {0x8217}; }
325
- if (methodName == "FRAMEBUFFER_DEFAULT") { return {0x8218}; }
326
- if (methodName == "DEPTH_STENCIL_ATTACHMENT") { return {0x821A}; }
327
-
328
- if (methodName == "DEPTH_STENCIL") { return {0x84F9}; }
329
- if (methodName == "DEPTH24_STENCIL8") { return {0x88F0}; }
330
- if (methodName == "DRAW_FRAMEBUFFER_BINDING") { return {0x8CA6}; }
331
- if (methodName == "READ_FRAMEBUFFER") { return {0x8CA8}; }
332
- if (methodName == "DRAW_FRAMEBUFFER") { return {0x8CA9}; }
333
-
334
- if (methodName == "READ_FRAMEBUFFER_BINDING") { return {0x8CAA}; }
335
- if (methodName == "RENDERBUFFER_SAMPLES") { return {0x8CAB}; }
336
- if (methodName == "FRAMEBUFFER_ATTACHMENT_TEXTURE_LAYER") { return {0x8CD4}; }
337
- if (methodName == "FRAMEBUFFER_INCOMPLETE_MULTISAMPLE") { return {0x8D56}; }
338
- if (methodName == "UNIFORM_BUFFER") { return {0x8A11}; }
339
-
340
- if (methodName == "UNIFORM_BUFFER_BINDING") { return {0x8A28}; }
341
- if (methodName == "UNIFORM_BUFFER_START") { return {0x8A29}; }
342
- if (methodName == "UNIFORM_BUFFER_SIZE") { return {0x8A2A}; }
343
- if (methodName == "MAX_VERTEX_UNIFORM_BLOCKS") { return {0x8A2B}; }
344
- if (methodName == "MAX_FRAGMENT_UNIFORM_BLOCKS") { return {0x8A2D}; }
345
-
346
- if (methodName == "MAX_COMBINED_UNIFORM_BLOCKS") { return {0x8A2E}; }
347
- if (methodName == "MAX_UNIFORM_BUFFER_BINDINGS") { return {0x8A2F}; }
348
- if (methodName == "MAX_UNIFORM_BLOCK_SIZE") { return {0x8A30}; }
349
- if (methodName == "MAX_COMBINED_VERTEX_UNIFORM_COMPONENTS") { return {0x8A31}; }
350
- if (methodName == "MAX_COMBINED_FRAGMENT_UNIFORM_COMPONENTS") { return {0x8A33}; }
351
-
352
- if (methodName == "UNIFORM_BUFFER_OFFSET_ALIGNMENT") { return {0x8A34}; }
353
- if (methodName == "ACTIVE_UNIFORM_BLOCKS") { return {0x8A36}; }
354
- if (methodName == "UNIFORM_TYPE") { return {0x8A37}; }
355
- if (methodName == "UNIFORM_SIZE") { return {0x8A38}; }
356
- if (methodName == "UNIFORM_BLOCK_INDEX") { return {0x8A3A}; }
357
-
358
- if (methodName == "UNIFORM_OFFSET") { return {0x8A3B}; }
359
- if (methodName == "UNIFORM_ARRAY_STRIDE") { return {0x8A3C}; }
360
- if (methodName == "UNIFORM_MATRIX_STRIDE") { return {0x8A3D}; }
615
+ static void FastDeleteTransformFeedback(v8::Local<v8::Object> receiver_obj,
616
+ v8::Local<v8::Object> transform_feedback_obj) {
617
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
618
+ if (ptr == nullptr) {
619
+ return;
620
+ }
361
621
 
362
- /* Draw buffers */
363
622
 
364
- /* Samplers */
623
+ auto type = GetNativeType(transform_feedback_obj);
624
+ if (type == NativeType::WebGLTransformFeedback) {
625
+ auto transformFeedback = WebGLTransformFeedback::GetPointer(
626
+ transform_feedback_obj);
365
627
 
366
- if (methodName == "UNIFORM_IS_ROW_MAJOR") { return {0x8A3E}; }
367
- if (methodName == "UNIFORM_BLOCK_BINDING") { return {0x8A3F}; }
368
- if (methodName == "UNIFORM_BLOCK_DATA_SIZE") { return {0x8A40}; }
369
- if (methodName == "UNIFORM_BLOCK_ACTIVE_UNIFORMS") { return {0x8A42}; }
370
- if (methodName == "UNIFORM_BLOCK_ACTIVE_UNIFORM_INDICES") { return {0x8A43}; }
628
+ if (transformFeedback != nullptr) {
629
+ canvas_native_webgl2_delete_transform_feedback(
630
+ transformFeedback->GetFeedback(),
631
+ ptr->GetState()
632
+ );
633
+ }
634
+ }
635
+ }
371
636
 
372
- if (methodName == "UNIFORM_BLOCK_REFERENCED_BY_VERTEX_SHADER") { return {0x8A44}; }
373
- if (methodName == "UNIFORM_BLOCK_REFERENCED_BY_FRAGMENT_SHADER") { return {0x8A46}; }
374
- if (methodName == "OBJECT_TYPE") { return {0x9112}; }
375
- if (methodName == "SYNC_CONDITION") { return {0x9113}; }
376
- if (methodName == "SYNC_STATUS") { return {0x9114}; }
637
+ static void DeleteVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
638
+
639
+ static void FastDeleteVertexArray(v8::Local<v8::Object> receiver_obj,
640
+ v8::Local<v8::Object> vertex_array_obj) {
641
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
642
+ if (ptr == nullptr) {
643
+ return;
644
+ }
645
+
646
+ auto type = GetNativeType(vertex_array_obj);
647
+ if (type == NativeType::WebGLVertexArrayObject) {
648
+
649
+ auto vertexArray = WebGLVertexArrayObject::GetPointer(vertex_array_obj);
650
+ if (vertexArray != nullptr) {
651
+ canvas_native_webgl2_delete_vertex_array_with_vertex_array(
652
+ vertexArray->GetVertexArrayObject(),
653
+ ptr->GetState()
654
+ );
655
+ }
656
+ }
657
+ }
377
658
 
378
- if (methodName == "SYNC_FLAGS") { return {0x9115}; }
379
- if (methodName == "SYNC_FENCE") { return {0x9116}; }
380
- if (methodName == "SYNC_GPU_COMMANDS_COMPLETE") { return {0x9117}; }
381
- if (methodName == "UNSIGNALED") { return {0x9118}; }
382
- if (methodName == "SIGNALED") { return {0x9119}; }
659
+ static void DrawArraysInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
383
660
 
384
- /* Samplers */
661
+ static void
662
+ FastDrawArraysInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t first,
663
+ int32_t count, int32_t instanceCount) {
664
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
665
+ if (ptr == nullptr) {
666
+ return;
667
+ }
385
668
 
386
- /* Buffers */
387
669
 
388
- if (methodName == "ALREADY_SIGNALED") { return {0x911A}; }
389
- if (methodName == "TIMEOUT_EXPIRED") { return {0x911B}; }
390
- if (methodName == "CONDITION_SATISFIED") { return {0x911C}; }
391
- if (methodName == "WAIT_FAILED") { return {0x911D}; }
392
- if (methodName == "SYNC_FLUSH_COMMANDS_BIT") { return {0x00000001}; }
670
+ canvas_native_webgl2_draw_arrays_instanced(
671
+ mode,
672
+ first,
673
+ count,
674
+ instanceCount,
675
+ ptr->GetState()
676
+ );
393
677
 
394
- if (methodName == "COLOR") { return {0x1800}; }
395
- if (methodName == "DEPTH") { return {0x1801}; }
396
- if (methodName == "STENCIL") { return {0x1802}; }
678
+ ptr->UpdateInvalidateState();
679
+ }
397
680
 
398
- /* Buffers */
681
+ static void DrawBuffers(const v8::FunctionCallbackInfo<v8::Value> &args);
399
682
 
400
- /* Data types */
683
+ static void FastDrawBuffers(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Array> buffers) {
684
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
685
+ if (ptr == nullptr) {
686
+ return;
687
+ }
401
688
 
402
- if (methodName == "MIN") { return {0x8007}; }
403
- if (methodName == "MAX") { return {0x8008}; }
404
- if (methodName == "DEPTH_COMPONENT24") { return {0x81A6}; }
405
- if (methodName == "STREAM_READ") { return {0x88E1}; }
406
- if (methodName == "STREAM_COPY") { return {0x88E2}; }
689
+ auto len = buffers->Length();
690
+ std::vector<uint32_t> buf;
691
+ buf.reserve(len);
407
692
 
408
- if (methodName == "STATIC_READ") { return {0x88E5}; }
409
- if (methodName == "STATIC_COPY") { return {0x88E6}; }
410
- if (methodName == "DYNAMIC_READ") { return {0x88E9}; }
411
- if (methodName == "DYNAMIC_COPY") { return {0x88EA}; }
412
- if (methodName == "DEPTH_COMPONENT32F") { return {0x8CAC}; }
413
- if (methodName == "DEPTH32F_STENCIL8") { return {0x8CAD}; }
693
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
694
+ buffers, buf.data(), len);
414
695
 
415
- /* Data types */
416
696
 
417
- if (methodName == "INVALID_INDEX") { return {(double) 0xFFFFFFFF}; }
418
- if (methodName == "TIMEOUT_IGNORED") { return {-1}; }
697
+ if (copied) {
698
+ canvas_native_webgl2_draw_buffers(
699
+ buf.data(), buf.size(),
700
+ ptr->GetState());
701
+ }
702
+
703
+ }
704
+
705
+ static void DrawElementsInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
706
+
707
+ static void
708
+ FastDrawElementsInstanced(v8::Local<v8::Object> receiver_obj, uint32_t mode, int32_t count,
709
+ uint32_t type, int32_t offset, int32_t instanceCount) {
710
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
711
+ if (ptr == nullptr) {
712
+ return;
713
+ }
714
+
715
+
716
+ canvas_native_webgl2_draw_elements_instanced(
717
+ mode,
718
+ count,
719
+ type,
720
+ static_cast<ssize_t>(offset),
721
+ instanceCount,
722
+ ptr->GetState()
723
+ );
724
+
725
+ ptr->UpdateInvalidateState();
726
+ }
727
+
728
+ static void DrawRangeElements(const v8::FunctionCallbackInfo<v8::Value> &args);
729
+
730
+ static void
731
+ FastDrawRangeElements(v8::Local<v8::Object> receiver_obj, uint32_t mode, uint32_t start,
732
+ uint32_t end, int32_t count, uint32_t type, int32_t offset) {
733
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
734
+ if (ptr == nullptr) {
735
+ return;
736
+ }
737
+
738
+
739
+ canvas_native_webgl2_draw_range_elements(
740
+ mode,
741
+ start,
742
+ end,
743
+ count,
744
+ type,
745
+ static_cast<ssize_t>(offset),
746
+ ptr->GetState()
747
+ );
748
+
749
+ ptr->UpdateInvalidateState();
750
+ }
751
+
752
+ static void EndQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
753
+
754
+ static void FastEndQuery(v8::Local<v8::Object> receiver_obj, uint32_t target) {
755
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
756
+ if (ptr == nullptr) {
757
+ return;
758
+ }
759
+
760
+ canvas_native_webgl2_end_query(target,
761
+ ptr->GetState());
762
+ }
763
+
764
+ static void EndTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
765
+
766
+ static void FastEndTransformFeedback(v8::Local<v8::Object> receiver_obj) {
767
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
768
+ if (ptr == nullptr) {
769
+ return;
770
+ }
771
+
772
+ canvas_native_webgl2_end_transform_feedback(
773
+ ptr->GetState());
774
+ }
775
+
776
+ static void FenceSync(const v8::FunctionCallbackInfo<v8::Value> &args);
777
+
778
+ static void FramebufferTextureLayer(const v8::FunctionCallbackInfo<v8::Value> &args);
779
+
780
+ static void FastFramebufferTextureLayer(v8::Local<v8::Object> receiver_obj,
781
+ v8::Local<v8::Object> texture_obj, uint32_t target,
782
+ uint32_t attachment, int32_t level, int32_t layer) {
783
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
784
+ if (ptr == nullptr) {
785
+ return;
786
+ }
787
+
788
+
789
+ auto type = GetNativeType(texture_obj);
790
+ if (type == NativeType::WebGLTexture) {
791
+ auto texture = WebGLTexture::GetPointer(texture_obj);
792
+ if (texture != nullptr) {
793
+ canvas_native_webgl2_framebuffer_texture_layer(
794
+ target,
795
+ attachment,
796
+ texture->GetTexture(),
797
+ level,
798
+ layer,
799
+ ptr->GetState()
800
+ );
801
+ }
802
+
803
+ }
804
+ }
805
+
806
+ static void GetActiveUniformBlockName(const v8::FunctionCallbackInfo<v8::Value> &args);
807
+
808
+ static void GetActiveUniformBlockParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
809
+
810
+ static void GetActiveUniforms(const v8::FunctionCallbackInfo<v8::Value> &args);
811
+
812
+ static void GetBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
813
+
814
+ static void GetFragDataLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
815
+
816
+ static void GetIndexedParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
817
+
818
+ static void GetInternalformatParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
819
+
820
+ static void GetParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
821
+
822
+ static void GetQueryParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
823
+
824
+ static void GetQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
825
+
826
+ static void GetSamplerParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
827
+
828
+ static void GetSyncParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
829
+
830
+ static void GetTransformFeedbackVarying(const v8::FunctionCallbackInfo<v8::Value> &args);
831
+
832
+ static void GetUniformBlockIndex(const v8::FunctionCallbackInfo<v8::Value> &args);
833
+
834
+ static void GetUniformIndices(const v8::FunctionCallbackInfo<v8::Value> &args);
835
+
836
+ static void InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
837
+
838
+ static void
839
+ FastInvalidateFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
840
+ v8::Local<v8::Array> attachments) {
841
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
842
+ if (ptr == nullptr) {
843
+ return;
844
+ }
845
+
846
+ auto len = attachments->Length();
847
+ std::vector<uint32_t> buf;
848
+ buf.reserve(len);
849
+
850
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
851
+ attachments, buf.data(), len);
852
+
853
+ if (copied) {
854
+ canvas_native_webgl2_invalidate_framebuffer(
855
+ target, buf.data(), buf.size(),
856
+ ptr->GetState());
857
+ }
858
+ }
859
+
860
+ static void InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
861
+
862
+ static void FastInvalidateSubFramebuffer(v8::Local<v8::Object> receiver_obj, uint32_t target,
863
+ v8::Local<v8::Array> attachments, int32_t x, int32_t y,
864
+ int32_t width, int32_t height) {
865
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
866
+ if (ptr == nullptr) {
867
+ return;
868
+ }
869
+
870
+ auto len = attachments->Length();
871
+ std::vector<uint32_t> buf;
872
+ buf.reserve(len);
873
+
874
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
875
+ attachments, buf.data(), len);
876
+
877
+ if (copied) {
878
+
879
+ canvas_native_webgl2_invalidate_sub_framebuffer(
880
+ target,
881
+ buf.data(), buf.size(),
882
+ x,
883
+ y,
884
+ width,
885
+ height,
886
+ ptr->GetState());
887
+ }
888
+ }
889
+
890
+ static void IsQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
891
+
892
+ static bool FastIsQuery(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> query_obj) {
893
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
894
+ if (ptr == nullptr) {
895
+ return false;
896
+ }
897
+
898
+
899
+ auto type = GetNativeType(query_obj);
900
+ if (type == NativeType::WebGLQuery) {
901
+ auto query = WebGLQuery::GetPointer(query_obj);
902
+ if (query != nullptr) {
903
+ auto ret = canvas_native_webgl2_is_query(
904
+ query->GetQuery(),
905
+ ptr->GetState());
906
+ return ret;
907
+ }
908
+ }
909
+ // todo check return
910
+ return false;
911
+ }
912
+
913
+ static void IsSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
914
+
915
+ static bool
916
+ FastIsSampler(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sample_obj) {
917
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
918
+ if (ptr == nullptr) {
919
+ return false;
920
+ }
921
+
922
+
923
+ auto type = GetNativeType(sample_obj);
924
+ if (type == NativeType::WebGLSampler) {
925
+ auto query = WebGLSampler::GetPointer(sample_obj);
926
+ if (query != nullptr) {
927
+ auto ret = canvas_native_webgl2_is_sampler(
928
+ query->GetSampler(),
929
+ ptr->GetState());
930
+ return ret;
931
+ }
932
+ }
933
+ // todo check return
934
+ return false;
935
+ }
936
+
937
+ static void IsSync(const v8::FunctionCallbackInfo<v8::Value> &args);
938
+
939
+ static bool FastIsSync(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sync_obj) {
940
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
941
+ if (ptr == nullptr) {
942
+ return false;
943
+ }
944
+
945
+
946
+ auto type = GetNativeType(sync_obj);
947
+ if (type == NativeType::WebGLSync) {
948
+ auto query = WebGLSyncImpl::GetPointer(sync_obj);
949
+ if (query != nullptr) {
950
+ auto ret = canvas_native_webgl2_is_sync(
951
+ query->GetSync(),
952
+ ptr->GetState());
953
+
954
+ return ret;
955
+ }
956
+ }
957
+ // todo check return
958
+ return false;
959
+ }
960
+
961
+ static void IsTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
962
+
963
+ static bool FastIsTransformFeedback(v8::Local<v8::Object> receiver_obj,
964
+ v8::Local<v8::Object> feedback_obj) {
965
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
966
+ if (ptr == nullptr) {
967
+ return false;
968
+ }
969
+
970
+
971
+ auto type = GetNativeType(feedback_obj);
972
+ if (type == NativeType::WebGLTransformFeedback) {
973
+ auto query = WebGLTransformFeedback::GetPointer(feedback_obj);
974
+ if (query != nullptr) {
975
+ auto ret = canvas_native_webgl2_is_transform_feedback(
976
+ query->GetFeedback(),
977
+ ptr->GetState());
978
+ return ret;
979
+ }
980
+ }
981
+ // todo check return
982
+ return false;
983
+ }
984
+
985
+ static void IsVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
986
+
987
+ static bool
988
+ FastIsVertexArray(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> vertex_obj) {
989
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
990
+ if (ptr == nullptr) {
991
+ return false;
992
+ }
993
+
994
+
995
+ auto type = GetNativeType(vertex_obj);
996
+ if (type == NativeType::WebGLVertexArrayObject) {
997
+ auto query = WebGLVertexArrayObject::GetPointer(vertex_obj);
998
+ if (query != nullptr) {
999
+ auto ret = canvas_native_webgl2_is_vertex_array(
1000
+ query->GetVertexArrayObject(),
1001
+ ptr->GetState());
1002
+ return ret;
1003
+ }
1004
+ }
1005
+ // todo check return
1006
+ return false;
1007
+ }
1008
+
1009
+ static void PauseTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
1010
+
1011
+ static void FastPauseTransformFeedback(v8::Local<v8::Object> receiver_obj) {
1012
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1013
+ if (ptr == nullptr) {
1014
+ return;
1015
+ }
1016
+ canvas_native_webgl2_pause_transform_feedback(
1017
+ ptr->GetState());
1018
+ }
1019
+
1020
+ static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
1021
+
1022
+ static void FastReadBuffer(v8::Local<v8::Object> receiver_obj, uint32_t src) {
1023
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1024
+ if (ptr == nullptr) {
1025
+ return;
1026
+ }
1027
+
1028
+ canvas_native_webgl2_read_buffer(
1029
+ src,
1030
+ ptr->GetState()
1031
+ );
1032
+ }
1033
+
1034
+ static void RenderbufferStorageMultisample(const v8::FunctionCallbackInfo<v8::Value> &args);
1035
+
1036
+ static void
1037
+ FastRenderbufferStorageMultisample(v8::Local<v8::Object> receiver_obj, uint32_t target,
1038
+ int32_t samples, uint32_t internalFormat, int32_t width,
1039
+ int32_t height) {
1040
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1041
+ if (ptr == nullptr) {
1042
+ return;
1043
+ }
1044
+
1045
+ canvas_native_webgl2_renderbuffer_storage_multisample(
1046
+ target,
1047
+ samples,
1048
+ internalFormat,
1049
+ width,
1050
+ height,
1051
+ ptr->GetState()
1052
+ );
1053
+ }
1054
+
1055
+ static void ResumeTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
1056
+
1057
+ static void FastResumeTransformFeedback(v8::Local<v8::Object> receiver_obj) {
1058
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1059
+ if (ptr == nullptr) {
1060
+ return;
1061
+ }
1062
+
1063
+ canvas_native_webgl2_resume_transform_feedback(
1064
+ ptr->GetState());
1065
+ }
1066
+
1067
+ static void SamplerParameterf(const v8::FunctionCallbackInfo<v8::Value> &args);
1068
+
1069
+ static void
1070
+ FastSamplerParameterf(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
1071
+ uint32_t pname, double param) {
1072
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1073
+ if (ptr == nullptr) {
1074
+ return;
1075
+ }
1076
+
1077
+ auto type = GetNativeType(sampler_obj);
1078
+ if (type == NativeType::WebGLSampler) {
1079
+ auto sampler = WebGLSampler::GetPointer(sampler_obj);
1080
+ if (sampler != nullptr) {
1081
+ canvas_native_webgl2_sampler_parameterf(
1082
+ sampler->GetSampler(),
1083
+ pname,
1084
+ static_cast<float>(param),
1085
+ ptr->GetState());
1086
+ }
1087
+ }
1088
+
1089
+ }
1090
+
1091
+ static void SamplerParameteri(const v8::FunctionCallbackInfo<v8::Value> &args);
1092
+
1093
+
1094
+ static void
1095
+ FastSamplerParameteri(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> sampler_obj,
1096
+ uint32_t pname, int32_t param) {
1097
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1098
+ if (ptr == nullptr) {
1099
+ return;
1100
+ }
1101
+
1102
+ auto type = GetNativeType(sampler_obj);
1103
+ if (type == NativeType::WebGLSampler) {
1104
+ auto sampler = WebGLSampler::GetPointer(sampler_obj);
1105
+ if (sampler != nullptr) {
1106
+ canvas_native_webgl2_sampler_parameteri(
1107
+ sampler->GetSampler(),
1108
+ pname,
1109
+ param,
1110
+ ptr->GetState());
1111
+ }
1112
+ }
1113
+
1114
+ }
1115
+
1116
+ static void TexImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
1117
+
1118
+ static void TexStorage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
1119
+
1120
+ static void TexStorage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
1121
+
1122
+ static void TexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
1123
+
1124
+ static void TransformFeedbackVaryings(const v8::FunctionCallbackInfo<v8::Value> &args);
1125
+
1126
+ static void Uniform1ui(const v8::FunctionCallbackInfo<v8::Value> &args);
1127
+
1128
+
1129
+ static void
1130
+ FastUniform1ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1131
+ uint32_t v0) {
1132
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1133
+ if (ptr == nullptr) {
1134
+ return;
1135
+ }
1136
+
1137
+
1138
+ auto type = GetNativeType(location_obj);
1139
+
1140
+ if (type == NativeType::WebGLUniformLocation) {
1141
+
1142
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1143
+
1144
+ if (location != nullptr) {
1145
+ canvas_native_webgl2_uniform1ui(
1146
+ location->GetUniformLocation(),
1147
+ v0,
1148
+ ptr->GetState()
1149
+ );
1150
+ }
1151
+ }
1152
+
1153
+ }
1154
+
1155
+ static void Uniform1uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
1156
+
1157
+ static void
1158
+ FastUniform1uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1159
+ const v8::FastApiTypedArray<uint32_t> &value) {
1160
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1161
+ if (ptr == nullptr) {
1162
+ return;
1163
+ }
1164
+
1165
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1166
+
1167
+ if (location != nullptr) {
1168
+ auto size = value.length();
1169
+ uint32_t *data;
1170
+ value.getStorageIfAligned(&data);
1171
+
1172
+ canvas_native_webgl2_uniform1uiv(
1173
+ location->GetUniformLocation(),
1174
+ data, size,
1175
+ ptr->GetState());
1176
+ }
1177
+ }
1178
+
1179
+ static void Uniform2ui(const v8::FunctionCallbackInfo<v8::Value> &args);
1180
+
1181
+ static void
1182
+ FastUniform2ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1183
+ uint32_t v0, uint32_t v1) {
1184
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1185
+ if (ptr == nullptr) {
1186
+ return;
1187
+ }
1188
+
1189
+
1190
+ auto type = GetNativeType(location_obj);
1191
+
1192
+ if (type == NativeType::WebGLUniformLocation) {
1193
+
1194
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1195
+
1196
+ if (location != nullptr) {
1197
+ canvas_native_webgl2_uniform2ui(
1198
+ location->GetUniformLocation(),
1199
+ v0, v1,
1200
+ ptr->GetState()
1201
+ );
1202
+ }
1203
+ }
1204
+
1205
+ }
1206
+
1207
+ static void Uniform2uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
1208
+
1209
+ static void
1210
+ FastUniform2uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1211
+ const v8::FastApiTypedArray<uint32_t> &value) {
1212
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1213
+ if (ptr == nullptr) {
1214
+ return;
1215
+ }
1216
+
1217
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1218
+
1219
+ if (location != nullptr) {
1220
+ auto size = value.length();
1221
+ uint32_t *data;
1222
+ value.getStorageIfAligned(&data);
1223
+
1224
+ canvas_native_webgl2_uniform2uiv(
1225
+ location->GetUniformLocation(),
1226
+ data, size,
1227
+ ptr->GetState());
1228
+ }
1229
+ }
1230
+
1231
+ static void Uniform3ui(const v8::FunctionCallbackInfo<v8::Value> &args);
1232
+
1233
+ static void
1234
+ FastUniform3ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1235
+ uint32_t v0, uint32_t v1, uint32_t v2) {
1236
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1237
+ if (ptr == nullptr) {
1238
+ return;
1239
+ }
1240
+
1241
+
1242
+ auto type = GetNativeType(location_obj);
1243
+
1244
+ if (type == NativeType::WebGLUniformLocation) {
1245
+
1246
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1247
+
1248
+ if (location != nullptr) {
1249
+ canvas_native_webgl2_uniform3ui(
1250
+ location->GetUniformLocation(),
1251
+ v0, v1, v2,
1252
+ ptr->GetState()
1253
+ );
1254
+ }
1255
+ }
1256
+
1257
+ }
1258
+
1259
+ static void Uniform3uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
1260
+
1261
+ static void
1262
+ FastUniform3uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1263
+ const v8::FastApiTypedArray<uint32_t> &value) {
1264
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1265
+ if (ptr == nullptr) {
1266
+ return;
1267
+ }
1268
+
1269
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1270
+
1271
+ if (location != nullptr) {
1272
+ auto size = value.length();
1273
+ uint32_t *data;
1274
+ value.getStorageIfAligned(&data);
1275
+
1276
+ canvas_native_webgl2_uniform3uiv(
1277
+ location->GetUniformLocation(),
1278
+ data, size,
1279
+ ptr->GetState());
1280
+ }
1281
+ }
1282
+
1283
+ static void Uniform4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
1284
+
1285
+ static void
1286
+ FastUniform4ui(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1287
+ uint32_t v0, uint32_t v1, uint32_t v2, uint32_t v3) {
1288
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1289
+ if (ptr == nullptr) {
1290
+ return;
1291
+ }
1292
+
1293
+
1294
+ auto type = GetNativeType(location_obj);
1295
+
1296
+ if (type == NativeType::WebGLUniformLocation) {
1297
+
1298
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1299
+
1300
+ if (location != nullptr) {
1301
+ canvas_native_webgl2_uniform4ui(
1302
+ location->GetUniformLocation(),
1303
+ v0, v1, v2, v3,
1304
+ ptr->GetState()
1305
+ );
1306
+ }
1307
+ }
1308
+
1309
+ }
1310
+
1311
+ static void Uniform4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
1312
+
1313
+
1314
+ static void
1315
+ FastUniform4uiv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1316
+ const v8::FastApiTypedArray<uint32_t> &value) {
1317
+ WebGLRenderingContext *ptr = GetPointer(receiver_obj);
1318
+ if (ptr == nullptr) {
1319
+ return;
1320
+ }
1321
+
1322
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1323
+
1324
+ if (location != nullptr) {
1325
+ auto size = value.length();
1326
+ uint32_t *data;
1327
+ value.getStorageIfAligned(&data);
1328
+
1329
+ canvas_native_webgl2_uniform4uiv(
1330
+ location->GetUniformLocation(),
1331
+ data, size,
1332
+ ptr->GetState());
1333
+ }
1334
+ }
1335
+
1336
+ static void UniformBlockBinding(const v8::FunctionCallbackInfo<v8::Value> &args);
1337
+
1338
+ static void
1339
+ FastUniformBlockBinding(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> program_obj,
1340
+ uint32_t uniformBlockIndex, uint32_t uniformBlockBinding) {
1341
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1342
+ if (ptr == nullptr) {
1343
+ return;
1344
+ }
1345
+
1346
+
1347
+ auto type = GetNativeType(program_obj);
1348
+ if (type == NativeType::WebGLProgram) {
1349
+
1350
+ auto program = WebGLProgram::GetPointer(program_obj);
1351
+
1352
+ if (program != nullptr) {
1353
+ canvas_native_webgl2_uniform_block_binding(
1354
+ program->GetProgram(),
1355
+ uniformBlockIndex,
1356
+ uniformBlockBinding,
1357
+ ptr->GetState()
1358
+ );
1359
+ }
1360
+
1361
+ }
1362
+
1363
+ }
1364
+
1365
+ static void UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1366
+
1367
+ static void
1368
+ FastUniformMatrix2x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1369
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1370
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1371
+ if (ptr == nullptr) {
1372
+ return;
1373
+ }
1374
+
1375
+ auto type = GetNativeType(location_obj);
1376
+ if (type == NativeType::WebGLUniformLocation) {
1377
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1378
+ auto size = data_value.length();
1379
+ float *data;
1380
+ data_value.getStorageIfAligned(&data);
1381
+
1382
+ canvas_native_webgl2_uniform_matrix2x3fv(
1383
+ location->GetUniformLocation(),
1384
+ transpose,
1385
+ data, size,
1386
+ ptr->GetState()
1387
+ );
1388
+ }
1389
+
1390
+ }
1391
+
1392
+ static void
1393
+ FastUniformMatrix2x3fvArray(v8::Local<v8::Object> receiver_obj,
1394
+ v8::Local<v8::Object> location_obj,
1395
+ bool transpose, v8::Local<v8::Array> data_value) {
1396
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1397
+ if (ptr == nullptr) {
1398
+ return;
1399
+ }
1400
+
1401
+ auto type = GetNativeType(location_obj);
1402
+ if (type == NativeType::WebGLUniformLocation) {
1403
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1404
+
1405
+ auto len = data_value->Length();
1406
+ std::vector<float> buf;
1407
+ buf.reserve(len);
1408
+
1409
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1410
+ data_value, buf.data(), len);
1411
+
1412
+ if (copied) {
1413
+ canvas_native_webgl2_uniform_matrix2x3fv(
1414
+ location->GetUniformLocation(),
1415
+ transpose,
1416
+ buf.data(), buf.size(),
1417
+ ptr->GetState()
1418
+ );
1419
+ }
1420
+ }
1421
+
1422
+ }
1423
+
1424
+ static void UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1425
+
1426
+
1427
+ static void
1428
+ FastUniformMatrix2x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1429
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1430
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1431
+ if (ptr == nullptr) {
1432
+ return;
1433
+ }
1434
+
1435
+ auto type = GetNativeType(location_obj);
1436
+ if (type == NativeType::WebGLUniformLocation) {
1437
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1438
+ auto size = data_value.length();
1439
+ float *data;
1440
+ data_value.getStorageIfAligned(&data);
1441
+
1442
+ canvas_native_webgl2_uniform_matrix2x4fv(
1443
+ location->GetUniformLocation(),
1444
+ transpose,
1445
+ data, size,
1446
+ ptr->GetState()
1447
+ );
1448
+ }
1449
+
1450
+ }
1451
+
1452
+ static void
1453
+ FastUniformMatrix2x4fvArray(v8::Local<v8::Object> receiver_obj,
1454
+ v8::Local<v8::Object> location_obj,
1455
+ bool transpose, v8::Local<v8::Array> data_value) {
1456
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1457
+ if (ptr == nullptr) {
1458
+ return;
1459
+ }
1460
+
1461
+ auto type = GetNativeType(location_obj);
1462
+ if (type == NativeType::WebGLUniformLocation) {
1463
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1464
+
1465
+ auto len = data_value->Length();
1466
+ std::vector<float> buf;
1467
+ buf.reserve(len);
1468
+
1469
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1470
+ data_value, buf.data(), len);
1471
+
1472
+ if (copied) {
1473
+ canvas_native_webgl2_uniform_matrix2x4fv(
1474
+ location->GetUniformLocation(),
1475
+ transpose,
1476
+ buf.data(), buf.size(),
1477
+ ptr->GetState()
1478
+ );
1479
+ }
1480
+ }
1481
+
1482
+ }
1483
+
1484
+ static void UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1485
+
1486
+
1487
+ static void
1488
+ FastUniformMatrix3x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1489
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1490
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1491
+ if (ptr == nullptr) {
1492
+ return;
1493
+ }
1494
+
1495
+ auto type = GetNativeType(location_obj);
1496
+ if (type == NativeType::WebGLUniformLocation) {
1497
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1498
+ auto size = data_value.length();
1499
+ float *data;
1500
+ data_value.getStorageIfAligned(&data);
1501
+
1502
+ canvas_native_webgl2_uniform_matrix3x2fv(
1503
+ location->GetUniformLocation(),
1504
+ transpose,
1505
+ data, size,
1506
+ ptr->GetState()
1507
+ );
1508
+ }
1509
+
1510
+ }
1511
+
1512
+ static void
1513
+ FastUniformMatrix3x2fvArray(v8::Local<v8::Object> receiver_obj,
1514
+ v8::Local<v8::Object> location_obj,
1515
+ bool transpose, v8::Local<v8::Array> data_value) {
1516
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1517
+ if (ptr == nullptr) {
1518
+ return;
1519
+ }
1520
+
1521
+ auto type = GetNativeType(location_obj);
1522
+ if (type == NativeType::WebGLUniformLocation) {
1523
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1524
+
1525
+ auto len = data_value->Length();
1526
+ std::vector<float> buf;
1527
+ buf.reserve(len);
1528
+
1529
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1530
+ data_value, buf.data(), len);
1531
+
1532
+ if (copied) {
1533
+ canvas_native_webgl2_uniform_matrix3x2fv(
1534
+ location->GetUniformLocation(),
1535
+ transpose,
1536
+ buf.data(), buf.size(),
1537
+ ptr->GetState()
1538
+ );
1539
+ }
1540
+ }
1541
+
1542
+ }
1543
+
1544
+ static void UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1545
+
1546
+
1547
+ static void
1548
+ FastUniformMatrix3x4fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1549
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1550
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1551
+ if (ptr == nullptr) {
1552
+ return;
1553
+ }
1554
+
1555
+ auto type = GetNativeType(location_obj);
1556
+ if (type == NativeType::WebGLUniformLocation) {
1557
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1558
+ auto size = data_value.length();
1559
+ float *data;
1560
+ data_value.getStorageIfAligned(&data);
1561
+
1562
+ canvas_native_webgl2_uniform_matrix3x4fv(
1563
+ location->GetUniformLocation(),
1564
+ transpose,
1565
+ data, size,
1566
+ ptr->GetState()
1567
+ );
1568
+ }
1569
+
1570
+ }
1571
+
1572
+ static void
1573
+ FastUniformMatrix3x4fvArray(v8::Local<v8::Object> receiver_obj,
1574
+ v8::Local<v8::Object> location_obj,
1575
+ bool transpose, v8::Local<v8::Array> data_value) {
1576
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1577
+ if (ptr == nullptr) {
1578
+ return;
1579
+ }
1580
+
1581
+ auto type = GetNativeType(location_obj);
1582
+ if (type == NativeType::WebGLUniformLocation) {
1583
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1584
+
1585
+ auto len = data_value->Length();
1586
+ std::vector<float> buf;
1587
+ buf.reserve(len);
1588
+
1589
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1590
+ data_value, buf.data(), len);
1591
+
1592
+ if (copied) {
1593
+ canvas_native_webgl2_uniform_matrix3x4fv(
1594
+ location->GetUniformLocation(),
1595
+ transpose,
1596
+ buf.data(), buf.size(),
1597
+ ptr->GetState()
1598
+ );
1599
+ }
1600
+ }
1601
+
1602
+ }
1603
+
1604
+
1605
+ static void UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1606
+
1607
+ static void
1608
+ FastUniformMatrix4x2fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1609
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1610
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1611
+ if (ptr == nullptr) {
1612
+ return;
1613
+ }
1614
+
1615
+ auto type = GetNativeType(location_obj);
1616
+ if (type == NativeType::WebGLUniformLocation) {
1617
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1618
+ auto size = data_value.length();
1619
+ float *data;
1620
+ data_value.getStorageIfAligned(&data);
1621
+
1622
+ canvas_native_webgl2_uniform_matrix4x2fv(
1623
+ location->GetUniformLocation(),
1624
+ transpose,
1625
+ data, size,
1626
+ ptr->GetState()
1627
+ );
1628
+ }
1629
+
1630
+ }
1631
+
1632
+ static void
1633
+ FastUniformMatrix4x2fvArray(v8::Local<v8::Object> receiver_obj,
1634
+ v8::Local<v8::Object> location_obj,
1635
+ bool transpose, v8::Local<v8::Array> data_value) {
1636
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1637
+ if (ptr == nullptr) {
1638
+ return;
1639
+ }
1640
+
1641
+ auto type = GetNativeType(location_obj);
1642
+ if (type == NativeType::WebGLUniformLocation) {
1643
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1644
+
1645
+ auto len = data_value->Length();
1646
+ std::vector<float> buf;
1647
+ buf.reserve(len);
1648
+
1649
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1650
+ data_value, buf.data(), len);
1651
+
1652
+ if (copied) {
1653
+ canvas_native_webgl2_uniform_matrix4x2fv(
1654
+ location->GetUniformLocation(),
1655
+ transpose,
1656
+ buf.data(), buf.size(),
1657
+ ptr->GetState()
1658
+ );
1659
+ }
1660
+ }
1661
+
1662
+ }
1663
+
1664
+ static void UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
1665
+
1666
+
1667
+ static void
1668
+ FastUniformMatrix4x3fv(v8::Local<v8::Object> receiver_obj, v8::Local<v8::Object> location_obj,
1669
+ bool transpose, const v8::FastApiTypedArray<float> &data_value) {
1670
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1671
+ if (ptr == nullptr) {
1672
+ return;
1673
+ }
1674
+
1675
+ auto type = GetNativeType(location_obj);
1676
+ if (type == NativeType::WebGLUniformLocation) {
1677
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1678
+ auto size = data_value.length();
1679
+ float *data;
1680
+ data_value.getStorageIfAligned(&data);
1681
+
1682
+ canvas_native_webgl2_uniform_matrix4x3fv(
1683
+ location->GetUniformLocation(),
1684
+ transpose,
1685
+ data, size,
1686
+ ptr->GetState()
1687
+ );
1688
+ }
1689
+
1690
+ }
1691
+
1692
+ static void
1693
+ FastUniformMatrix4x3fvArray(v8::Local<v8::Object> receiver_obj,
1694
+ v8::Local<v8::Object> location_obj,
1695
+ bool transpose, v8::Local<v8::Array> data_value) {
1696
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1697
+ if (ptr == nullptr) {
1698
+ return;
1699
+ }
1700
+
1701
+ auto type = GetNativeType(location_obj);
1702
+ if (type == NativeType::WebGLUniformLocation) {
1703
+ auto location = WebGLUniformLocation::GetPointer(location_obj);
1704
+
1705
+ auto len = data_value->Length();
1706
+ std::vector<float> buf;
1707
+ buf.reserve(len);
1708
+
1709
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<float>::Build().GetId(), float>(
1710
+ data_value, buf.data(), len);
1711
+
1712
+ if (copied) {
1713
+ canvas_native_webgl2_uniform_matrix4x3fv(
1714
+ location->GetUniformLocation(),
1715
+ transpose,
1716
+ buf.data(), buf.size(),
1717
+ ptr->GetState()
1718
+ );
1719
+ }
1720
+ }
1721
+
1722
+ }
1723
+
1724
+ static void VertexAttribDivisor(const v8::FunctionCallbackInfo<v8::Value> &args);
1725
+
1726
+ static void
1727
+ FastVertexAttribDivisor(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t divisor) {
1728
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1729
+ if (ptr == nullptr) {
1730
+ return;
1731
+ }
1732
+
1733
+ canvas_native_webgl2_vertex_attrib_divisor(
1734
+ index,
1735
+ divisor,
1736
+ ptr->GetState()
1737
+ );
1738
+
1739
+ }
1740
+
1741
+ static void VertexAttribI4i(const v8::FunctionCallbackInfo<v8::Value> &args);
1742
+
1743
+ static void
1744
+ FastVertexAttribI4i(v8::Local<v8::Object> receiver_obj, int32_t index, int32_t v0, int32_t v1,
1745
+ int32_t v2, int32_t v3) {
1746
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1747
+ if (ptr == nullptr) {
1748
+ return;
1749
+ }
1750
+
1751
+
1752
+ canvas_native_webgl2_vertex_attrib_i4i(
1753
+ index,
1754
+ v0,
1755
+ v1,
1756
+ v2,
1757
+ v3,
1758
+ ptr->GetState()
1759
+ );
1760
+
1761
+ }
1762
+
1763
+ static void VertexAttribI4iv(const v8::FunctionCallbackInfo<v8::Value> &args);
1764
+
1765
+ static void FastVertexAttribI4iv(v8::Local<v8::Object> receiver_obj, uint32_t index,
1766
+ const v8::FastApiTypedArray<int32_t> &data_value) {
1767
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1768
+ if (ptr == nullptr) {
1769
+ return;
1770
+ }
1771
+
1772
+ auto size = data_value.length();
1773
+ int32_t *data;
1774
+ data_value.getStorageIfAligned(&data);
1775
+
1776
+ canvas_native_webgl2_vertex_attrib_i4iv(
1777
+ index,
1778
+ data, size,
1779
+ ptr->GetState()
1780
+ );
1781
+
1782
+ }
1783
+
1784
+ static void FastVertexAttribI4ivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
1785
+ v8::Local<v8::Array> data_value) {
1786
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1787
+ if (ptr == nullptr) {
1788
+ return;
1789
+ }
1790
+
1791
+ auto len = data_value->Length();
1792
+ std::vector<int32_t> buf;
1793
+ buf.reserve(len);
1794
+
1795
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<int32_t>::Build().GetId(), int32_t>(
1796
+ data_value, buf.data(), len);
1797
+
1798
+
1799
+ if (copied) {
1800
+ canvas_native_webgl2_vertex_attrib_i4iv(
1801
+ index,
1802
+ buf.data(), buf.size(),
1803
+ ptr->GetState()
1804
+ );
1805
+ }
1806
+
1807
+ }
1808
+
1809
+ static void VertexAttribI4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
1810
+
1811
+ static void
1812
+ FastVertexAttribI4ui(v8::Local<v8::Object> receiver_obj, uint32_t index, uint32_t v0,
1813
+ uint32_t v1,
1814
+ uint32_t v2, uint32_t v3) {
1815
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1816
+ if (ptr == nullptr) {
1817
+ return;
1818
+ }
1819
+
1820
+
1821
+ canvas_native_webgl2_vertex_attrib_i4ui(
1822
+ index,
1823
+ v0,
1824
+ v1,
1825
+ v2,
1826
+ v3,
1827
+ ptr->GetState()
1828
+ );
1829
+
1830
+ }
1831
+
1832
+ static void VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
1833
+
1834
+
1835
+ static void FastVertexAttribI4uiv(v8::Local<v8::Object> receiver_obj, uint32_t index,
1836
+ const v8::FastApiTypedArray<uint32_t> &data_value) {
1837
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1838
+ if (ptr == nullptr) {
1839
+ return;
1840
+ }
1841
+
1842
+ auto size = data_value.length();
1843
+ uint32_t *data;
1844
+ data_value.getStorageIfAligned(&data);
1845
+
1846
+ canvas_native_webgl2_vertex_attrib_i4uiv(
1847
+ index,
1848
+ data, size,
1849
+ ptr->GetState()
1850
+ );
1851
+
1852
+ }
1853
+
1854
+ static void FastVertexAttribI4uivArray(v8::Local<v8::Object> receiver_obj, uint32_t index,
1855
+ v8::Local<v8::Array> data_value) {
1856
+ WebGL2RenderingContext *ptr = GetPointer(receiver_obj);
1857
+ if (ptr == nullptr) {
1858
+ return;
1859
+ }
419
1860
 
420
- /* Vertex attributes */
1861
+ auto len = data_value->Length();
1862
+ std::vector<uint32_t> buf;
1863
+ buf.reserve(len);
421
1864
 
422
- /* Transform feedback */
1865
+ auto copied = v8::TryToCopyAndConvertArrayToCppBuffer<v8::CTypeInfoBuilder<uint32_t>::Build().GetId(), uint32_t>(
1866
+ data_value, buf.data(), len);
423
1867
 
424
- if (methodName == "MAX_CLIENT_WAIT_TIMEOUT_WEBGL") { return {0x9247}; }
425
1868
 
426
- /* Transform feedback */
1869
+ if (copied) {
1870
+ canvas_native_webgl2_vertex_attrib_i4uiv(
1871
+ index,
1872
+ buf.data(), buf.size(),
1873
+ ptr->GetState()
1874
+ );
1875
+ }
427
1876
 
428
- return jsi::Value::undefined();
429
1877
  }
430
1878
 
431
1879
  };