diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm index 2578acaf9cca..b93b8a239920 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/Image/RCTImageComponentView.mm @@ -31,7 +31,8 @@ - (instancetype)initWithFrame:(CGRect)frame _props = defaultProps; _imageView = [RCTUIImageViewAnimated new]; - _imageView.clipsToBounds = YES; + // Note(Discord/Hanno): This should not be needed as the JS layer sets overflow:hidden! + // _imageView.clipsToBounds = YES; _imageView.contentMode = RCTContentModeFromImageResizeMode(defaultProps->resizeMode); _imageView.layer.minificationFilter = kCAFilterTrilinear; _imageView.layer.magnificationFilter = kCAFilterTrilinear; diff --git a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm index a99f103a33e6..131fcf6b359f 100644 --- a/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm +++ b/packages/react-native/React/Fabric/Mounting/ComponentViews/View/RCTViewComponentView.mm @@ -1078,13 +1078,17 @@ - (void)invalidateLayer for (UIView *subview in self.currentContainerView.subviews) { if ([subview isKindOfClass:[UIImageView class]]) { - RCTCornerInsets cornerInsets = RCTGetCornerInsets( - RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii), - RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths)); - - // If the subview is an image view, we have to apply the mask directly to the image view's layer, - // otherwise the image might overflow with the border radius. - subview.layer.mask = [self createMaskLayer:subview.bounds cornerInsets:cornerInsets]; + // Note(Discord/Hanno): The parent already applies the mask/clipping so this should be unnecessary. + // It has shown to cause CPU spikes + rendering hitches as this starts to cause offscreen draw passes in the render server. + // + // RCTCornerInsets cornerInsets = RCTGetCornerInsets( + // RCTCornerRadiiFromBorderRadii(borderMetrics.borderRadii), + // RCTUIEdgeInsetsFromEdgeInsets(borderMetrics.borderWidths)); + + // // If the subview is an image view, we have to apply the mask directly to the image view's layer, + // // otherwise the image might overflow with the border radius. + // subview.layer.mask = [self createMaskLayer:subview.bounds cornerInsets:cornerInsets]; + subview.layer.mask = nil; } } } else if (