@nativescript/canvas 2.0.0-webgpu.0 → 2.0.0-webgpu.2
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 +3 -18
- package/Canvas/common.js +9 -72
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.d.ts +6 -7
- package/Canvas/index.android.js +88 -42
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +7 -8
- package/Canvas/index.ios.d.ts +3 -2
- package/Canvas/index.ios.js +88 -46
- package/Canvas/index.ios.js.map +1 -1
- package/Canvas2D/CanvasRenderingContext2D/index.js +71 -72
- package/Canvas2D/CanvasRenderingContext2D/index.js.map +1 -1
- package/Canvas2D/DOMMatrix/index.js +1 -1
- package/Canvas2D/DOMMatrix/index.js.map +1 -1
- package/Canvas2D/ImageData/index.js.map +1 -1
- package/Canvas2D/Path2D/index.js.map +1 -1
- package/Dom/Dom.js +8 -1
- package/Dom/Dom.js.map +1 -1
- package/Dom/Group.js.map +1 -1
- package/Dom/Image.d.ts +4 -1
- package/Dom/Image.js +16 -2
- package/Dom/Image.js.map +1 -1
- package/Dom/Paint.js.map +1 -1
- package/Dom/Text.js.map +1 -1
- package/Dom/shaders/LinearGradient.js.map +1 -1
- package/Dom/shaders/TwoPointConicalGradient.js.map +1 -1
- package/Dom/shapes/Atlas.js.map +1 -1
- package/Dom/shapes/Circle.js.map +1 -1
- package/Dom/shapes/Line.js.map +1 -1
- package/Dom/shapes/Oval.js.map +1 -1
- package/Dom/shapes/Path.js.map +1 -1
- package/Dom/shapes/Rect.js.map +1 -1
- package/Dom/shapes/RoundedRect.js.map +1 -1
- package/Dom/shapes/index.js.map +1 -1
- package/ImageAsset/index.d.ts +3 -1
- package/ImageAsset/index.js +38 -6
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +3 -3
- package/ImageBitmap/index.js.map +1 -1
- package/README.md +64 -3
- package/TextDecoder/index.js +3 -3
- package/TextDecoder/index.js.map +1 -1
- package/TextEncoder/index.js +3 -3
- package/TextEncoder/index.js.map +1 -1
- package/WebGL/WebGLExtensions/index.js +5 -5
- package/WebGL/WebGLExtensions/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/common.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/Constants.js.map +1 -1
- package/WebGPU/GPU.js.map +1 -1
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUAdapterInfo.js.map +1 -1
- package/WebGPU/GPUBindGroup.js.map +1 -1
- package/WebGPU/GPUBindGroupLayout.js.map +1 -1
- package/WebGPU/GPUBuffer.js +5 -1
- package/WebGPU/GPUBuffer.js.map +1 -1
- package/WebGPU/GPUCanvasContext.d.ts +3 -1
- package/WebGPU/GPUCanvasContext.js +13 -4
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUCommandBuffer.js.map +1 -1
- package/WebGPU/GPUCommandEncoder.js +6 -1
- package/WebGPU/GPUCommandEncoder.js.map +1 -1
- package/WebGPU/GPUComputePassEncoder.js.map +1 -1
- package/WebGPU/GPUComputePipeline.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +2 -2
- package/WebGPU/GPUDevice.js +41 -65
- package/WebGPU/GPUDevice.js.map +1 -1
- package/WebGPU/GPUExternalTexture.js.map +1 -1
- package/WebGPU/GPUPipelineLayout.js.map +1 -1
- package/WebGPU/GPUQuerySet.js.map +1 -1
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/GPURenderBundle.js.map +1 -1
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -1
- package/WebGPU/GPURenderPassEncoder.js +2 -2
- package/WebGPU/GPURenderPassEncoder.js.map +1 -1
- package/WebGPU/GPURenderPipeline.js.map +1 -1
- package/WebGPU/GPUSampler.js.map +1 -1
- package/WebGPU/GPUShaderModule.js.map +1 -1
- package/WebGPU/GPUTexture.d.ts +1 -0
- package/WebGPU/GPUTexture.js +3 -0
- package/WebGPU/GPUTexture.js.map +1 -1
- package/WebGPU/GPUTextureView.js.map +1 -1
- package/WebGPU/Types.d.ts +27 -27
- package/WebGPU/Utils.d.ts +1 -1
- package/WebGPU/Utils.js.map +1 -1
- package/angular/{esm2020 → esm2022}/index.mjs +5 -5
- package/angular/{fesm2015 → fesm2022}/nativescript-canvas-angular.mjs +4 -4
- package/angular/{fesm2020 → fesm2022}/nativescript-canvas-angular.mjs.map +1 -1
- package/common.d.ts +0 -3
- package/common.js +1 -5
- package/common.js.map +1 -1
- package/helpers.js.map +1 -1
- package/package.json +4 -2
- package/platforms/android/canvas-release.aar +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/CanvasNative-Swift.h +21 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +2112 -2086
- 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 +5995 -5933
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +644 -602
- 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 +42 -18
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +2112 -2086
- 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 +5995 -5933
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +5995 -5933
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +35 -9
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +24 -24
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/DWARF/CanvasNative +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/aarch64/CanvasNative.yml +646 -604
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +684 -638
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +12 -12
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +11 -11
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +1 -1
- package/platforms/ios/src/cpp/JSIReadFileCallback.h +4 -4
- package/platforms/ios/src/cpp/OneByteStringResource.cpp +2 -2
- package/platforms/ios/src/cpp/RafImpl.h +2 -2
- package/platforms/ios/src/cpp/TextDecoderImpl.cpp +0 -6
- package/platforms/ios/src/cpp/TextDecoderImpl.h +3 -3
- package/platforms/ios/src/cpp/TextEncoderImpl.cpp +1 -1
- package/platforms/ios/src/cpp/TextEncoderImpl.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/CanvasGradient.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasPattern.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.cpp +140 -70
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +66 -17
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.cpp +3 -4
- package/platforms/ios/src/cpp/canvas2d/ImageDataImpl.h +3 -3
- package/platforms/ios/src/cpp/canvas2d/MatrixImpl.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/Path2D.h +2 -2
- package/platforms/ios/src/cpp/canvas2d/TextMetricsImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +8 -8
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContextBase.cpp +1 -1
- package/platforms/ios/src/cpp/webgl2/WebGL2RenderingContext.cpp +722 -722
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUCanvasContextImpl.cpp +11 -11
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +207 -72
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +28 -20
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.h +1 -1
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +2 -2
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +24 -53
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.h +2 -2
- package/platforms/ios/src/cpp/webgpu/GPUUtils.h +69 -2
- package/react/index.d.ts +1 -1
- package/utils.js.map +1 -1
- package/angular/fesm2015/nativescript-canvas-angular.mjs.map +0 -1
- package/angular/fesm2020/nativescript-canvas-angular.mjs +0 -24
- package/angular/package.json +0 -26
- package/typings/objc!CanvasNative.d.ts +0 -2038
- package/typings/objc!CanvasNative.js +0 -1
- package/typings/objc!CanvasNative.js.map +0 -1
- /package/angular/{esm2020 → esm2022}/nativescript-canvas-angular.mjs +0 -0
|
@@ -255,7 +255,8 @@ void CanvasRenderingContext2DImpl::Init(v8::Local<v8::Object> canvasModule, v8::
|
|
|
255
255
|
auto context = isolate->GetCurrentContext();
|
|
256
256
|
auto func = ctor->GetFunction(context).ToLocalChecked();
|
|
257
257
|
|
|
258
|
-
canvasModule->Set(context, ConvertToV8String(isolate, "CanvasRenderingContext2D"),
|
|
258
|
+
canvasModule->Set(context, ConvertToV8String(isolate, "CanvasRenderingContext2D"),
|
|
259
|
+
func).FromJust();
|
|
259
260
|
}
|
|
260
261
|
|
|
261
262
|
CanvasRenderingContext2DImpl *
|
|
@@ -1206,10 +1207,6 @@ void CanvasRenderingContext2DImpl::GetFillStyle(v8::Local<v8::String> property,
|
|
|
1206
1207
|
info.GetReturnValue().Set(style);
|
|
1207
1208
|
break;
|
|
1208
1209
|
}
|
|
1209
|
-
case PaintStyleType::PaintStyleTypeNone: {
|
|
1210
|
-
info.GetReturnValue().SetUndefined();
|
|
1211
|
-
break;
|
|
1212
|
-
}
|
|
1213
1210
|
}
|
|
1214
1211
|
|
|
1215
1212
|
}
|
|
@@ -1289,10 +1286,6 @@ void CanvasRenderingContext2DImpl::GetStrokeStyle(v8::Local<v8::String> property
|
|
|
1289
1286
|
info.GetReturnValue().Set(style);
|
|
1290
1287
|
break;
|
|
1291
1288
|
}
|
|
1292
|
-
case PaintStyleType::PaintStyleTypeNone: {
|
|
1293
|
-
info.GetReturnValue().SetUndefined();
|
|
1294
|
-
break;
|
|
1295
|
-
}
|
|
1296
1289
|
}
|
|
1297
1290
|
|
|
1298
1291
|
}
|
|
@@ -1540,13 +1533,13 @@ void CanvasRenderingContext2DImpl::Clip(const v8::FunctionCallbackInfo<v8::Value
|
|
|
1540
1533
|
auto count = args.Length();
|
|
1541
1534
|
if (count == 0) {
|
|
1542
1535
|
canvas_native_context_clip_rule(
|
|
1543
|
-
ptr->GetContext(),
|
|
1536
|
+
ptr->GetContext(), CanvasFillRuleNonZero);
|
|
1544
1537
|
} else if (count == 1 && args[0]->IsUint32()) {
|
|
1545
1538
|
uint32_t val = 0;
|
|
1546
1539
|
|
|
1547
1540
|
if (args[0]->Uint32Value(context).To(&val)) {
|
|
1548
1541
|
canvas_native_context_clip_rule(
|
|
1549
|
-
ptr->GetContext(), val);
|
|
1542
|
+
ptr->GetContext(), val == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
1550
1543
|
}
|
|
1551
1544
|
} else if (count == 1 && args[0]->IsObject()) {
|
|
1552
1545
|
auto type = GetNativeType(args[0].As<v8::Object>());
|
|
@@ -1555,7 +1548,7 @@ void CanvasRenderingContext2DImpl::Clip(const v8::FunctionCallbackInfo<v8::Value
|
|
|
1555
1548
|
|
|
1556
1549
|
if (object != nullptr) {
|
|
1557
1550
|
canvas_native_context_clip(
|
|
1558
|
-
ptr->GetContext(), object->GetPath(),
|
|
1551
|
+
ptr->GetContext(), object->GetPath(), CanvasFillRuleNonZero);
|
|
1559
1552
|
}
|
|
1560
1553
|
}
|
|
1561
1554
|
} else if (count >= 2 && args[0]->IsObject() && args[1]->IsUint32()) {
|
|
@@ -1566,7 +1559,8 @@ void CanvasRenderingContext2DImpl::Clip(const v8::FunctionCallbackInfo<v8::Value
|
|
|
1566
1559
|
|
|
1567
1560
|
if (args[1]->Uint32Value(context).To(&rule)) {
|
|
1568
1561
|
canvas_native_context_clip(
|
|
1569
|
-
ptr->GetContext(), object->GetPath(),
|
|
1562
|
+
ptr->GetContext(), object->GetPath(),
|
|
1563
|
+
rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
1570
1564
|
}
|
|
1571
1565
|
}
|
|
1572
1566
|
}
|
|
@@ -1661,18 +1655,36 @@ CanvasRenderingContext2DImpl::CreatePattern(const v8::FunctionCallbackInfo<v8::V
|
|
|
1661
1655
|
auto image_asset = ImageAssetImpl::GetPointer(value.As<v8::Object>());
|
|
1662
1656
|
if (image_asset != nullptr) {
|
|
1663
1657
|
auto rep = ConvertFromV8String(isolate, args[1]);
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1667
|
-
|
|
1668
|
-
|
|
1669
|
-
|
|
1670
|
-
|
|
1671
|
-
|
|
1658
|
+
|
|
1659
|
+
PaintStyle *style = nullptr;
|
|
1660
|
+
if (rep == "no-repeat") {
|
|
1661
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1662
|
+
ptr->GetContext(),
|
|
1663
|
+
image_asset->GetImageAsset(), CanvasRepetitionNoRepeat);
|
|
1664
|
+
} else if (rep == "repeat") {
|
|
1665
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1666
|
+
ptr->GetContext(),
|
|
1667
|
+
image_asset->GetImageAsset(), CanvasRepetitionRepeat);
|
|
1668
|
+
} else if (rep == "repeat-x") {
|
|
1669
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1670
|
+
ptr->GetContext(),
|
|
1671
|
+
image_asset->GetImageAsset(), CanvasRepetitionRepeatX);
|
|
1672
|
+
} else if (rep == "repeat-y") {
|
|
1673
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1674
|
+
ptr->GetContext(),
|
|
1675
|
+
image_asset->GetImageAsset(), CanvasRepetitionRepeatY);
|
|
1672
1676
|
} else {
|
|
1673
|
-
|
|
1674
|
-
args.GetReturnValue().
|
|
1677
|
+
// todo
|
|
1678
|
+
args.GetReturnValue().SetUndefined();
|
|
1679
|
+
return;
|
|
1680
|
+
}
|
|
1681
|
+
if (style == nullptr) {
|
|
1682
|
+
args.GetReturnValue().SetNull();
|
|
1683
|
+
return;
|
|
1675
1684
|
}
|
|
1685
|
+
|
|
1686
|
+
auto data = CanvasPattern::NewInstance(isolate, new CanvasPattern(style));
|
|
1687
|
+
args.GetReturnValue().Set(data);
|
|
1676
1688
|
}
|
|
1677
1689
|
return;
|
|
1678
1690
|
}
|
|
@@ -1680,18 +1692,37 @@ CanvasRenderingContext2DImpl::CreatePattern(const v8::FunctionCallbackInfo<v8::V
|
|
|
1680
1692
|
auto image_bitmap = ImageBitmapImpl::GetPointer(value.As<v8::Object>());
|
|
1681
1693
|
if (image_bitmap != nullptr) {
|
|
1682
1694
|
auto rep = ConvertFromV8String(isolate, args[1]);
|
|
1683
|
-
|
|
1684
|
-
|
|
1685
|
-
|
|
1686
|
-
|
|
1687
|
-
|
|
1688
|
-
|
|
1689
|
-
|
|
1690
|
-
|
|
1695
|
+
PaintStyle *style = nullptr;
|
|
1696
|
+
|
|
1697
|
+
if (rep == "no-repeat") {
|
|
1698
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1699
|
+
ptr->GetContext(),
|
|
1700
|
+
image_bitmap->GetImageAsset(), CanvasRepetitionNoRepeat);
|
|
1701
|
+
} else if (rep == "repeat") {
|
|
1702
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1703
|
+
ptr->GetContext(),
|
|
1704
|
+
image_bitmap->GetImageAsset(), CanvasRepetitionRepeat);
|
|
1705
|
+
} else if (rep == "repeat-x") {
|
|
1706
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1707
|
+
ptr->GetContext(),
|
|
1708
|
+
image_bitmap->GetImageAsset(), CanvasRepetitionRepeatX);
|
|
1709
|
+
} else if (rep == "repeat-y") {
|
|
1710
|
+
style = canvas_native_context_create_pattern_asset(
|
|
1711
|
+
ptr->GetContext(),
|
|
1712
|
+
image_bitmap->GetImageAsset(), CanvasRepetitionRepeatY);
|
|
1691
1713
|
} else {
|
|
1692
|
-
|
|
1693
|
-
args.GetReturnValue().
|
|
1714
|
+
// todo
|
|
1715
|
+
args.GetReturnValue().SetUndefined();
|
|
1716
|
+
return;
|
|
1694
1717
|
}
|
|
1718
|
+
if (style == nullptr) {
|
|
1719
|
+
args.GetReturnValue().SetNull();
|
|
1720
|
+
return;
|
|
1721
|
+
}
|
|
1722
|
+
|
|
1723
|
+
|
|
1724
|
+
auto data = CanvasPattern::NewInstance(isolate, new CanvasPattern(style));
|
|
1725
|
+
args.GetReturnValue().Set(data);
|
|
1695
1726
|
}
|
|
1696
1727
|
return;
|
|
1697
1728
|
}
|
|
@@ -1700,18 +1731,36 @@ CanvasRenderingContext2DImpl::CreatePattern(const v8::FunctionCallbackInfo<v8::V
|
|
|
1700
1731
|
value.As<v8::Object>());
|
|
1701
1732
|
if (canvas_2d != nullptr) {
|
|
1702
1733
|
auto rep = ConvertFromV8String(isolate, args[1]);
|
|
1703
|
-
|
|
1704
|
-
|
|
1705
|
-
|
|
1706
|
-
|
|
1707
|
-
|
|
1708
|
-
|
|
1709
|
-
|
|
1710
|
-
|
|
1734
|
+
PaintStyle *style = nullptr;
|
|
1735
|
+
|
|
1736
|
+
if (rep == "no-repeat") {
|
|
1737
|
+
style = canvas_native_context_create_pattern_canvas2d(
|
|
1738
|
+
canvas_2d->GetContext(),
|
|
1739
|
+
ptr->GetContext(), CanvasRepetitionNoRepeat);
|
|
1740
|
+
} else if (rep == "repeat") {
|
|
1741
|
+
style = canvas_native_context_create_pattern_canvas2d(
|
|
1742
|
+
canvas_2d->GetContext(),
|
|
1743
|
+
ptr->GetContext(), CanvasRepetitionRepeat);
|
|
1744
|
+
} else if (rep == "repeat-x") {
|
|
1745
|
+
style = canvas_native_context_create_pattern_canvas2d(
|
|
1746
|
+
canvas_2d->GetContext(),
|
|
1747
|
+
ptr->GetContext(), CanvasRepetitionRepeatX);
|
|
1748
|
+
} else if (rep == "repeat-y") {
|
|
1749
|
+
style = canvas_native_context_create_pattern_canvas2d(
|
|
1750
|
+
canvas_2d->GetContext(),
|
|
1751
|
+
ptr->GetContext(), CanvasRepetitionRepeatY);
|
|
1711
1752
|
} else {
|
|
1712
|
-
|
|
1713
|
-
args.GetReturnValue().
|
|
1753
|
+
// todo
|
|
1754
|
+
args.GetReturnValue().SetUndefined();
|
|
1755
|
+
return;
|
|
1756
|
+
}
|
|
1757
|
+
if (style == nullptr) {
|
|
1758
|
+
args.GetReturnValue().SetNull();
|
|
1759
|
+
return;
|
|
1714
1760
|
}
|
|
1761
|
+
|
|
1762
|
+
auto data = CanvasPattern::NewInstance(isolate, new CanvasPattern(style));
|
|
1763
|
+
args.GetReturnValue().Set(data);
|
|
1715
1764
|
}
|
|
1716
1765
|
return;
|
|
1717
1766
|
}
|
|
@@ -1719,21 +1768,40 @@ CanvasRenderingContext2DImpl::CreatePattern(const v8::FunctionCallbackInfo<v8::V
|
|
|
1719
1768
|
auto webgl = WebGLRenderingContextBase::GetPointer(value.As<v8::Object>());
|
|
1720
1769
|
if (webgl != nullptr) {
|
|
1721
1770
|
auto rep = ConvertFromV8String(isolate, args[1]);
|
|
1722
|
-
|
|
1723
|
-
|
|
1724
|
-
|
|
1725
|
-
|
|
1726
|
-
|
|
1727
|
-
|
|
1728
|
-
|
|
1729
|
-
|
|
1730
|
-
|
|
1771
|
+
|
|
1772
|
+
PaintStyle *style = nullptr;
|
|
1773
|
+
|
|
1774
|
+
if (rep == "no-repeat") {
|
|
1775
|
+
style = canvas_native_context_create_pattern_webgl(
|
|
1776
|
+
webgl->GetState(),
|
|
1777
|
+
ptr->GetContext(), CanvasRepetitionNoRepeat);
|
|
1778
|
+
} else if (rep == "repeat") {
|
|
1779
|
+
style = canvas_native_context_create_pattern_webgl(
|
|
1780
|
+
webgl->GetState(),
|
|
1781
|
+
ptr->GetContext(), CanvasRepetitionRepeat);
|
|
1782
|
+
} else if (rep == "repeat-x") {
|
|
1783
|
+
style = canvas_native_context_create_pattern_webgl(
|
|
1784
|
+
webgl->GetState(),
|
|
1785
|
+
ptr->GetContext(), CanvasRepetitionRepeatX);
|
|
1786
|
+
} else if (rep == "repeat-y") {
|
|
1787
|
+
style = canvas_native_context_create_pattern_webgl(
|
|
1788
|
+
webgl->GetState(),
|
|
1789
|
+
ptr->GetContext(), CanvasRepetitionRepeatY);
|
|
1731
1790
|
} else {
|
|
1732
|
-
|
|
1733
|
-
|
|
1734
|
-
|
|
1791
|
+
// todo
|
|
1792
|
+
args.GetReturnValue().SetUndefined();
|
|
1793
|
+
return;
|
|
1794
|
+
}
|
|
1795
|
+
|
|
1796
|
+
if (style == nullptr) {
|
|
1797
|
+
args.GetReturnValue().SetNull();
|
|
1735
1798
|
return;
|
|
1736
1799
|
}
|
|
1800
|
+
|
|
1801
|
+
auto ret = CanvasPattern::NewInstance(isolate, new CanvasPattern(
|
|
1802
|
+
style));
|
|
1803
|
+
args.GetReturnValue().Set(ret);
|
|
1804
|
+
return;
|
|
1737
1805
|
}
|
|
1738
1806
|
return;
|
|
1739
1807
|
}
|
|
@@ -1831,16 +1899,16 @@ CanvasRenderingContext2DImpl::__CreatePatternWithNative(
|
|
|
1831
1899
|
auto pointer = args[0]->ToBigInt(context).ToLocalChecked();
|
|
1832
1900
|
|
|
1833
1901
|
auto pattern = canvas_native_pattern_from_ptr(pointer->Int64Value());
|
|
1834
|
-
auto type = canvas_native_context_get_style_type(pattern);
|
|
1835
|
-
if (type == PaintStyleType::PaintStyleTypeNone) {
|
|
1836
|
-
args.GetReturnValue().SetUndefined();
|
|
1837
|
-
canvas_native_paint_style_destroy(pattern);
|
|
1838
|
-
} else {
|
|
1839
|
-
auto data = CanvasPattern::NewInstance(isolate, new CanvasPattern(pattern));
|
|
1840
1902
|
|
|
1841
|
-
|
|
1903
|
+
if (pattern == nullptr) {
|
|
1904
|
+
args.GetReturnValue().SetNull();
|
|
1905
|
+
return;
|
|
1842
1906
|
}
|
|
1843
1907
|
|
|
1908
|
+
auto data = CanvasPattern::NewInstance(isolate, new CanvasPattern(pattern));
|
|
1909
|
+
|
|
1910
|
+
args.GetReturnValue().Set(data);
|
|
1911
|
+
|
|
1844
1912
|
}
|
|
1845
1913
|
|
|
1846
1914
|
void
|
|
@@ -2282,7 +2350,8 @@ CanvasRenderingContext2DImpl::Fill(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
2282
2350
|
auto rule = args[1]->Uint32Value(context).ToChecked();
|
|
2283
2351
|
canvas_native_context_fill_with_path(
|
|
2284
2352
|
ptr->GetContext(),
|
|
2285
|
-
object->GetPath(),
|
|
2353
|
+
object->GetPath(),
|
|
2354
|
+
rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
2286
2355
|
ptr->UpdateInvalidateState();
|
|
2287
2356
|
}
|
|
2288
2357
|
}
|
|
@@ -2291,7 +2360,7 @@ CanvasRenderingContext2DImpl::Fill(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
2291
2360
|
auto rule = value->Uint32Value(context).ToChecked();
|
|
2292
2361
|
canvas_native_context_fill(
|
|
2293
2362
|
ptr->GetContext(),
|
|
2294
|
-
rule);
|
|
2363
|
+
rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
2295
2364
|
ptr->UpdateInvalidateState();
|
|
2296
2365
|
} else if (value->IsObject()) {
|
|
2297
2366
|
auto type = GetNativeType(value.As<v8::Object>());
|
|
@@ -2300,13 +2369,13 @@ CanvasRenderingContext2DImpl::Fill(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
2300
2369
|
|
|
2301
2370
|
canvas_native_context_fill_with_path(
|
|
2302
2371
|
ptr->GetContext(),
|
|
2303
|
-
object->GetPath(),
|
|
2372
|
+
object->GetPath(), CanvasFillRuleNonZero);
|
|
2304
2373
|
ptr->UpdateInvalidateState();
|
|
2305
2374
|
}
|
|
2306
2375
|
}
|
|
2307
2376
|
} else {
|
|
2308
2377
|
canvas_native_context_fill(
|
|
2309
|
-
ptr->GetContext(),
|
|
2378
|
+
ptr->GetContext(), CanvasFillRuleNonZero);
|
|
2310
2379
|
ptr->UpdateInvalidateState();
|
|
2311
2380
|
}
|
|
2312
2381
|
}
|
|
@@ -2457,7 +2526,7 @@ CanvasRenderingContext2DImpl::IsPointInPath(const v8::FunctionCallbackInfo<v8::V
|
|
|
2457
2526
|
auto x = static_cast<float>(args[0]->NumberValue(context).ToChecked());
|
|
2458
2527
|
auto y = static_cast<float>(args[1]->NumberValue(context).ToChecked());
|
|
2459
2528
|
auto ret = canvas_native_context_is_point_in_path(
|
|
2460
|
-
ptr->GetContext(), x, y,
|
|
2529
|
+
ptr->GetContext(), x, y, CanvasFillRuleNonZero);
|
|
2461
2530
|
args.GetReturnValue().Set(ret);
|
|
2462
2531
|
return;
|
|
2463
2532
|
} else if (count == 3 &&
|
|
@@ -2466,7 +2535,7 @@ CanvasRenderingContext2DImpl::IsPointInPath(const v8::FunctionCallbackInfo<v8::V
|
|
|
2466
2535
|
auto y = static_cast<float>(args[1]->NumberValue(context).ToChecked());
|
|
2467
2536
|
auto rule = args[2]->Uint32Value(context).ToChecked();
|
|
2468
2537
|
bool ret = canvas_native_context_is_point_in_path(
|
|
2469
|
-
ptr->GetContext(), x, y, rule);
|
|
2538
|
+
ptr->GetContext(), x, y, rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
2470
2539
|
args.GetReturnValue().Set(ret);
|
|
2471
2540
|
return;
|
|
2472
2541
|
} else if (count == 4 &&
|
|
@@ -2486,7 +2555,8 @@ CanvasRenderingContext2DImpl::IsPointInPath(const v8::FunctionCallbackInfo<v8::V
|
|
|
2486
2555
|
|
|
2487
2556
|
bool ret = canvas_native_context_is_point_in_path_with_path(
|
|
2488
2557
|
ptr->GetContext(),
|
|
2489
|
-
path->GetPath(), x, y,
|
|
2558
|
+
path->GetPath(), x, y,
|
|
2559
|
+
rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
2490
2560
|
|
|
2491
2561
|
args.GetReturnValue().Set(ret);
|
|
2492
2562
|
return;
|
|
@@ -3061,7 +3131,7 @@ CanvasRenderingContext2DImpl::~CanvasRenderingContext2DImpl() {
|
|
|
3061
3131
|
canvas_native_raf_stop(raf->GetRaf());
|
|
3062
3132
|
}
|
|
3063
3133
|
|
|
3064
|
-
|
|
3134
|
+
canvas_native_context_release(this->GetContext());
|
|
3065
3135
|
this->context_ = nullptr;
|
|
3066
3136
|
}
|
|
3067
3137
|
|
|
@@ -503,9 +503,12 @@ public:
|
|
|
503
503
|
|
|
504
504
|
switch (rule) {
|
|
505
505
|
case 0:
|
|
506
|
+
canvas_native_context_clip_rule(
|
|
507
|
+
ptr->GetContext(), CanvasFillRuleNonZero);
|
|
508
|
+
break;
|
|
506
509
|
case 1:
|
|
507
510
|
canvas_native_context_clip_rule(
|
|
508
|
-
ptr->GetContext(),
|
|
511
|
+
ptr->GetContext(), CanvasFillRuleEvenOdd);
|
|
509
512
|
break;
|
|
510
513
|
default:
|
|
511
514
|
break;
|
|
@@ -521,7 +524,7 @@ public:
|
|
|
521
524
|
if (GetNativeType(path_obj) == NativeType::Path2D) {
|
|
522
525
|
auto path = Path2D::GetPointer(path_obj);
|
|
523
526
|
canvas_native_context_clip(
|
|
524
|
-
ptr->GetContext(), path->GetPath(),
|
|
527
|
+
ptr->GetContext(), path->GetPath(), CanvasFillRuleNonZero);
|
|
525
528
|
}
|
|
526
529
|
|
|
527
530
|
|
|
@@ -536,8 +539,17 @@ public:
|
|
|
536
539
|
|
|
537
540
|
if (GetNativeType(path_obj) == NativeType::Path2D) {
|
|
538
541
|
auto path = Path2D::GetPointer(path_obj);
|
|
539
|
-
|
|
540
|
-
|
|
542
|
+
switch (rule) {
|
|
543
|
+
case 0:
|
|
544
|
+
canvas_native_context_clip(
|
|
545
|
+
ptr->GetContext(), path->GetPath(), CanvasFillRuleNonZero);
|
|
546
|
+
break;
|
|
547
|
+
case 1:
|
|
548
|
+
canvas_native_context_clip(
|
|
549
|
+
ptr->GetContext(), path->GetPath(), CanvasFillRuleEvenOdd);
|
|
550
|
+
break;
|
|
551
|
+
default: break;
|
|
552
|
+
}
|
|
541
553
|
}
|
|
542
554
|
|
|
543
555
|
}
|
|
@@ -884,10 +896,22 @@ public:
|
|
|
884
896
|
auto object = Path2D::GetPointer(path);
|
|
885
897
|
|
|
886
898
|
if (object != nullptr) {
|
|
887
|
-
|
|
888
|
-
|
|
889
|
-
|
|
890
|
-
|
|
899
|
+
switch (rule) {
|
|
900
|
+
case 0:
|
|
901
|
+
canvas_native_context_fill_with_path(
|
|
902
|
+
ptr->GetContext(),
|
|
903
|
+
object->GetPath(),
|
|
904
|
+
CanvasFillRuleNonZero);
|
|
905
|
+
break;
|
|
906
|
+
case 1:
|
|
907
|
+
canvas_native_context_fill_with_path(
|
|
908
|
+
ptr->GetContext(),
|
|
909
|
+
object->GetPath(),
|
|
910
|
+
CanvasFillRuleEvenOdd);
|
|
911
|
+
break;
|
|
912
|
+
default: break;
|
|
913
|
+
}
|
|
914
|
+
|
|
891
915
|
ptr->UpdateInvalidateState();
|
|
892
916
|
}
|
|
893
917
|
}
|
|
@@ -901,9 +925,10 @@ public:
|
|
|
901
925
|
|
|
902
926
|
auto object = Path2D::GetPointer(path);
|
|
903
927
|
|
|
928
|
+
|
|
904
929
|
canvas_native_context_fill_with_path(
|
|
905
930
|
ptr->GetContext(),
|
|
906
|
-
object->GetPath(),
|
|
931
|
+
object->GetPath(), CanvasFillRuleNonZero);
|
|
907
932
|
ptr->UpdateInvalidateState();
|
|
908
933
|
}
|
|
909
934
|
|
|
@@ -913,8 +938,20 @@ public:
|
|
|
913
938
|
return;
|
|
914
939
|
}
|
|
915
940
|
|
|
916
|
-
|
|
917
|
-
|
|
941
|
+
|
|
942
|
+
switch (rule) {
|
|
943
|
+
case 0:
|
|
944
|
+
canvas_native_context_fill(
|
|
945
|
+
ptr->GetContext(), CanvasFillRuleNonZero);
|
|
946
|
+
break;
|
|
947
|
+
case 1:
|
|
948
|
+
canvas_native_context_fill(
|
|
949
|
+
ptr->GetContext(), CanvasFillRuleEvenOdd);
|
|
950
|
+
break;
|
|
951
|
+
default: break;
|
|
952
|
+
}
|
|
953
|
+
|
|
954
|
+
|
|
918
955
|
ptr->UpdateInvalidateState();
|
|
919
956
|
}
|
|
920
957
|
|
|
@@ -925,7 +962,7 @@ public:
|
|
|
925
962
|
}
|
|
926
963
|
|
|
927
964
|
canvas_native_context_fill(
|
|
928
|
-
ptr->GetContext(),
|
|
965
|
+
ptr->GetContext(), CanvasFillRuleNonZero);
|
|
929
966
|
ptr->UpdateInvalidateState();
|
|
930
967
|
}
|
|
931
968
|
|
|
@@ -986,7 +1023,7 @@ public:
|
|
|
986
1023
|
}
|
|
987
1024
|
|
|
988
1025
|
return canvas_native_context_is_point_in_path(
|
|
989
|
-
ptr->GetContext(), static_cast<float>(x), static_cast<float>(y),
|
|
1026
|
+
ptr->GetContext(), static_cast<float>(x), static_cast<float>(y), CanvasFillRuleNonZero);
|
|
990
1027
|
}
|
|
991
1028
|
|
|
992
1029
|
static bool
|
|
@@ -997,8 +1034,9 @@ public:
|
|
|
997
1034
|
return false;
|
|
998
1035
|
}
|
|
999
1036
|
|
|
1037
|
+
|
|
1000
1038
|
return canvas_native_context_is_point_in_path(
|
|
1001
|
-
ptr->GetContext(), static_cast<float>(x), static_cast<float>(y), rule);
|
|
1039
|
+
ptr->GetContext(), static_cast<float>(x), static_cast<float>(y), rule == 0 ? CanvasFillRuleNonZero : CanvasFillRuleEvenOdd);
|
|
1002
1040
|
}
|
|
1003
1041
|
|
|
1004
1042
|
static bool
|
|
@@ -1018,10 +1056,21 @@ public:
|
|
|
1018
1056
|
if (type == NativeType::Path2D) {
|
|
1019
1057
|
auto path = Path2D::GetPointer(path_obj);
|
|
1020
1058
|
|
|
1059
|
+
switch (rule) {
|
|
1060
|
+
case 0:
|
|
1021
1061
|
|
|
1022
|
-
|
|
1023
|
-
|
|
1024
|
-
|
|
1062
|
+
ret = canvas_native_context_is_point_in_path_with_path(
|
|
1063
|
+
ptr->GetContext(),
|
|
1064
|
+
path->GetPath(), (float)x, (float)y, CanvasFillRuleNonZero);
|
|
1065
|
+
break;
|
|
1066
|
+
case 1:
|
|
1067
|
+
|
|
1068
|
+
ret = canvas_native_context_is_point_in_path_with_path(
|
|
1069
|
+
ptr->GetContext(),
|
|
1070
|
+
path->GetPath(), (float)x, (float)y, CanvasFillRuleEvenOdd);
|
|
1071
|
+
break;
|
|
1072
|
+
default: break;
|
|
1073
|
+
}
|
|
1025
1074
|
|
|
1026
1075
|
}
|
|
1027
1076
|
return ret;
|
|
@@ -23,9 +23,9 @@ public:
|
|
|
23
23
|
}
|
|
24
24
|
|
|
25
25
|
~ImageDataBuffer() {
|
|
26
|
-
|
|
26
|
+
canvas_native_u8_buffer_release(slice_);
|
|
27
27
|
slice_ = nullptr;
|
|
28
|
-
|
|
28
|
+
canvas_native_image_data_release(imageData_);
|
|
29
29
|
imageData_ = nullptr;
|
|
30
30
|
}
|
|
31
31
|
|
|
@@ -181,8 +181,7 @@ ImageDataImpl::GetData(v8::Local<v8::Name> name,
|
|
|
181
181
|
if (ptr != nullptr) {
|
|
182
182
|
auto isolate = info.GetIsolate();
|
|
183
183
|
|
|
184
|
-
auto data = new ImageDataBuffer(
|
|
185
|
-
canvas_native_image_data_get_shared_instance(ptr->GetImageData()));
|
|
184
|
+
auto data = new ImageDataBuffer(ptr->GetImageData());
|
|
186
185
|
|
|
187
186
|
auto length = data->size();
|
|
188
187
|
auto store = v8::ArrayBuffer::NewBackingStore(data->data(), length,
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
class ImageDataImpl: ObjectWrapperImpl {
|
|
12
12
|
public:
|
|
13
|
-
ImageDataImpl(ImageData* imageData);
|
|
14
|
-
|
|
13
|
+
explicit ImageDataImpl(ImageData* imageData);
|
|
14
|
+
|
|
15
15
|
~ImageDataImpl(){
|
|
16
|
-
|
|
16
|
+
canvas_native_image_data_release(this->GetImageData());
|
|
17
17
|
this->imageData_ = nullptr;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -10,9 +10,9 @@
|
|
|
10
10
|
|
|
11
11
|
class MatrixImpl: public ObjectWrapperImpl {
|
|
12
12
|
public:
|
|
13
|
-
MatrixImpl(Matrix* matrix);
|
|
13
|
+
explicit MatrixImpl(Matrix* matrix);
|
|
14
14
|
~MatrixImpl(){
|
|
15
|
-
|
|
15
|
+
canvas_native_matrix_release(this->GetMatrix());
|
|
16
16
|
this->matrix_ = nullptr;
|
|
17
17
|
}
|
|
18
18
|
|
|
@@ -11,10 +11,10 @@
|
|
|
11
11
|
|
|
12
12
|
class Path2D : ObjectWrapperImpl {
|
|
13
13
|
public:
|
|
14
|
-
Path2D(Path *path);
|
|
14
|
+
explicit Path2D(Path *path);
|
|
15
15
|
|
|
16
16
|
~Path2D() {
|
|
17
|
-
|
|
17
|
+
canvas_native_path_release(this->GetPath());
|
|
18
18
|
this->path_ = nullptr;
|
|
19
19
|
}
|
|
20
20
|
|
|
@@ -10,10 +10,10 @@
|
|
|
10
10
|
|
|
11
11
|
class TextMetricsImpl: public ObjectWrapperImpl {
|
|
12
12
|
public:
|
|
13
|
-
TextMetricsImpl(TextMetrics* metrics);
|
|
14
|
-
|
|
13
|
+
explicit TextMetricsImpl(TextMetrics* metrics);
|
|
14
|
+
|
|
15
15
|
~TextMetricsImpl(){
|
|
16
|
-
|
|
16
|
+
canvas_native_text_metrics_release(this->GetTextMetrics());
|
|
17
17
|
this->metrics_ = nullptr;
|
|
18
18
|
}
|
|
19
19
|
|
|
@@ -719,7 +719,7 @@ v8::Local<v8::Value> WebGLRenderingContext::GetParameterInternal(v8::Isolate *is
|
|
|
719
719
|
[](void *data, size_t length,
|
|
720
720
|
void *deleter_data) {
|
|
721
721
|
if (deleter_data != nullptr) {
|
|
722
|
-
|
|
722
|
+
canvas_native_f32_buffer_release(
|
|
723
723
|
(F32Buffer *) deleter_data);
|
|
724
724
|
}
|
|
725
725
|
},
|
|
@@ -773,7 +773,7 @@ v8::Local<v8::Value> WebGLRenderingContext::GetParameterInternal(v8::Isolate *is
|
|
|
773
773
|
[](void *data, size_t length,
|
|
774
774
|
void *deleter_data) {
|
|
775
775
|
if (deleter_data != nullptr) {
|
|
776
|
-
|
|
776
|
+
canvas_native_i32_buffer_release(
|
|
777
777
|
(I32Buffer *) deleter_data);
|
|
778
778
|
}
|
|
779
779
|
},
|
|
@@ -2348,7 +2348,7 @@ void WebGLRenderingContext::GetAttachedShaders(const v8::FunctionCallbackInfo<v8
|
|
|
2348
2348
|
}
|
|
2349
2349
|
args.GetReturnValue().Set(array);
|
|
2350
2350
|
|
|
2351
|
-
|
|
2351
|
+
canvas_native_u32_buffer_release(info);
|
|
2352
2352
|
return;
|
|
2353
2353
|
}
|
|
2354
2354
|
}
|
|
@@ -3126,7 +3126,7 @@ WebGLRenderingContext::GetSupportedExtensions(const v8::FunctionCallbackInfo<v8:
|
|
|
3126
3126
|
|
|
3127
3127
|
args.GetReturnValue().Set(array);
|
|
3128
3128
|
|
|
3129
|
-
|
|
3129
|
+
canvas_native_string_buffer_release(exts);
|
|
3130
3130
|
}
|
|
3131
3131
|
|
|
3132
3132
|
void
|
|
@@ -3291,7 +3291,7 @@ WebGLRenderingContext::GetUniform(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3291
3291
|
void *deleter_data) {
|
|
3292
3292
|
if (deleter_data !=
|
|
3293
3293
|
nullptr) {
|
|
3294
|
-
|
|
3294
|
+
canvas_native_f32_buffer_release(
|
|
3295
3295
|
(F32Buffer *) deleter_data);
|
|
3296
3296
|
}
|
|
3297
3297
|
},
|
|
@@ -3322,7 +3322,7 @@ WebGLRenderingContext::GetUniform(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3322
3322
|
void *deleter_data) {
|
|
3323
3323
|
if (deleter_data !=
|
|
3324
3324
|
nullptr) {
|
|
3325
|
-
|
|
3325
|
+
canvas_native_i32_buffer_release(
|
|
3326
3326
|
(I32Buffer *) deleter_data);
|
|
3327
3327
|
}
|
|
3328
3328
|
},
|
|
@@ -3353,7 +3353,7 @@ WebGLRenderingContext::GetUniform(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
3353
3353
|
void *deleter_data) {
|
|
3354
3354
|
if (deleter_data !=
|
|
3355
3355
|
nullptr) {
|
|
3356
|
-
|
|
3356
|
+
canvas_native_u32_buffer_release(
|
|
3357
3357
|
(U32Buffer *) deleter_data);
|
|
3358
3358
|
}
|
|
3359
3359
|
},
|
|
@@ -3456,7 +3456,7 @@ WebGLRenderingContext::GetVertexAttrib(const v8::FunctionCallbackInfo<v8::Value>
|
|
|
3456
3456
|
[](void *data, size_t length,
|
|
3457
3457
|
void *deleter_data) {
|
|
3458
3458
|
if (deleter_data != nullptr) {
|
|
3459
|
-
|
|
3459
|
+
canvas_native_f32_buffer_release(
|
|
3460
3460
|
(F32Buffer *) deleter_data);
|
|
3461
3461
|
}
|
|
3462
3462
|
},
|