Skip to content

Instantly share code, notes, and snippets.

View zhongwuzw's full-sized avatar
👨‍💻
Thinking! Learning!

Wu Zhong zhongwuzw

👨‍💻
Thinking! Learning!
View GitHub Profile
@zhongwuzw
zhongwuzw / Overview.md
Created April 19, 2019 06:55 — forked from NSProgrammer/Overview.md
Comparing modern vs legacy graphics context rendering on iOS(AS begin to adopt render)

legacy = UIGraphicsBeginImageContextWithOptions + UIGraphicsEndImageContext

modern = UIGraphicsImageRendererFormat + UIGraphicsImageRenderer

Take aways:

  • "modern" w/ prefersExtendedRange = NO
    • basically the same perf as "legacy"
    • probably a good idea to adopt since optimizations will likely be in "modern" first
  • "modern" w/ prefersExtendedRange = YES