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:
Wenjing Wang 2016-01-28 14:24:01 -08:00 committed by facebook-github-bot-9
parent 4a226fc1af
commit b55dcbe0af
1 changed files with 1 additions and 1 deletions

View File

@ -321,7 +321,7 @@ UIImage *__nullable RCTTransformImage(UIImage *image,
CGContextConcatCTM(currentContext, transform);
[image drawAtPoint:CGPointZero];
UIImage *result = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsGetCurrentContext();
UIGraphicsEndImageContext();
return result;
}