File tree Expand file tree Collapse file tree
packages/react-native/React/Fabric/Mounting/ComponentViews/View Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1561,10 +1561,8 @@ - (CAShapeLayer *)createMaskLayer:(CGRect)bounds cornerInsets:(RCTCornerInsets)c
15611561// so the mask does not snap to the final size while the layer is still animating (e.g. during rotation).
15621562- (void )setMaskLayer:(CAShapeLayer *)maskLayer path:(CGPathRef)path followingBoundsAnimationOfLayer:(CALayer *)layer
15631563{
1564- CGPathRef previousPath = maskLayer.path != NULL ? CGPathRetain (maskLayer.path ) : NULL ;
1565- maskLayer.path = path;
1566-
15671564 CAAnimation *boundsAnimation = [layer animationForKey: @" bounds.size" ];
1565+ CGPathRef previousPath = maskLayer.path ;
15681566 if (previousPath != NULL && [boundsAnimation respondsToSelector: @selector (setFromValue: )] &&
15691567 !CGPathEqualToPath (previousPath, path)) {
15701568 CABasicAnimation *pathAnimation = [(CABasicAnimation *)boundsAnimation copy ];
@@ -1574,10 +1572,7 @@ - (void)setMaskLayer:(CAShapeLayer *)maskLayer path:(CGPathRef)path followingBou
15741572 pathAnimation.additive = NO ;
15751573 [maskLayer addAnimation: pathAnimation forKey: @" path" ];
15761574 }
1577-
1578- if (previousPath != NULL ) {
1579- CGPathRelease (previousPath);
1580- }
1575+ maskLayer.path = path;
15811576}
15821577
15831578- (void )clearExistingBackgroundImageLayers
You can’t perform that action at this time.
0 commit comments