@nativescript/canvas 2.0.0-webgpu.4 → 2.0.0-webgpu.6
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/Dom/Group.d.ts +1 -2
- package/Dom/Group.js.map +1 -1
- package/WebGPU/GPUAdapter.d.ts +1 -1
- package/WebGPU/GPUAdapter.js.map +1 -1
- package/WebGPU/GPUDevice.d.ts +2 -2
- package/WebGPU/GPUDevice.js +4 -2
- package/WebGPU/GPUDevice.js.map +1 -1
- package/package.json +1 -1
- 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/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.swiftdoc +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64/CanvasNative.framework/NSCCanvas.nib +0 -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 +110 -110
- 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/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.swiftdoc +0 -0
- 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/NSCCanvas.nib +0 -0
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/CanvasNative.framework/_CodeSignature/CodeResources +1 -1
- 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 +579 -579
- package/platforms/ios/CanvasNative.xcframework/ios-arm64_x86_64-simulator/dSYMs/CanvasNative.framework.dSYM/Contents/Resources/Relocations/x86_64/CanvasNative.yml +558 -558
- package/platforms/ios/src/cpp/webgpu/GPUAdapterImpl.cpp +17 -14
- package/platforms/ios/src/cpp/webgpu/GPUDeviceImpl.cpp +3 -3
|
@@ -61,7 +61,6 @@ v8::Local<v8::FunctionTemplate> GPUAdapterImpl::GetCtor(v8::Isolate *isolate) {
|
|
|
61
61
|
GetLimits
|
|
62
62
|
);
|
|
63
63
|
|
|
64
|
-
|
|
65
64
|
tmpl->Set(
|
|
66
65
|
ConvertToV8String(isolate, "requestAdapterInfo"),
|
|
67
66
|
v8::FunctionTemplate::New(isolate, &RequestAdapterInfo));
|
|
@@ -90,19 +89,19 @@ GPUAdapterImpl::GetFeatures(v8::Local<v8::Name> name,
|
|
|
90
89
|
|
|
91
90
|
auto len = canvas_native_string_buffer_get_length(features);
|
|
92
91
|
|
|
93
|
-
auto
|
|
92
|
+
auto set = v8::Set::New(isolate);
|
|
94
93
|
for (int i = 0; i < len; ++i) {
|
|
95
94
|
auto item = canvas_native_string_buffer_get_value_at(features, i);
|
|
96
95
|
if (item != nullptr) {
|
|
97
|
-
auto keyValue =
|
|
98
|
-
|
|
96
|
+
auto keyValue = ConvertToV8String(isolate, (char *) item);
|
|
97
|
+
set->Add(context, keyValue);
|
|
99
98
|
canvas_native_string_destroy(item);
|
|
100
99
|
}
|
|
101
100
|
|
|
102
101
|
}
|
|
103
102
|
canvas_native_string_buffer_release(features);
|
|
104
103
|
|
|
105
|
-
info.GetReturnValue().Set(
|
|
104
|
+
info.GetReturnValue().Set(set);
|
|
106
105
|
|
|
107
106
|
return;
|
|
108
107
|
}
|
|
@@ -162,11 +161,14 @@ struct RequestData {
|
|
|
162
161
|
char *error_;
|
|
163
162
|
const CanvasGPUDevice *device_;
|
|
164
163
|
char **required_features_data_;
|
|
164
|
+
size_t required_features_data_size;
|
|
165
165
|
|
|
166
166
|
~RequestData() {
|
|
167
167
|
if (required_features_data_ != nullptr) {
|
|
168
|
-
|
|
169
|
-
|
|
168
|
+
for (size_t i = 0; i < required_features_data_size; ++i) {
|
|
169
|
+
delete[] required_features_data_[i];
|
|
170
|
+
}
|
|
171
|
+
delete[] required_features_data_;
|
|
170
172
|
}
|
|
171
173
|
|
|
172
174
|
if (error_ != nullptr) {
|
|
@@ -212,11 +214,9 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
212
214
|
&requiredFeaturesValue);
|
|
213
215
|
|
|
214
216
|
|
|
215
|
-
if (!requiredFeaturesValue.IsEmpty() && requiredFeaturesValue->
|
|
216
|
-
v8::Local<v8::
|
|
217
|
-
v8::Local<v8::Array> requiredFeatures = requiredFeaturesSet->AsArray();
|
|
217
|
+
if (!requiredFeaturesValue.IsEmpty() && requiredFeaturesValue->IsArray()) {
|
|
218
|
+
v8::Local<v8::Array> requiredFeatures = requiredFeaturesValue.As<v8::Array>();
|
|
218
219
|
auto len = requiredFeatures->Length();
|
|
219
|
-
|
|
220
220
|
for (int i = 0; i < len; i++) {
|
|
221
221
|
auto item = requiredFeatures->Get(context, i);
|
|
222
222
|
if (!item.IsEmpty()) {
|
|
@@ -245,10 +245,12 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
245
245
|
size_t required_features_data_length = required_features_buf.size();
|
|
246
246
|
|
|
247
247
|
if (required_features_data_length > 0) {
|
|
248
|
-
required_features_data = new char *[required_features_data_length
|
|
248
|
+
required_features_data = new char *[required_features_data_length];
|
|
249
249
|
|
|
250
250
|
for (size_t i = 0; i < required_features_data_length; ++i) {
|
|
251
|
-
|
|
251
|
+
required_features_data[i] = new char[required_features_buf[i].size() + 1];
|
|
252
|
+
auto src = required_features_buf[i].c_str();
|
|
253
|
+
std::strcpy(required_features_data[i], src);
|
|
252
254
|
}
|
|
253
255
|
}
|
|
254
256
|
|
|
@@ -330,7 +332,8 @@ void GPUAdapterImpl::RequestDevice(const v8::FunctionCallbackInfo<v8::Value> &ar
|
|
|
330
332
|
inner->data = new RequestData{
|
|
331
333
|
nullptr,
|
|
332
334
|
nullptr,
|
|
333
|
-
required_features_data
|
|
335
|
+
required_features_data,
|
|
336
|
+
required_features_data_length
|
|
334
337
|
};
|
|
335
338
|
}
|
|
336
339
|
|
|
@@ -244,19 +244,19 @@ GPUDeviceImpl::GetFeatures(v8::Local<v8::Name> name,
|
|
|
244
244
|
|
|
245
245
|
auto len = canvas_native_string_buffer_get_length(features);
|
|
246
246
|
|
|
247
|
-
auto
|
|
247
|
+
auto set = v8::Set::New(isolate);
|
|
248
248
|
for (int i = 0; i < len; ++i) {
|
|
249
249
|
auto item = canvas_native_string_buffer_get_value_at(features, i);
|
|
250
250
|
if (item != nullptr) {
|
|
251
251
|
auto keyValue = ConvertToV8String(isolate, (char *) item);
|
|
252
|
-
|
|
252
|
+
set->Add(context, keyValue);
|
|
253
253
|
canvas_native_string_destroy(item);
|
|
254
254
|
}
|
|
255
255
|
|
|
256
256
|
}
|
|
257
257
|
canvas_native_string_buffer_release(features);
|
|
258
258
|
|
|
259
|
-
info.GetReturnValue().Set(
|
|
259
|
+
info.GetReturnValue().Set(set);
|
|
260
260
|
|
|
261
261
|
return;
|
|
262
262
|
}
|