mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-10 22:45:24 +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);
|
||||
[image drawAtPoint:CGPointZero];
|
||||
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
|
||||
UIGraphicsGetCurrentContext();
|
||||
UIGraphicsEndImageContext();
|
||||
return result;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user