Skip to content

Commit b56436d

Browse files
authored
fix(šŸ): rename WebGPU view to not clash with standalone WebGPU module (#3795)
1 parent fd3fdee commit b56436d

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

ā€Žpackages/skia/android/src/main/java/com/shopify/reactnative/skia/WebGPUViewManager.javaā€Ž

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -5,24 +5,24 @@
55
import com.facebook.react.uimanager.annotations.ReactProp;
66
import com.facebook.react.views.view.ReactViewGroup;
77
import com.facebook.react.views.view.ReactViewManager;
8-
import com.facebook.react.viewmanagers.WebGPUViewManagerDelegate;
9-
import com.facebook.react.viewmanagers.WebGPUViewManagerInterface;
8+
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerDelegate;
9+
import com.facebook.react.viewmanagers.SkiaWebGPUViewManagerInterface;
1010

1111
import androidx.annotation.NonNull;
1212
import androidx.annotation.Nullable;
1313

1414
@ReactModule(name = WebGPUViewManager.NAME)
15-
public class WebGPUViewManager extends ReactViewManager implements WebGPUViewManagerInterface<WebGPUView> {
15+
public class WebGPUViewManager extends ReactViewManager implements SkiaWebGPUViewManagerInterface<WebGPUView> {
1616

17-
public static final String NAME = "WebGPUView";
17+
public static final String NAME = "SkiaWebGPUView";
1818

19-
protected WebGPUViewManagerDelegate mDelegate;
19+
protected SkiaWebGPUViewManagerDelegate mDelegate;
2020

2121
public WebGPUViewManager() {
22-
mDelegate = new WebGPUViewManagerDelegate(this);
22+
mDelegate = new SkiaWebGPUViewManagerDelegate(this);
2323
}
2424

25-
protected WebGPUViewManagerDelegate getDelegate() {
25+
protected SkiaWebGPUViewManagerDelegate getDelegate() {
2626
return mDelegate;
2727
}
2828

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
NS_ASSUME_NONNULL_BEGIN
1414

15-
@interface WebGPUView : RCTViewComponentView
15+
@interface SkiaWebGPUView : RCTViewComponentView
1616
@end
1717

1818
NS_ASSUME_NONNULL_END
Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#ifdef RCT_NEW_ARCH_ENABLED
22

3-
#import "WebGPUView.h"
3+
#import "SkiaWebGPUView.h"
44

55
#import <react/renderer/components/rnskia/ComponentDescriptors.h>
66
#import <react/renderer/components/rnskia/EventEmitters.h>
@@ -12,18 +12,18 @@
1212

1313
using namespace facebook::react;
1414

15-
@implementation WebGPUView
15+
@implementation SkiaWebGPUView
1616

1717
- (instancetype)initWithFrame:(CGRect)frame {
1818
if (self = [super initWithFrame:frame]) {
19-
static const auto defaultProps = std::make_shared<const WebGPUViewProps>();
19+
static const auto defaultProps = std::make_shared<const SkiaWebGPUViewProps>();
2020
_props = defaultProps;
2121
}
2222
return self;
2323
}
2424

2525
+ (ComponentDescriptorProvider)componentDescriptorProvider {
26-
return concreteComponentDescriptorProvider<WebGPUViewComponentDescriptor>();
26+
return concreteComponentDescriptorProvider<SkiaWebGPUViewComponentDescriptor>();
2727
}
2828

2929
- (void)prepareForRecycle {
@@ -46,9 +46,9 @@ - (WebGPUMetalView *)getContentView {
4646
- (void)updateProps:(const Props::Shared &)props
4747
oldProps:(const Props::Shared &)oldProps {
4848
const auto &oldViewProps =
49-
*std::static_pointer_cast<const WebGPUViewProps>(_props);
49+
*std::static_pointer_cast<const SkiaWebGPUViewProps>(_props);
5050
const auto &newViewProps =
51-
*std::static_pointer_cast<const WebGPUViewProps>(props);
51+
*std::static_pointer_cast<const SkiaWebGPUViewProps>(props);
5252

5353
if (newViewProps.contextId != oldViewProps.contextId) {
5454
/*
@@ -72,6 +72,6 @@ - (void)updateLayoutMetrics:(const LayoutMetrics &)layoutMetrics
7272

7373
@end
7474

75-
Class<RCTComponentViewProtocol> WebGPUViewCls(void) { return WebGPUView.class; }
75+
Class<RCTComponentViewProtocol> SkiaWebGPUViewCls(void) { return SkiaWebGPUView.class; }
7676

7777
#endif // RCT_NEW_ARCH_ENABLED

ā€Žpackages/skia/package.jsonā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@
148148
"ios": {
149149
"componentProvider": {
150150
"SkiaPictureView": "SkiaPictureView",
151-
"WebGPUView": "WebGPUView"
151+
"SkiaWebGPUView": "SkiaWebGPUView"
152152
}
153153
}
154154
},

ā€Žpackages/skia/src/specs/WebGPUViewNativeComponent.tsā€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ export interface NativeProps extends ViewProps {
88
}
99

1010
// eslint-disable-next-line import/no-default-export
11-
export default codegenNativeComponent<NativeProps>("WebGPUView");
11+
export default codegenNativeComponent<NativeProps>("SkiaWebGPUView");

0 commit comments

Comments
Ā (0)