Pushing a CGContext with UIGraphicsPushContext takes significantly longer on iPhone 7
Originator: | jsteudle82 | ||
Number: | rdar://43678470 | Date Originated: | 24.08.2018 |
Status: | Open | Resolved: | |
Product: | iOS + SDK | Product Version: | iOS 12.0 (16A5364a) |
Classification: | Performance | Reproducible: | Always |
Area: Core Graphics Summary: Pushing a CGContext with UIGraphicsPushContext takes significantly longer on an iPhone 7 than on an iPhone 6 with iOS 12 beta 9 and beta 10 compared to iOS 11.x. This leads to a heavy performance drop when capturing the screen. Steps to Reproduce: 1. Scenario - Create a CGContext with data - Measure the time needed to push the context with UIGraphicsPushContext 2. Scenario - Use UIGraphicsImageRenderer to create the context - Measure the time needed Expected Results: The time measured on the iPhone 6 is the same than on the iPhone 7 (or even slower). Actual Results: The time measured on the iPhone 6 is significantly shorter than on the iPhone 7. iPhone 6: Execution time: 0.02751600742340088 iPhone 7: Execution time: 0.10976803302764893 Also when creating the context with UIGraphicsImageRenderer, the following output appears since iOS 12: 2018-08-24 10:33:05.502383+0200 RenderTest[337:10426] [Unknown process name] CGImageCreate: invalid image alphaInfo: kCGImageAlphaNone. It should be kCGImageAlphaNoneSkipLast Version/Build: iOS 12.0 (16A5364a) Configuration: iPhone 6, iPhone 7, iOS 12 beta 9 and beta 10
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!
I got the same problem with the UIGraphicsImageRenderer, the app still works, but the line [Unknown process name] CGImageCreate: invalid image alphaInfo: kCGImageAlphaNone. It should be kCGImageAlphaNoneSkipLast is shown all the time. I've tried to change it to kCGImageAlphaNoneSkipLast but the app crashes...