@nativescript/canvas 2.0.0-alpha.3 → 2.0.0-alpha.31
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/Canvas/common.d.ts +212 -25
- package/Canvas/common.js +677 -460
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +9 -0
- package/Canvas/index.android.js +162 -53
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +12 -0
- package/Canvas/index.ios.d.ts +6 -0
- package/Canvas/index.ios.js +151 -66
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasGradient/index.d.ts +1 -3
- package/Canvas2D/CanvasGradient/index.js +1 -10
- package/Canvas2D/CanvasGradient/index.js.map +1 -1
- package/Canvas2D/CanvasPattern/index.d.ts +1 -3
- package/Canvas2D/CanvasPattern/index.js +1 -10
- package/Canvas2D/CanvasPattern/index.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.d.ts +1 -3
- package/Canvas2D/CanvasRenderingContext2D/index.js +104 -214
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +3 -3
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js +6 -6
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.d.ts +0 -2
- package/Canvas2D/Path2D/index.js +34 -39
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Paint.js +2 -3
- package/Dom/Paint.js.map +1 -1
- package/Dom/shapes/Circle.js +1 -2
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Points.js +1 -2
- package/Dom/shapes/Points.js.map +1 -1
- package/ImageAsset/index.d.ts +2 -2
- package/ImageAsset/index.js +33 -37
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.d.ts +0 -2
- package/ImageBitmap/index.js +47 -34
- package/ImageBitmap/index.js.map +1 -1
- package/LICENSE +201 -0
- package/SVG/SVG.js +1 -1
- package/SVG/SVG.js.map +1 -1
- package/TextDecoder/index.d.ts +0 -2
- package/TextDecoder/index.js +3 -12
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.d.ts +0 -2
- package/TextEncoder/index.js +4 -13
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.d.ts +4 -12
- package/WebGL/WebGLExtensions/index.js +27 -77
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLProgram.d.ts +0 -1
- package/WebGL/WebGLProgram.js +0 -3
- package/WebGL/WebGLProgram.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.d.ts +0 -2
- package/WebGL/WebGLRenderingContext/common.js +0 -10
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.d.ts +15 -15
- package/WebGL/WebGLRenderingContext/index.js +183 -578
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.d.ts +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +109 -281
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/angular/esm2020/index.mjs +4 -4
- package/angular/fesm2015/nativescript-canvas-angular.mjs +4 -4
- package/angular/fesm2020/nativescript-canvas-angular.mjs +4 -4
- package/angular/package.json +2 -2
- package/index.js.map +1 -1
- package/package.json +3 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/android/include.gradle +15 -0
- package/platforms/ios/CanvasNative.xcframework/Info.plist +5 -5
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +137 -64
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +142 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2673 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.abi.json +5734 -2393
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative-Swift.h +274 -128
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/CanvasNative.h +10 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +142 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2673 -68
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Info.plist +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/arm64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/Project/x86_64-apple-ios-simulator.swiftsourceinfo +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.abi.json +5734 -2393
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5734 -2393
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +42 -19
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +42 -31
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/Podfile +4 -1
- package/platforms/ios/build.xcconfig +3 -3
- package/platforms/ios/src/CanvasModule.h +0 -2
- package/platforms/ios/src/CanvasModule.mm +4 -4
- package/platforms/ios/src/NSOperationQueueWrapper.h +11 -0
- package/platforms/ios/src/NSOperationQueueWrapper.mm +74 -0
- package/platforms/ios/src/cpp/Caches.cpp +35 -0
- package/platforms/ios/src/cpp/Caches.h +190 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +1534 -0
- package/platforms/ios/src/cpp/CanvasJSIModule.h +8 -34
- package/platforms/ios/src/cpp/Common.h +30 -0
- package/platforms/ios/src/cpp/ConcurrentMap.h +54 -0
- package/platforms/ios/src/cpp/Helpers.h +304 -36
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +802 -0
- package/platforms/ios/src/cpp/ImageAssetImpl.h +44 -12
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +189 -0
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +34 -16
- package/platforms/ios/src/cpp/JSICallback.h +61 -5
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +86 -6
- package/platforms/ios/src/cpp/JSIRuntime.cpp +21 -0
- package/platforms/ios/src/cpp/JSIRuntime.h +7 -0
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +49 -0
- package/platforms/ios/src/cpp/OneByteStringResource.h +32 -0
- package/platforms/ios/src/cpp/RafImpl.cpp +8 -0
- package/platforms/ios/src/cpp/RafImpl.h +11 -8
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +187 -0
- package/platforms/ios/src/cpp/TextDecoderImpl.h +20 -14
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +139 -0
- package/platforms/ios/src/cpp/TextEncoderImpl.h +20 -11
- package/platforms/ios/src/cpp/URLImpl.cpp +464 -0
- package/platforms/ios/src/cpp/URLImpl.h +119 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.cpp +71 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +27 -13
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.cpp +89 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +26 -13
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +2413 -0
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +267 -16
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +203 -0
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +26 -12
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.cpp +806 -0
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +172 -13
- package/platforms/ios/src/cpp/canvas2d/Path2D.cpp +449 -0
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +41 -12
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.cpp +253 -0
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +50 -12
- package/platforms/ios/src/cpp/gl.h +57 -7
- package/platforms/ios/src/cpp/gl3stub.c +425 -0
- package/platforms/ios/src/cpp/gl3stub.h +665 -0
- package/platforms/ios/src/cpp/gles3jni.h +37 -0
- package/platforms/ios/src/cpp/include/robin_hood.h +2544 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.cpp +91 -0
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.h +33 -13
- package/platforms/ios/src/cpp/webgl/WebGLBuffer.h +41 -6
- package/platforms/ios/src/cpp/webgl/WebGLFramebuffer.h +46 -10
- package/platforms/ios/src/cpp/webgl/WebGLProgram.h +40 -5
- package/platforms/ios/src/cpp/webgl/WebGLRenderbuffer.h +40 -6
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +6454 -0
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.h +262 -390
- package/platforms/ios/src/cpp/webgl/{WebGLRenderingContextBase.mm → WebGLRenderingContextBase.cpp} +46 -24
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.h +17 -11
- package/platforms/ios/src/cpp/webgl/WebGLShader.h +40 -6
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.cpp +50 -0
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.h +66 -11
- package/platforms/ios/src/cpp/webgl/WebGLTexture.h +40 -6
- package/platforms/ios/src/cpp/webgl/WebGLUniformLocation.h +44 -8
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.cpp +126 -0
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.h +25 -11
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.h +25 -5
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.cpp +41 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.h +25 -5
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.cpp +306 -0
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.h +47 -13
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/EXT_shader_texture_lodImpl.h +37 -15
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.h +47 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_fbo_render_mipmap.h +51 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.h +44 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_floatImpl.h +38 -15
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_float_linearImpl.h +37 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.h +41 -6
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_float_linearImpl.h +40 -16
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.cpp +102 -0
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.h +69 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.h +51 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.h +49 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.h +49 -8
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.h +76 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.h +57 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.h +53 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.h +59 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.h +46 -6
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.cpp +35 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.h +127 -14
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.cpp +32 -0
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.h +61 -12
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +4375 -0
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.h +139 -343
- package/platforms/ios/src/cpp/webgl2/WebGLQuery.h +40 -4
- package/platforms/ios/src/cpp/webgl2/WebGLSampler.h +42 -3
- package/platforms/ios/src/cpp/webgl2/WebGLSyncImpl.h +44 -11
- package/platforms/ios/src/cpp/webgl2/WebGLTransformFeedback.h +42 -4
- package/platforms/ios/src/cpp/webgl2/WebGLVertexArrayObject.h +43 -4
- package/platforms/ios/src/module.modulemap +1 -0
- package/src-native/ios/Headers/include/APIDesign.md +72 -0
- package/src-native/ios/Headers/include/DEPS +10 -0
- package/src-native/ios/Headers/include/DIR_METADATA +11 -0
- package/src-native/ios/Headers/include/OWNERS +23 -0
- package/src-native/ios/Headers/include/cppgc/DEPS +8 -0
- package/src-native/ios/Headers/include/cppgc/OWNERS +2 -0
- package/src-native/ios/Headers/include/cppgc/README.md +133 -0
- package/src-native/ios/Headers/include/cppgc/allocation.h +310 -0
- package/src-native/ios/Headers/include/cppgc/common.h +29 -0
- package/src-native/ios/Headers/include/cppgc/cross-thread-persistent.h +465 -0
- package/src-native/ios/Headers/include/cppgc/custom-space.h +97 -0
- package/src-native/ios/Headers/include/cppgc/default-platform.h +67 -0
- package/src-native/ios/Headers/include/cppgc/ephemeron-pair.h +30 -0
- package/src-native/ios/Headers/include/cppgc/explicit-management.h +100 -0
- package/src-native/ios/Headers/include/cppgc/garbage-collected.h +106 -0
- package/src-native/ios/Headers/include/cppgc/heap-consistency.h +266 -0
- package/src-native/ios/Headers/include/cppgc/heap-state.h +82 -0
- package/src-native/ios/Headers/include/cppgc/heap-statistics.h +120 -0
- package/src-native/ios/Headers/include/cppgc/heap.h +206 -0
- package/src-native/ios/Headers/include/cppgc/internal/api-constants.h +55 -0
- package/src-native/ios/Headers/include/cppgc/internal/atomic-entry-flag.h +48 -0
- package/src-native/ios/Headers/include/cppgc/internal/caged-heap-local-data.h +79 -0
- package/src-native/ios/Headers/include/cppgc/internal/compiler-specific.h +38 -0
- package/src-native/ios/Headers/include/cppgc/internal/finalizer-trait.h +93 -0
- package/src-native/ios/Headers/include/cppgc/internal/gc-info.h +156 -0
- package/src-native/ios/Headers/include/cppgc/internal/logging.h +50 -0
- package/src-native/ios/Headers/include/cppgc/internal/name-trait.h +122 -0
- package/src-native/ios/Headers/include/cppgc/internal/persistent-node.h +216 -0
- package/src-native/ios/Headers/include/cppgc/internal/pointer-policies.h +186 -0
- package/src-native/ios/Headers/include/cppgc/internal/write-barrier.h +435 -0
- package/src-native/ios/Headers/include/cppgc/liveness-broker.h +77 -0
- package/src-native/ios/Headers/include/cppgc/macros.h +26 -0
- package/src-native/ios/Headers/include/cppgc/member.h +291 -0
- package/src-native/ios/Headers/include/cppgc/name-provider.h +65 -0
- package/src-native/ios/Headers/include/cppgc/object-size-trait.h +58 -0
- package/src-native/ios/Headers/include/cppgc/persistent.h +370 -0
- package/src-native/ios/Headers/include/cppgc/platform.h +156 -0
- package/src-native/ios/Headers/include/cppgc/prefinalizer.h +75 -0
- package/src-native/ios/Headers/include/cppgc/process-heap-statistics.h +36 -0
- package/src-native/ios/Headers/include/cppgc/sentinel-pointer.h +32 -0
- package/src-native/ios/Headers/include/cppgc/source-location.h +92 -0
- package/src-native/ios/Headers/include/cppgc/testing.h +106 -0
- package/src-native/ios/Headers/include/cppgc/trace-trait.h +116 -0
- package/src-native/ios/Headers/include/cppgc/type-traits.h +240 -0
- package/src-native/ios/Headers/include/cppgc/visitor.h +379 -0
- package/src-native/ios/Headers/include/js_protocol-1.2.json +936 -0
- package/src-native/ios/Headers/include/js_protocol-1.3.json +1112 -0
- package/src-native/ios/Headers/include/js_protocol.pdl +1709 -0
- package/src-native/ios/Headers/include/libffi/arm64/ffi.h +524 -0
- package/src-native/ios/Headers/include/libffi/arm64/ffitarget.h +92 -0
- package/src-native/ios/Headers/include/libffi/x86_64/ffi.h +524 -0
- package/src-native/ios/Headers/include/libffi/x86_64/ffitarget.h +147 -0
- package/src-native/ios/Headers/include/libffi.h +12 -0
- package/src-native/ios/Headers/include/libplatform/DEPS +9 -0
- package/src-native/ios/Headers/include/libplatform/libplatform-export.h +29 -0
- package/src-native/ios/Headers/include/libplatform/libplatform.h +106 -0
- package/src-native/ios/Headers/include/libplatform/v8-tracing.h +333 -0
- package/src-native/ios/Headers/include/v8-array-buffer.h +433 -0
- package/src-native/ios/Headers/include/v8-callbacks.h +397 -0
- package/src-native/ios/Headers/include/v8-container.h +129 -0
- package/src-native/ios/Headers/include/v8-context.h +407 -0
- package/src-native/ios/Headers/include/v8-cppgc.h +215 -0
- package/src-native/ios/Headers/include/v8-data.h +80 -0
- package/src-native/ios/Headers/include/v8-date.h +43 -0
- package/src-native/ios/Headers/include/v8-debug.h +168 -0
- package/src-native/ios/Headers/include/v8-embedder-heap.h +218 -0
- package/src-native/ios/Headers/include/v8-embedder-state-scope.h +51 -0
- package/src-native/ios/Headers/include/v8-exception.h +217 -0
- package/src-native/ios/Headers/include/v8-extension.h +62 -0
- package/src-native/ios/Headers/include/v8-external.h +37 -0
- package/src-native/ios/Headers/include/v8-fast-api-calls.h +939 -0
- package/src-native/ios/Headers/include/v8-forward.h +81 -0
- package/src-native/ios/Headers/include/v8-function-callback.h +475 -0
- package/src-native/ios/Headers/include/v8-function.h +125 -0
- package/src-native/ios/Headers/include/v8-initialization.h +315 -0
- package/src-native/ios/Headers/include/v8-inspector-protocol.h +13 -0
- package/src-native/ios/Headers/include/v8-inspector.h +376 -0
- package/src-native/ios/Headers/include/v8-internal.h +661 -0
- package/src-native/ios/Headers/include/v8-isolate.h +1709 -0
- package/src-native/ios/Headers/include/v8-json.h +47 -0
- package/src-native/ios/Headers/include/v8-local-handle.h +455 -0
- package/src-native/ios/Headers/include/v8-locker.h +149 -0
- package/src-native/ios/Headers/include/v8-maybe.h +137 -0
- package/src-native/ios/Headers/include/v8-memory-span.h +43 -0
- package/src-native/ios/Headers/include/v8-message.h +216 -0
- package/src-native/ios/Headers/include/v8-metrics.h +255 -0
- package/src-native/ios/Headers/include/v8-microtask-queue.h +152 -0
- package/src-native/ios/Headers/include/v8-microtask.h +28 -0
- package/src-native/ios/Headers/include/v8-object.h +775 -0
- package/src-native/ios/Headers/include/v8-persistent-handle.h +590 -0
- package/src-native/ios/Headers/include/v8-platform.h +1092 -0
- package/src-native/ios/Headers/include/v8-primitive-object.h +118 -0
- package/src-native/ios/Headers/include/v8-primitive.h +866 -0
- package/src-native/ios/Headers/include/v8-profiler.h +1198 -0
- package/src-native/ios/Headers/include/v8-promise.h +174 -0
- package/src-native/ios/Headers/include/v8-proxy.h +50 -0
- package/src-native/ios/Headers/include/v8-regexp.h +105 -0
- package/src-native/ios/Headers/include/v8-script.h +748 -0
- package/src-native/ios/Headers/include/v8-snapshot.h +196 -0
- package/src-native/ios/Headers/include/v8-statistics.h +217 -0
- package/src-native/ios/Headers/include/v8-template.h +1079 -0
- package/src-native/ios/Headers/include/v8-traced-handle.h +420 -0
- package/src-native/ios/Headers/include/v8-typed-array.h +282 -0
- package/src-native/ios/Headers/include/v8-unwinder-state.h +31 -0
- package/src-native/ios/Headers/include/v8-unwinder.h +132 -0
- package/src-native/ios/Headers/include/v8-util.h +658 -0
- package/src-native/ios/Headers/include/v8-value-serializer-version.h +24 -0
- package/src-native/ios/Headers/include/v8-value-serializer.h +279 -0
- package/src-native/ios/Headers/include/v8-value.h +526 -0
- package/src-native/ios/Headers/include/v8-version-string.h +38 -0
- package/src-native/ios/Headers/include/v8-version.h +20 -0
- package/src-native/ios/Headers/include/v8-wasm-trap-handler-posix.h +31 -0
- package/src-native/ios/Headers/include/v8-wasm-trap-handler-win.h +28 -0
- package/src-native/ios/Headers/include/v8-wasm.h +257 -0
- package/src-native/ios/Headers/include/v8-weak-callback-info.h +86 -0
- package/src-native/ios/Headers/include/v8.h +88 -0
- package/src-native/ios/Headers/include/v8config.h +605 -0
- package/src-native/ios/Headers/inspector/InspectorServer.h +20 -0
- package/src-native/ios/Headers/inspector/JsV8InspectorClient.h +66 -0
- package/src-native/ios/Headers/inspector/base/trace_event/common/trace_event_common.h +1123 -0
- package/src-native/ios/Headers/inspector/base64.h +9 -0
- package/src-native/ios/Headers/inspector/src/base/address-region.h +95 -0
- package/src-native/ios/Headers/inspector/src/base/atomic-utils.h +219 -0
- package/src-native/ios/Headers/inspector/src/base/atomicops.h +332 -0
- package/src-native/ios/Headers/inspector/src/base/atomicops_internals_atomicword_compat.h +89 -0
- package/src-native/ios/Headers/inspector/src/base/base-export.h +31 -0
- package/src-native/ios/Headers/inspector/src/base/bits.h +343 -0
- package/src-native/ios/Headers/inspector/src/base/build_config.h +234 -0
- package/src-native/ios/Headers/inspector/src/base/compiler-specific.h +136 -0
- package/src-native/ios/Headers/inspector/src/base/export-template.h +163 -0
- package/src-native/ios/Headers/inspector/src/base/flags.h +130 -0
- package/src-native/ios/Headers/inspector/src/base/immediate-crash.h +162 -0
- package/src-native/ios/Headers/inspector/src/base/lazy-instance.h +258 -0
- package/src-native/ios/Headers/inspector/src/base/logging.h +417 -0
- package/src-native/ios/Headers/inspector/src/base/macros.h +423 -0
- package/src-native/ios/Headers/inspector/src/base/memory.h +89 -0
- package/src-native/ios/Headers/inspector/src/base/once.h +108 -0
- package/src-native/ios/Headers/inspector/src/base/optional.h +882 -0
- package/src-native/ios/Headers/inspector/src/base/platform/mutex.h +370 -0
- package/src-native/ios/Headers/inspector/src/base/platform/platform.h +476 -0
- package/src-native/ios/Headers/inspector/src/base/platform/semaphore.h +108 -0
- package/src-native/ios/Headers/inspector/src/base/platform/v8-time.h +513 -0
- package/src-native/ios/Headers/inspector/src/base/platform/wrappers.h +73 -0
- package/src-native/ios/Headers/inspector/src/base/safe_conversions.h +389 -0
- package/src-native/ios/Headers/inspector/src/base/safe_conversions_impl.h +822 -0
- package/src-native/ios/Headers/inspector/src/base/template-utils.h +113 -0
- package/src-native/ios/Headers/inspector/src/base/v8-fallthrough.h +21 -0
- package/src-native/ios/Headers/inspector/src/common/checks.h +38 -0
- package/src-native/ios/Headers/inspector/src/common/globals.h +1842 -0
- package/src-native/ios/Headers/inspector/src/debug/debug-interface.h +667 -0
- package/src-native/ios/Headers/inspector/src/debug/interface-types.h +175 -0
- package/src-native/ios/Headers/inspector/src/init/v8.h +52 -0
- package/src-native/ios/Headers/inspector/src/inspector/custom-preview.h +24 -0
- package/src-native/ios/Headers/inspector/src/inspector/injected-script.h +251 -0
- package/src-native/ios/Headers/inspector/src/inspector/inspected-context.h +79 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/CSS.h +2148 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Console.h +211 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/DOM.h +1008 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Debugger.h +892 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Forward.h +75 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/HeapProfiler.h +346 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Log.h +342 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Network.h +2528 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Overlay.h +281 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Page.h +1189 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Profiler.h +1001 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Protocol.h +617 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Runtime.h +1696 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Schema.h +146 -0
- package/src-native/ios/Headers/inspector/src/inspector/protocol/Security.h +793 -0
- package/src-native/ios/Headers/inspector/src/inspector/remote-object-id.h +54 -0
- package/src-native/ios/Headers/inspector/src/inspector/search-util.h +26 -0
- package/src-native/ios/Headers/inspector/src/inspector/string-16.h +180 -0
- package/src-native/ios/Headers/inspector/src/inspector/string-util.h +128 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-console-agent-impl.h +48 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-console-message.h +147 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-console.h +173 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-css-agent-impl.h +62 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-debugger-agent-impl.h +248 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-debugger-id.h +44 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-debugger-script.h +123 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-debugger.h +257 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-dom-agent-impl.h +91 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-heap-profiler-agent-impl.h +80 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-inspector-impl.h +191 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-inspector-session-impl.h +156 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-log-agent-impl.h +34 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-network-agent-impl.h +71 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-ns-debugger-agent-impl.h +24 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-overlay-agent-impl.h +70 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-page-agent-impl.h +88 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-profiler-agent-impl.h +104 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-regex.h +38 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-runtime-agent-impl.h +157 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-schema-agent-impl.h +38 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-stack-trace-impl.h +164 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-string-conversions.h +17 -0
- package/src-native/ios/Headers/inspector/src/inspector/v8-value-utils.h +23 -0
- package/src-native/ios/Headers/inspector/src/inspector/value-mirror.h +87 -0
- package/src-native/ios/Headers/inspector/src/libplatform/default-platform.h +92 -0
- package/src-native/ios/Headers/inspector/src/logging/tracing-flags.h +50 -0
- package/src-native/ios/Headers/inspector/src/numbers/conversions.h +183 -0
- package/src-native/ios/Headers/inspector/src/tracing/trace-event.h +664 -0
- package/src-native/ios/Headers/inspector/src/utils/allocation.h +367 -0
- package/src-native/ios/Headers/inspector/src/utils/vector.h +324 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/cbor.h +305 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/dispatch.h +314 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/error_support.h +62 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/export.h +6 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/find_by_first.h +58 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/frontend_channel.h +47 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/glue.h +80 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/json.h +52 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/json_platform.h +26 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/maybe.h +104 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/parser_handler.h +39 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/protocol_core.h +406 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/serializable.h +32 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/serializer_traits.h +158 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/span.h +99 -0
- package/src-native/ios/Headers/inspector/third_party/inspector_protocol/crdtp/status.h +139 -0
- package/src-native/ios/Headers/inspector/utils.h +32 -0
- package/src-native/ios/Headers/inspector/v8-inspector-platform.h +44 -0
- package/src-native/ios/Headers/runtime/ArgConverter.h +61 -0
- package/src-native/ios/Headers/runtime/ArrayAdapter.h +13 -0
- package/src-native/ios/Headers/runtime/Caches.h +98 -0
- package/src-native/ios/Headers/runtime/ClassBuilder.h +61 -0
- package/src-native/ios/Headers/runtime/Common.h +9 -0
- package/src-native/ios/Headers/runtime/ConcurrentMap.h +55 -0
- package/src-native/ios/Headers/runtime/ConcurrentQueue.h +28 -0
- package/src-native/ios/Headers/runtime/Console.h +27 -0
- package/src-native/ios/Headers/runtime/Constants.h +15 -0
- package/src-native/ios/Headers/runtime/DataWrapper.h +671 -0
- package/src-native/ios/Headers/runtime/DictionaryAdapter.h +13 -0
- package/src-native/ios/Headers/runtime/ExtVector.h +21 -0
- package/src-native/ios/Headers/runtime/FFICall.h +105 -0
- package/src-native/ios/Headers/runtime/FastEnumerationAdapter.h +13 -0
- package/src-native/ios/Headers/runtime/FunctionReference.h +18 -0
- package/src-native/ios/Headers/runtime/Helpers.h +84 -0
- package/src-native/ios/Headers/runtime/InlineFunctions.h +16 -0
- package/src-native/ios/Headers/runtime/Interop.h +202 -0
- package/src-native/ios/Headers/runtime/KnownUnknownClassPair.h +35 -0
- package/src-native/ios/Headers/runtime/Metadata.h +981 -0
- package/src-native/ios/Headers/runtime/MetadataBuilder.h +72 -0
- package/src-native/ios/Headers/runtime/MetadataInlines.h +157 -0
- package/src-native/ios/Headers/runtime/ModuleInternal.h +59 -0
- package/src-native/ios/Headers/runtime/NSDataAdapter.h +13 -0
- package/src-native/ios/Headers/runtime/NativeScriptException.h +27 -0
- package/src-native/ios/Headers/runtime/ObjectManager.h +31 -0
- package/src-native/ios/Headers/runtime/OneByteStringResource.h +21 -0
- package/src-native/ios/Headers/runtime/Pointer.h +26 -0
- package/src-native/ios/Headers/runtime/PromiseProxy.h +15 -0
- package/src-native/ios/Headers/runtime/Reference.h +38 -0
- package/src-native/ios/Headers/runtime/Runtime.h +67 -0
- package/src-native/ios/Headers/runtime/RuntimeConfig.h +17 -0
- package/src-native/ios/Headers/runtime/SetTimeout.h +34 -0
- package/src-native/ios/Headers/runtime/SimpleAllocator.h +23 -0
- package/src-native/ios/Headers/runtime/StringHasher.h +315 -0
- package/src-native/ios/Headers/runtime/SymbolIterator.h +18 -0
- package/src-native/ios/Headers/runtime/SymbolLoader.h +27 -0
- package/src-native/ios/Headers/runtime/TNSDerivedClass.h +8 -0
- package/src-native/ios/Headers/runtime/TSHelpers.h +15 -0
- package/src-native/ios/Headers/runtime/Tasks.h +19 -0
- package/src-native/ios/Headers/runtime/UnmanagedType.h +21 -0
- package/src-native/ios/Headers/runtime/WeakRef.h +15 -0
- package/src-native/ios/Headers/runtime/Worker.h +26 -0
- package/src-native/ios/Headers/runtime/robin_hood.h +2184 -0
- package/src-native/ios/NativeScript.podspec +55 -0
- package/typings/objc!CanvasNative.d.ts +2038 -0
- package/typings/objc!CanvasNative.js +1 -0
- package/typings/objc!CanvasNative.js.map +1 -0
- package/utils.d.ts +3 -1
- package/utils.js +7 -20
- package/utils.js.map +1 -1
- package/angular/nativescript-canvas-angular.d.ts +0 -5
- package/platforms/ios/src/cpp/CanvasJSIModule.mm +0 -1105
- package/platforms/ios/src/cpp/ImageAssetImpl.mm +0 -417
- package/platforms/ios/src/cpp/ImageBitmapImpl.mm +0 -126
- package/platforms/ios/src/cpp/RafImpl.mm +0 -10
- package/platforms/ios/src/cpp/TextDecoderImpl.mm +0 -97
- package/platforms/ios/src/cpp/TextEncoderImpl.mm +0 -60
- package/platforms/ios/src/cpp/VecMutableBuffer.h +0 -51
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.cc +0 -6119
- package/platforms/ios/src/cpp/canvas-cxx/src/lib.rs.h +0 -2854
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.mm +0 -42
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.mm +0 -49
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.mm +0 -1954
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.mm +0 -68
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.mm +0 -149
- package/platforms/ios/src/cpp/canvas2d/Path2D.mm +0 -335
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.mm +0 -68
- package/platforms/ios/src/cpp/rust/cxx.cc +0 -793
- package/platforms/ios/src/cpp/rust/cxx.h +0 -1111
- package/platforms/ios/src/cpp/webgl/WebGLActiveInfoImpl.mm +0 -39
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.mm +0 -5879
- package/platforms/ios/src/cpp/webgl/WebGLShaderPrecisionFormatImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/ANGLE_instanced_arraysImpl.mm +0 -108
- package/platforms/ios/src/cpp/webgl/extensions/EXT_blend_minmaxImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/EXT_color_buffer_half_floatImpl.mm +0 -42
- package/platforms/ios/src/cpp/webgl/extensions/EXT_disjoint_timer_queryImpl.mm +0 -295
- package/platforms/ios/src/cpp/webgl/extensions/EXT_sRGBImpl.mm +0 -40
- package/platforms/ios/src/cpp/webgl/extensions/EXT_texture_filter_anisotropicImpl.mm +0 -37
- package/platforms/ios/src/cpp/webgl/extensions/OES_element_index_uintImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_standard_derivativesImpl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/OES_texture_half_floatImpl.mm +0 -28
- package/platforms/ios/src/cpp/webgl/extensions/OES_vertex_array_objectImpl.mm +0 -127
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_color_buffer_floatImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_atcImpl.mm +0 -45
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etc1Impl.mm +0 -31
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_etcImpl.mm +0 -70
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_pvrtcImpl.mm +0 -47
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tcImpl.mm +0 -46
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_compressed_texture_s3tc_srgbImpl.mm +0 -49
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_depth_textureImpl.mm +0 -30
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_draw_buffersImpl.mm +0 -177
- package/platforms/ios/src/cpp/webgl/extensions/WEBGL_lose_contextImpl.mm +0 -64
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.mm +0 -4554
- /package/platforms/ios/src/cpp/{OnRafCallback.mm → OnRafCallback.cpp} +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 "
|
|
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 "
|
|
20
|
-
#include "
|
|
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,207 @@
|
|
|
26
21
|
#include "gl.h"
|
|
27
22
|
|
|
28
23
|
|
|
29
|
-
|
|
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(
|
|
27
|
+
WebGL2RenderingContext(WebGLState* state);
|
|
36
28
|
|
|
37
|
-
WebGL2RenderingContext(
|
|
29
|
+
WebGL2RenderingContext(WebGLState* state, WebGLRenderingVersion version);
|
|
38
30
|
|
|
39
|
-
|
|
31
|
+
static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate);
|
|
40
32
|
|
|
41
|
-
|
|
33
|
+
static v8::Local<v8::Object>
|
|
34
|
+
NewInstance(v8::Isolate *isolate, WebGL2RenderingContext *renderingContext) {
|
|
35
|
+
auto context = isolate->GetCurrentContext();
|
|
36
|
+
v8::EscapableHandleScope scope(isolate);
|
|
37
|
+
auto object = WebGL2RenderingContext::GetCtor(isolate)->GetFunction(
|
|
38
|
+
context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
|
|
39
|
+
SetNativeType(isolate, object, NativeType::WebGLRenderingContextBase);
|
|
40
|
+
auto ext = v8::External::New(isolate, renderingContext);
|
|
41
|
+
object->SetInternalField(0, ext);
|
|
42
|
+
return scope.Escape(object);
|
|
43
|
+
}
|
|
42
44
|
|
|
43
|
-
static
|
|
44
|
-
if (methodName == "READ_BUFFER") { return {0x0C02}; }
|
|
45
|
+
static WebGL2RenderingContext *GetPointer(const v8::Local<v8::Object> &object);
|
|
45
46
|
|
|
46
|
-
|
|
47
|
+
static void SetConstants(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
47
48
|
|
|
48
|
-
|
|
49
|
+
static void
|
|
50
|
+
SetProps(v8::Isolate *isolate, const v8::Local<v8::ObjectTemplate> &webgl2RenderingContextTpl);
|
|
49
51
|
|
|
50
|
-
|
|
52
|
+
static void SetMethods(v8::Isolate *isolate,
|
|
53
|
+
const v8::Local<v8::ObjectTemplate> &tmpl);
|
|
51
54
|
|
|
52
|
-
|
|
55
|
+
static void BeginQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
53
56
|
|
|
54
|
-
|
|
57
|
+
static void BeginTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
55
58
|
|
|
56
|
-
|
|
59
|
+
static void BindBufferBase(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
57
60
|
|
|
58
|
-
|
|
61
|
+
static void BindBufferRange(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
59
62
|
|
|
60
|
-
|
|
63
|
+
static void BindSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
61
64
|
|
|
62
|
-
|
|
65
|
+
static void BindTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
63
66
|
|
|
64
|
-
|
|
67
|
+
static void BindVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
65
68
|
|
|
66
|
-
|
|
69
|
+
static void BlitFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
67
70
|
|
|
68
|
-
|
|
71
|
+
static void ClearBufferfi(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
69
72
|
|
|
70
|
-
|
|
73
|
+
static void ClearBufferfv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
71
74
|
|
|
72
|
-
|
|
75
|
+
static void ClearBufferiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
73
76
|
|
|
74
|
-
|
|
77
|
+
static void ClearBufferuiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
75
78
|
|
|
76
|
-
|
|
79
|
+
static void ClientWaitSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
77
80
|
|
|
78
|
-
|
|
81
|
+
static void CompressedTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
79
82
|
|
|
80
|
-
|
|
83
|
+
static void CopyBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
81
84
|
|
|
82
|
-
|
|
85
|
+
static void CopyTexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
83
86
|
|
|
84
|
-
|
|
87
|
+
static void CreateQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
85
88
|
|
|
86
|
-
|
|
89
|
+
static void CreateSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
87
90
|
|
|
88
|
-
|
|
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}; }
|
|
91
|
+
static void CreateTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
93
92
|
|
|
94
|
-
|
|
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}; }
|
|
93
|
+
static void CreateVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
99
94
|
|
|
100
|
-
|
|
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}; }
|
|
95
|
+
static void DeleteQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
105
96
|
|
|
97
|
+
static void DeleteSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
106
98
|
|
|
107
|
-
|
|
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}; }
|
|
99
|
+
static void DeleteSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
112
100
|
|
|
113
|
-
|
|
114
|
-
if (methodName == "RGBA32F") { return {0x8814}; }
|
|
115
|
-
if (methodName == "RGB32F") { return {0x8815}; }
|
|
116
|
-
if (methodName == "RGBA16F") { return {0x881A}; }
|
|
117
|
-
if (methodName == "RGB16F") { return {0x881B}; }
|
|
101
|
+
static void DeleteTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
118
102
|
|
|
119
|
-
|
|
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}; }
|
|
103
|
+
static void DeleteVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
124
104
|
|
|
105
|
+
static void DrawArraysInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
125
106
|
|
|
126
|
-
|
|
127
|
-
if (methodName == "RGBA16UI") { return {0x8D76}; }
|
|
128
|
-
if (methodName == "RGB16UI") { return {0x8D77}; }
|
|
129
|
-
if (methodName == "RGBA8UI") { return {0x8D7C}; }
|
|
130
|
-
if (methodName == "RGB8UI") { return {0x8D7D}; }
|
|
107
|
+
static void DrawBuffers(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
131
108
|
|
|
109
|
+
static void DrawElementsInstanced(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
132
110
|
|
|
133
|
-
|
|
134
|
-
if (methodName == "RGB32I") { return {0x8D83}; }
|
|
135
|
-
if (methodName == "RGBA16I") { return {0x8D88}; }
|
|
136
|
-
if (methodName == "RGB16I") { return {0x8D89}; }
|
|
137
|
-
if (methodName == "RGBA8I") { return {0x8D8E}; }
|
|
111
|
+
static void DrawRangeElements(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
138
112
|
|
|
113
|
+
static void EndQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
139
114
|
|
|
140
|
-
|
|
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}; }
|
|
115
|
+
static void EndTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
145
116
|
|
|
117
|
+
static void FenceSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
146
118
|
|
|
147
|
-
|
|
148
|
-
if (methodName == "R16F") { return {0x822D}; }
|
|
149
|
-
if (methodName == "R32F") { return {0x822E}; }
|
|
150
|
-
if (methodName == "RG16F") { return {0x822F}; }
|
|
151
|
-
if (methodName == "RG32F") { return {0x8230}; }
|
|
119
|
+
static void FramebufferTextureLayer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
152
120
|
|
|
121
|
+
static void GetActiveUniformBlockName(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
153
122
|
|
|
154
|
-
|
|
155
|
-
if (methodName == "R8UI") { return {0x8232}; }
|
|
156
|
-
if (methodName == "R16I") { return {0x8233}; }
|
|
157
|
-
if (methodName == "R16UI") { return {0x8234}; }
|
|
158
|
-
if (methodName == "R32I") { return {0x8235}; }
|
|
123
|
+
static void GetActiveUniformBlockParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
159
124
|
|
|
125
|
+
static void GetActiveUniforms(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
160
126
|
|
|
161
|
-
|
|
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}; }
|
|
127
|
+
static void GetBufferSubData(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
361
128
|
|
|
362
|
-
|
|
129
|
+
static void GetFragDataLocation(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
363
130
|
|
|
364
|
-
|
|
131
|
+
static void GetIndexedParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
365
132
|
|
|
366
|
-
|
|
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}; }
|
|
133
|
+
static void GetInternalformatParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
371
134
|
|
|
372
|
-
|
|
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}; }
|
|
135
|
+
static void GetParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
377
136
|
|
|
378
|
-
|
|
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}; }
|
|
137
|
+
static void GetQueryParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
383
138
|
|
|
384
|
-
|
|
139
|
+
static void GetQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
385
140
|
|
|
386
|
-
|
|
141
|
+
static void GetSamplerParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
387
142
|
|
|
388
|
-
|
|
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}; }
|
|
143
|
+
static void GetSyncParameter(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
393
144
|
|
|
394
|
-
|
|
395
|
-
if (methodName == "DEPTH") { return {0x1801}; }
|
|
396
|
-
if (methodName == "STENCIL") { return {0x1802}; }
|
|
145
|
+
static void GetTransformFeedbackVarying(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
397
146
|
|
|
398
|
-
|
|
147
|
+
static void GetUniformBlockIndex(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
399
148
|
|
|
400
|
-
|
|
149
|
+
static void GetUniformIndices(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
401
150
|
|
|
402
|
-
|
|
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}; }
|
|
151
|
+
static void InvalidateFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
407
152
|
|
|
408
|
-
|
|
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}; }
|
|
153
|
+
static void InvalidateSubFramebuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
414
154
|
|
|
415
|
-
|
|
155
|
+
static void IsQuery(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
416
156
|
|
|
417
|
-
|
|
418
|
-
if (methodName == "TIMEOUT_IGNORED") { return {-1}; }
|
|
157
|
+
static void IsSampler(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
419
158
|
|
|
420
|
-
|
|
159
|
+
static void IsSync(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
421
160
|
|
|
422
|
-
|
|
161
|
+
static void IsTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
423
162
|
|
|
424
|
-
|
|
163
|
+
static void IsVertexArray(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
425
164
|
|
|
426
|
-
|
|
165
|
+
static void PauseTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
427
166
|
|
|
428
|
-
|
|
429
|
-
|
|
167
|
+
static void ReadBuffer(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
168
|
+
|
|
169
|
+
static void RenderbufferStorageMultisample(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
170
|
+
|
|
171
|
+
static void ResumeTransformFeedback(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
172
|
+
|
|
173
|
+
static void SamplerParameterf(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
174
|
+
|
|
175
|
+
static void SamplerParameteri(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
176
|
+
|
|
177
|
+
static void TexImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
178
|
+
|
|
179
|
+
static void TexStorage2D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
180
|
+
|
|
181
|
+
static void TexStorage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
182
|
+
|
|
183
|
+
static void TexSubImage3D(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
184
|
+
|
|
185
|
+
static void TransformFeedbackVaryings(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
186
|
+
|
|
187
|
+
static void Uniform1ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
188
|
+
|
|
189
|
+
static void Uniform1uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
190
|
+
|
|
191
|
+
static void Uniform2ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
192
|
+
|
|
193
|
+
static void Uniform2uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
194
|
+
|
|
195
|
+
static void Uniform3ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
196
|
+
|
|
197
|
+
static void Uniform3uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
198
|
+
|
|
199
|
+
static void Uniform4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
200
|
+
|
|
201
|
+
static void Uniform4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
202
|
+
|
|
203
|
+
static void UniformBlockBinding(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
204
|
+
|
|
205
|
+
static void UniformMatrix2x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
206
|
+
|
|
207
|
+
static void UniformMatrix2x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
208
|
+
|
|
209
|
+
static void UniformMatrix3x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
210
|
+
|
|
211
|
+
static void UniformMatrix3x4fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
212
|
+
|
|
213
|
+
static void UniformMatrix4x2fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
214
|
+
|
|
215
|
+
static void UniformMatrix4x3fv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
216
|
+
|
|
217
|
+
static void VertexAttribDivisor(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
218
|
+
|
|
219
|
+
static void VertexAttribI4i(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
220
|
+
|
|
221
|
+
static void VertexAttribI4iv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
222
|
+
|
|
223
|
+
static void VertexAttribI4ui(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
224
|
+
|
|
225
|
+
static void VertexAttribI4uiv(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
430
226
|
|
|
431
227
|
};
|
|
@@ -4,14 +4,50 @@
|
|
|
4
4
|
|
|
5
5
|
#pragma once
|
|
6
6
|
|
|
7
|
-
#
|
|
7
|
+
#include "Caches.h"
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
class JSI_EXPORT WebGLQuery : public jsi::HostObject {
|
|
9
|
+
class WebGLQuery {
|
|
12
10
|
public:
|
|
13
11
|
WebGLQuery(uint32_t query) : query_(query) {}
|
|
14
12
|
|
|
13
|
+
static v8::Local<v8::FunctionTemplate> GetCtor(v8::Isolate *isolate) {
|
|
14
|
+
auto cache = Caches::Get(isolate);
|
|
15
|
+
auto ctor = cache->WebGLQueryTmpl.get();
|
|
16
|
+
if (ctor != nullptr) {
|
|
17
|
+
return ctor->Get(isolate);
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
v8::Local<v8::FunctionTemplate> ctorTmpl = v8::FunctionTemplate::New(isolate);
|
|
21
|
+
ctorTmpl->InstanceTemplate()->SetInternalFieldCount(1);
|
|
22
|
+
ctorTmpl->SetClassName(ConvertToV8String(isolate, "WebGLQuery"));
|
|
23
|
+
|
|
24
|
+
auto tmpl = ctorTmpl->InstanceTemplate();
|
|
25
|
+
tmpl->SetInternalFieldCount(1);
|
|
26
|
+
|
|
27
|
+
cache->WebGLQueryTmpl =
|
|
28
|
+
std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
|
|
29
|
+
return ctorTmpl;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
static v8::Local<v8::Object> NewInstance(v8::Isolate *isolate, WebGLQuery *query) {
|
|
33
|
+
auto context = isolate->GetCurrentContext();
|
|
34
|
+
v8::EscapableHandleScope scope(isolate);
|
|
35
|
+
auto object = WebGLQuery::GetCtor(isolate)->GetFunction(
|
|
36
|
+
context).ToLocalChecked()->NewInstance(context).ToLocalChecked();
|
|
37
|
+
SetNativeType(isolate, object, NativeType::WebGLQuery);
|
|
38
|
+
auto ext = v8::External::New(isolate, query);
|
|
39
|
+
object->SetInternalField(0, ext);
|
|
40
|
+
return scope.Escape(object);
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
static WebGLQuery *GetPointer(const v8::Local<v8::Object> &object) {
|
|
44
|
+
auto ptr = object->GetInternalField(0).As<v8::External>()->Value();
|
|
45
|
+
if (ptr == nullptr) {
|
|
46
|
+
return nullptr;
|
|
47
|
+
}
|
|
48
|
+
return static_cast<WebGLQuery *>(ptr);
|
|
49
|
+
}
|
|
50
|
+
|
|
15
51
|
uint32_t GetQuery() {
|
|
16
52
|
return this->query_;
|
|
17
53
|
}
|