mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-04-29 12:45:37 +08:00
Fix CPU spike: should use UIGraphicsEndImageContext rather than UIGraphicsGetCurrentContext
Summary: should use UIGraphicsEndImageContext rather than UIGraphicsGetCurrentContext public Reviewed By: nicklockwood, chaceliang Differential Revision: D2875657 fb-gh-sync-id: 0fa059e2da3d0bb1ffe5fe50a1bdaeddafc2bbfa
This commit is contained in:
committed by
facebook-github-bot-9
parent
4a226fc1af
commit
b55dcbe0af
@@ -321,7 +321,7 @@ UIImage *__nullable RCTTransformImage(UIImage *image,
|
|||||||
CGContextConcatCTM(currentContext, transform);
|
CGContextConcatCTM(currentContext, transform);
|
||||||
[image drawAtPoint:CGPointZero];
|
[image drawAtPoint:CGPointZero];
|
||||||
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
|
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
|
||||||
UIGraphicsGetCurrentContext();
|
UIGraphicsEndImageContext();
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user