Skip to content

Commit 678c29e

Browse files
authored
Update ApplePlatformContext.mm (#176)
1 parent 4a289a6 commit 678c29e

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

packages/webgpu/android/cpp/AndroidPlatformContext.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class AndroidPlatformContext : public PlatformContext {
3434

3535
wgpu::Surface makeSurface(wgpu::Instance instance, void *window, int width,
3636
int height) override {
37-
wgpu::SurfaceDescriptorFromAndroidNativeWindow androidSurfaceDesc;
37+
wgpu::SurfaceSourceAndroidNativeWindow androidSurfaceDesc;
3838
androidSurfaceDesc.window = reinterpret_cast<ANativeWindow *>(window);
3939
wgpu::SurfaceDescriptor surfaceDescriptor;
4040
surfaceDescriptor.nextInChain = &androidSurfaceDesc;

packages/webgpu/apple/ApplePlatformContext.mm

+3-3
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111

1212
namespace rnwgpu {
1313

14-
void isSimulatorWithAPIValidation() {
14+
void checkIfUsingSimulatorWithAPIValidation() {
1515
#if TARGET_OS_SIMULATOR
1616
NSDictionary *environment = [[NSProcessInfo processInfo] environment];
1717
NSString *metalDeviceWrapperType = environment[@"METAL_DEVICE_WRAPPER_TYPE"];
@@ -25,12 +25,12 @@ void isSimulatorWithAPIValidation() {
2525
#endif
2626
}
2727

28-
ApplePlatformContext::ApplePlatformContext() { isSimulatorWithAPIValidation(); }
28+
ApplePlatformContext::ApplePlatformContext() { checkIfUsingSimulatorWithAPIValidation(); }
2929

3030
wgpu::Surface ApplePlatformContext::makeSurface(wgpu::Instance instance,
3131
void *surface, int width,
3232
int height) {
33-
wgpu::SurfaceDescriptorFromMetalLayer metalSurfaceDesc;
33+
wgpu::SurfaceSourceMetalLayer metalSurfaceDesc;
3434
metalSurfaceDesc.layer = surface;
3535
wgpu::SurfaceDescriptor surfaceDescriptor;
3636
surfaceDescriptor.nextInChain = &metalSurfaceDesc;

0 commit comments

Comments
 (0)