fix: ios canvas ProMotion 120hz
Currently react-native-skia is only rendering with a maximum of 60 fps on iOS, even if the device supports 120 fps.
I've tried to screen record the behaviour, but interestingly enough it seems to render at 120 fps if I'm screen recording. So I resorted to a camera slow mo recording:
| Before | After |
|---|---|
@chrfalch describes the fix in a discussion comment https://github.com/Shopify/react-native-skia/discussions/1275#discussioncomment-4715887:
CAFrameRateRange rate;
rate.maximum = 120;
rate.preferred = 120;
_displayLink.preferredFrameRateRange = rate;
which I applied to the DisplayLink.mm file with a fallback:
_displayLink.preferredFramesPerSecond = 120;
if the iOS version is lower than 15.0.
I have signed the CLA!
finally we can merge it :) Thank you for this :)
:tada: This PR is included in version 1.5.1 :tada:
The release is available on:
Your semantic-release bot :package::rocket: