@nativescript/canvas 2.0.0-webgpu.10 → 2.0.0-webgpu.12
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 -1
- package/Canvas/common.js +10 -0
- package/Canvas/common.js.map +1 -1
- package/Canvas/index.android.js +7 -7
- package/Canvas/index.android.js.map +1 -1
- package/Canvas/index.d.ts +11 -3
- package/Canvas/index.ios.js +14 -3
- package/Canvas/index.ios.js.map +1 -1
- package/ImageAsset/index.js +39 -17
- package/ImageAsset/index.js.map +1 -1
- package/ImageBitmap/index.js +18 -21
- package/ImageBitmap/index.js.map +1 -1
- package/WebGL/WebGLRenderingContext/index.js +74 -31
- package/WebGL/WebGLRenderingContext/index.js.map +1 -1
- package/WebGL2/WebGL2RenderingContext/index.js +4 -4
- package/WebGL2/WebGL2RenderingContext/index.js.map +1 -1
- package/WebGPU/GPU.js +4 -3
- package/WebGPU/GPU.js.map +1 -1
- package/WebGPU/GPUAdapter.d.ts +3 -2
- package/WebGPU/GPUAdapter.js +6 -0
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUCanvasContext.d.ts +1 -0
- package/WebGPU/GPUCanvasContext.js +17 -0
- package/WebGPU/GPUCanvasContext.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +3 -3
- package/WebGPU/GPUDevice.js +77 -15
- package/WebGPU/GPUDevice.js.map +1 -1
- package/WebGPU/GPUQueue.js +8 -0
- package/WebGPU/GPUQueue.js.map +1 -1
- package/WebGPU/GPURenderBundleEncoder.d.ts +3 -2
- package/WebGPU/GPURenderBundleEncoder.js +4 -3
- package/WebGPU/GPURenderBundleEncoder.js.map +1 -1
- package/angular/esm2022/index.mjs +4 -4
- package/angular/fesm2022/nativescript-canvas-angular.mjs +4 -4
- package/package.json +1 -1
- package/platforms/android/canvas-release.aar +0 -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 +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_ios.h +7 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Headers/canvas_native.h +170 -55
- 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 +67 -20
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios.swiftinterface +1 -0
- 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 +647 -645
- 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 +2 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_ios.h +7 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Headers/canvas_native.h +170 -55
- 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 +67 -20
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/arm64-apple-ios-simulator.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.abi.json +67 -20
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.private.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/Modules/CanvasNative.swiftmodule/x86_64-apple-ios-simulator.swiftinterface +1 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +26 -26
- 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 +649 -647
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +687 -685
- package/platforms/ios/src/NSOperationQueueWrapper.h +1 -1
- package/platforms/ios/src/NSOperationQueueWrapper.mm +41 -9
- package/platforms/ios/src/cpp/AsyncCallback.h +16 -8
- package/platforms/ios/src/cpp/CanvasJSIModule.cpp +116 -44
- package/platforms/ios/src/cpp/ImageAssetImpl.cpp +16 -24
- package/platforms/ios/src/cpp/ImageAssetImpl.h +3 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.cpp +22 -3
- package/platforms/ios/src/cpp/ImageBitmapImpl.h +6 -3
- package/platforms/ios/src/cpp/PromiseCallback.h +1 -2
- package/platforms/ios/src/cpp/canvas2d/CanvasRenderingContext2DImpl.h +3 -3
- package/platforms/ios/src/cpp/webgl/WebGLRenderingContext.cpp +106 -1
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +7 -6
- package/platforms/ios/src/cpp/webgpu/GPUCommandEncoderImpl.cpp +437 -439
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +35 -55
- package/platforms/ios/src/cpp/webgpu/GPUImpl.cpp +2 -1
- package/platforms/ios/src/cpp/webgpu/GPULabel.h +33 -0
- package/platforms/ios/src/cpp/webgpu/GPUQueueImpl.cpp +23 -9
- package/platforms/ios/src/cpp/webgpu/GPURenderBundleEncoderImpl.cpp +12 -9
- package/platforms/ios/src/cpp/webgpu/GPURenderPassEncoderImpl.cpp +1 -1
|
@@ -19,11 +19,11 @@
|
|
|
19
19
|
class ImageAssetImpl : ObjectWrapperImpl {
|
|
20
20
|
public:
|
|
21
21
|
|
|
22
|
-
explicit ImageAssetImpl(ImageAsset *asset);
|
|
22
|
+
explicit ImageAssetImpl(const ImageAsset *asset);
|
|
23
23
|
|
|
24
24
|
~ImageAssetImpl();
|
|
25
25
|
|
|
26
|
-
ImageAsset *GetImageAsset();
|
|
26
|
+
const ImageAsset *GetImageAsset();
|
|
27
27
|
|
|
28
28
|
static void Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate);
|
|
29
29
|
|
|
@@ -67,5 +67,5 @@ public:
|
|
|
67
67
|
|
|
68
68
|
|
|
69
69
|
private:
|
|
70
|
-
ImageAsset *asset_;
|
|
70
|
+
const ImageAsset *asset_;
|
|
71
71
|
};
|
|
@@ -5,10 +5,10 @@
|
|
|
5
5
|
#include "ImageBitmapImpl.h"
|
|
6
6
|
#include "Caches.h"
|
|
7
7
|
|
|
8
|
-
ImageBitmapImpl::ImageBitmapImpl(ImageAsset*
|
|
8
|
+
ImageBitmapImpl::ImageBitmapImpl(const ImageAsset *asset)
|
|
9
9
|
: bitmap_(asset) {}
|
|
10
10
|
|
|
11
|
-
ImageBitmapImpl::~ImageBitmapImpl(){
|
|
11
|
+
ImageBitmapImpl::~ImageBitmapImpl() {
|
|
12
12
|
canvas_native_image_asset_release(bitmap_);
|
|
13
13
|
this->bitmap_ = nullptr;
|
|
14
14
|
}
|
|
@@ -56,6 +56,9 @@ v8::Local<v8::FunctionTemplate> ImageBitmapImpl::GetCtor(v8::Isolate *isolate) {
|
|
|
56
56
|
tmpl->Set(
|
|
57
57
|
ConvertToV8String(isolate, "close"), v8::FunctionTemplate::New(isolate, Close));
|
|
58
58
|
|
|
59
|
+
tmpl->SetAccessor(
|
|
60
|
+
ConvertToV8String(isolate, "__addr"),
|
|
61
|
+
GetAddr);
|
|
59
62
|
|
|
60
63
|
cache->ImageBitmapTmpl =
|
|
61
64
|
std::make_unique<v8::Persistent<v8::FunctionTemplate>>(isolate, ctorTmpl);
|
|
@@ -93,6 +96,8 @@ void ImageBitmapImpl::Close(const v8::FunctionCallbackInfo<v8::Value> &args) {
|
|
|
93
96
|
return;
|
|
94
97
|
}
|
|
95
98
|
|
|
99
|
+
canvas_native_image_asset_close(ptr->GetImageAsset());
|
|
100
|
+
|
|
96
101
|
ptr->closed_ = true;
|
|
97
102
|
}
|
|
98
103
|
|
|
@@ -184,6 +189,20 @@ ImageBitmapImpl::HandleOptions(v8::Isolate *isolate, const v8::Local<v8::Value>
|
|
|
184
189
|
return ret;
|
|
185
190
|
}
|
|
186
191
|
|
|
187
|
-
|
|
192
|
+
|
|
193
|
+
void
|
|
194
|
+
ImageBitmapImpl::GetAddr(v8::Local<v8::String> name,
|
|
195
|
+
const v8::PropertyCallbackInfo<v8::Value> &info) {
|
|
196
|
+
auto ptr = GetPointer(info.This());
|
|
197
|
+
if (ptr != nullptr) {
|
|
198
|
+
auto isolate = info.GetIsolate();
|
|
199
|
+
auto ret = std::to_string(canvas_native_image_asset_get_addr(ptr->GetImageAsset()));
|
|
200
|
+
info.GetReturnValue().Set(ConvertToV8String(isolate, ret));
|
|
201
|
+
return;
|
|
202
|
+
}
|
|
203
|
+
info.GetReturnValue().SetEmptyString();
|
|
204
|
+
}
|
|
205
|
+
|
|
206
|
+
const ImageAsset *ImageBitmapImpl::GetImageAsset() {
|
|
188
207
|
return this->bitmap_;
|
|
189
208
|
}
|
|
@@ -21,7 +21,7 @@ struct Options {
|
|
|
21
21
|
|
|
22
22
|
class ImageBitmapImpl : public ObjectWrapperImpl {
|
|
23
23
|
public:
|
|
24
|
-
explicit ImageBitmapImpl(ImageAsset *asset);
|
|
24
|
+
explicit ImageBitmapImpl(const ImageAsset *asset);
|
|
25
25
|
|
|
26
26
|
~ImageBitmapImpl();
|
|
27
27
|
|
|
@@ -46,7 +46,7 @@ public:
|
|
|
46
46
|
|
|
47
47
|
static Options HandleOptions(v8::Isolate *isolate, const v8::Local<v8::Value> &options);
|
|
48
48
|
|
|
49
|
-
ImageAsset *GetImageAsset();
|
|
49
|
+
const ImageAsset *GetImageAsset();
|
|
50
50
|
|
|
51
51
|
static void Init(v8::Local<v8::Object> canvasModule, v8::Isolate *isolate);
|
|
52
52
|
|
|
@@ -60,9 +60,12 @@ public:
|
|
|
60
60
|
static void GetHeight(v8::Local<v8::String> name,
|
|
61
61
|
const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
62
62
|
|
|
63
|
+
static void GetAddr(v8::Local<v8::String> name,
|
|
64
|
+
const v8::PropertyCallbackInfo<v8::Value> &info);
|
|
65
|
+
|
|
63
66
|
static void Close(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
64
67
|
|
|
65
68
|
private:
|
|
66
|
-
ImageAsset *bitmap_;
|
|
69
|
+
const ImageAsset *bitmap_;
|
|
67
70
|
bool closed_ = false;
|
|
68
71
|
};
|
|
@@ -163,7 +163,7 @@ struct PromiseCallback {
|
|
|
163
163
|
auto data = new PromiseCallback(this->inner_);
|
|
164
164
|
ALooper_addFd(looper,
|
|
165
165
|
fd,
|
|
166
|
-
|
|
166
|
+
0,
|
|
167
167
|
ALOOPER_EVENT_INPUT,
|
|
168
168
|
[](int fd, int events,
|
|
169
169
|
void *data) {
|
|
@@ -175,7 +175,6 @@ struct PromiseCallback {
|
|
|
175
175
|
return 0;
|
|
176
176
|
}, (void *) data);
|
|
177
177
|
|
|
178
|
-
ALooper_wake(looper);
|
|
179
178
|
inner->isPrepared_ = true;
|
|
180
179
|
}
|
|
181
180
|
|
|
@@ -636,7 +636,7 @@ public:
|
|
|
636
636
|
static void DrawImage(const v8::FunctionCallbackInfo<v8::Value> &args);
|
|
637
637
|
|
|
638
638
|
static void
|
|
639
|
-
DrawImageDxDyAssetImpl(CanvasRenderingContext2DImpl *ptr, ImageAsset *asset, double dx,
|
|
639
|
+
DrawImageDxDyAssetImpl(CanvasRenderingContext2DImpl *ptr, const ImageAsset *asset, double dx,
|
|
640
640
|
double dy) {
|
|
641
641
|
if (asset != nullptr) {
|
|
642
642
|
canvas_native_context_draw_image_dx_dy_asset(
|
|
@@ -690,7 +690,7 @@ public:
|
|
|
690
690
|
}
|
|
691
691
|
}
|
|
692
692
|
|
|
693
|
-
static void DrawImageDxDyDwDhAssetImpl(CanvasRenderingContext2DImpl *ptr, ImageAsset *asset,
|
|
693
|
+
static void DrawImageDxDyDwDhAssetImpl(CanvasRenderingContext2DImpl *ptr, const ImageAsset *asset,
|
|
694
694
|
double dx, double dy, double dw, double dh) {
|
|
695
695
|
|
|
696
696
|
|
|
@@ -783,7 +783,7 @@ public:
|
|
|
783
783
|
|
|
784
784
|
static void
|
|
785
785
|
DrawImageAssetImpl(CanvasRenderingContext2DImpl *ptr,
|
|
786
|
-
ImageAsset *asset, double sx,
|
|
786
|
+
const ImageAsset *asset, double sx,
|
|
787
787
|
double sy, double sw, double sh, double dx, double dy, double dw,
|
|
788
788
|
double dh) {
|
|
789
789
|
|
|
@@ -4350,8 +4350,113 @@ WebGLRenderingContext::TexImage2D(const v8::FunctionCallbackInfo<v8::Value> &arg
|
|
|
4350
4350
|
ptr->GetState()
|
|
4351
4351
|
);
|
|
4352
4352
|
return;
|
|
4353
|
-
}
|
|
4353
|
+
} else {
|
|
4354
|
+
auto objectType = GetNativeType(value);
|
|
4355
|
+
|
|
4356
|
+
switch (objectType) {
|
|
4357
|
+
case NativeType::ImageAsset: {
|
|
4358
|
+
auto image_asset = ImageAssetImpl::GetPointer(value.As<v8::Object>());
|
|
4359
|
+
|
|
4360
|
+
if (image_asset !=
|
|
4361
|
+
nullptr) {
|
|
4362
|
+
|
|
4363
|
+
canvas_native_webgl2_tex_image2d_image_asset(
|
|
4364
|
+
target,
|
|
4365
|
+
level,
|
|
4366
|
+
internalformat,
|
|
4367
|
+
width,
|
|
4368
|
+
height,
|
|
4369
|
+
border,
|
|
4370
|
+
format,
|
|
4371
|
+
type,
|
|
4372
|
+
image_asset->GetImageAsset(),
|
|
4373
|
+
ptr->GetState()
|
|
4374
|
+
);
|
|
4375
|
+
}
|
|
4376
|
+
return;
|
|
4377
|
+
}
|
|
4378
|
+
case NativeType::ImageBitmap: {
|
|
4379
|
+
auto image_bitmap = ImageBitmapImpl::GetPointer(value.As<v8::Object>());
|
|
4380
|
+
|
|
4381
|
+
if (image_bitmap !=
|
|
4382
|
+
nullptr) {
|
|
4383
|
+
canvas_native_webgl2_tex_image2d_image_asset(
|
|
4384
|
+
target,
|
|
4385
|
+
level,
|
|
4386
|
+
internalformat,
|
|
4387
|
+
width,
|
|
4388
|
+
height,
|
|
4389
|
+
border,
|
|
4390
|
+
format,
|
|
4391
|
+
type,
|
|
4392
|
+
image_bitmap->GetImageAsset(),
|
|
4393
|
+
ptr->GetState()
|
|
4394
|
+
);
|
|
4395
|
+
}
|
|
4396
|
+
return;
|
|
4397
|
+
}
|
|
4398
|
+
case NativeType::CanvasRenderingContext2D: {
|
|
4399
|
+
auto canvas_2d = CanvasRenderingContext2DImpl::GetPointer(
|
|
4400
|
+
value.As<v8::Object>());
|
|
4401
|
+
|
|
4402
|
+
if (canvas_2d != nullptr) {
|
|
4403
|
+
canvas_native_webgl2_tex_image2d_canvas2d(
|
|
4404
|
+
target,
|
|
4405
|
+
level,
|
|
4406
|
+
internalformat,
|
|
4407
|
+
width,
|
|
4408
|
+
height,
|
|
4409
|
+
border,
|
|
4410
|
+
format,
|
|
4411
|
+
type,
|
|
4412
|
+
canvas_2d->GetContext(),
|
|
4413
|
+
ptr->GetState()
|
|
4414
|
+
);
|
|
4415
|
+
}
|
|
4416
|
+
|
|
4417
|
+
return;
|
|
4418
|
+
}
|
|
4419
|
+
case NativeType::WebGLRenderingContextBase: {
|
|
4420
|
+
auto gl = WebGLRenderingContext::GetPointer(value.As<v8::Object>());
|
|
4421
|
+
|
|
4422
|
+
if (gl != nullptr) {
|
|
4423
|
+
canvas_native_webgl2_tex_image2d_webgl(
|
|
4424
|
+
target,
|
|
4425
|
+
level,
|
|
4426
|
+
internalformat,
|
|
4427
|
+
width,
|
|
4428
|
+
height,
|
|
4429
|
+
border,
|
|
4430
|
+
format,
|
|
4431
|
+
type,
|
|
4432
|
+
gl->GetState(),
|
|
4433
|
+
ptr->GetState()
|
|
4434
|
+
);
|
|
4435
|
+
}
|
|
4436
|
+
return;
|
|
4437
|
+
}
|
|
4438
|
+
case NativeType::ImageData: {
|
|
4439
|
+
auto image_data = ImageDataImpl::GetPointer(value.As<v8::Object>());
|
|
4440
|
+
if (image_data != nullptr) {
|
|
4441
|
+
canvas_native_webgl2_tex_image2d_image_data(
|
|
4442
|
+
target,
|
|
4443
|
+
level,
|
|
4444
|
+
internalformat,
|
|
4445
|
+
width,
|
|
4446
|
+
height,
|
|
4447
|
+
border,
|
|
4448
|
+
format,
|
|
4449
|
+
type,
|
|
4450
|
+
image_data->GetImageData(),
|
|
4451
|
+
ptr->GetState()
|
|
4452
|
+
);
|
|
4453
|
+
}
|
|
4354
4454
|
|
|
4455
|
+
}
|
|
4456
|
+
default:
|
|
4457
|
+
break;
|
|
4458
|
+
}
|
|
4459
|
+
}
|
|
4355
4460
|
}
|
|
4356
4461
|
}
|
|
4357
4462
|
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
#include "GPUAdapterImpl.h"
|
|
6
6
|
#include "Caches.h"
|
|
7
|
-
|
|
7
|
+
#include "GPULabel.h"
|
|
8
8
|
GPUAdapterImpl::GPUAdapterImpl(const CanvasGPUAdapter *adapter) : adapter_(adapter) {}
|
|
9
9
|
|
|
10
10
|
const CanvasGPUAdapter *GPUAdapterImpl::GetGPUAdapter() {
|
|
@@ -192,7 +192,7 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
192
192
|
|
|
193
193
|
auto func = cb.As<v8::Function>();
|
|
194
194
|
|
|
195
|
-
|
|
195
|
+
GPULabel label;
|
|
196
196
|
|
|
197
197
|
std::vector<std::string> required_features_buf;
|
|
198
198
|
|
|
@@ -203,10 +203,9 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
203
203
|
v8::Local<v8::Value> labelValue;
|
|
204
204
|
options->Get(context, ConvertToV8String(isolate, "label")).ToLocal(
|
|
205
205
|
&labelValue);
|
|
206
|
+
|
|
207
|
+
label = GPULabel(isolate, labelValue);
|
|
206
208
|
|
|
207
|
-
if (!labelValue.IsEmpty() && labelValue->IsString()) {
|
|
208
|
-
label = ConvertFromV8String(isolate, labelValue);
|
|
209
|
-
}
|
|
210
209
|
|
|
211
210
|
v8::Local<v8::Value> requiredFeaturesValue;
|
|
212
211
|
|
|
@@ -299,6 +298,8 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
299
298
|
callback->Call(context, context->Global(),
|
|
300
299
|
1,
|
|
301
300
|
args); // ignore JS return value
|
|
301
|
+
|
|
302
|
+
|
|
302
303
|
} else {
|
|
303
304
|
|
|
304
305
|
auto impl = new GPUDeviceImpl(requestData->device_);
|
|
@@ -339,7 +340,7 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
339
340
|
callback->prepare();
|
|
340
341
|
|
|
341
342
|
canvas_native_webgpu_adapter_request_device(ptr->GetGPUAdapter(),
|
|
342
|
-
label
|
|
343
|
+
*label,
|
|
343
344
|
required_features_data,
|
|
344
345
|
required_features_data_length,
|
|
345
346
|
limits,
|