Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Slow Frames & ProMotion #93

Open
jjnino opened this issue Sep 2, 2022 · 0 comments
Open

Slow Frames & ProMotion #93

jjnino opened this issue Sep 2, 2022 · 0 comments

Comments

@jjnino
Copy link

jjnino commented Sep 2, 2022

Hello! I had a question / concern regarding how the slow frames working with ProMotion displays like the ones in the iPhone 13. According to:
https://developer.apple.com/documentation/quartzcore/optimizing_promotion_refresh_rates_for_iphone_13_pro_and_ipad_pro
the device can variably update its refresh rate from 10Hz - 120Hz which means sometimes screen renders are happening at 100ms intervals. It would seem that the slow renders functionality would produce false positives? It also seems like you can get the expected refresh timing by leveraging the targetTimestamp. It kind of explains that in the link above and also here:

The code listing below shows how to calculate the actual frame rate by dividing 1 by your display link's timestamp subtracted from its targetTimestamp.

// Calculate the actual frame rate.
let actualFramesPerSecond = 1 / (displaylink.targetTimestamp - displaylink.timestamp)

in https://developer.apple.com/documentation/quartzcore/cadisplaylink

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant