-
Notifications
You must be signed in to change notification settings - Fork 6k
Set iOS default frame rate to screen max. #29797
Conversation
It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption to this rule, contact Hixie on the #hackers channel in Chat. If you are not sure if you need tests, consider this rule of thumb: the purpose of a test is to make sure someone doesn't accidentally revert the fix. Ask yourself, is there anything in your PR that you feel it is important we not accidentally revert back to how it was before your fix? Reviewers: Read the Tree Hygiene page and make sure this patch meets those guidelines before LGTMing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
During the API design review presented by @iskakaushik, this didn't seem like the direction we were going to take.
@chinmaygarde After the meeting, we had an offline discussion and we wanted to enable 120 first as an intermediate step. This will be a beta feature which user has to opt-in. |
I am not convinced that is a good idea. During the review, there was widespread opposition to this approach. And doing just that but only for temporarily and for users that opt into it via a flag isn't something we would want to do. We have also had confusion in the past about when certain flags would be necessary (like those for platform views). Can you fill me in on the context of the discussion that led to making this decision? |
The flag would be necessary for iOS to enable 120HZ nonetheless. So user has to opt-in. The reasons we wanted to do this first:
Also see Kaushik's comment in flutter/flutter#90675 (comment) |
Not sure I understand why if progress is made on (2) right now. This patch as a solution for (1) seems like an odd choice given the degree of opposition to this approach during the review. Why not just wait for (2) and let users test it out in the beta without a flag? |
Just chatted with Kaushik about this and I was confused about the flag referred to here. To clarify, it was |
CI blocked by flutter/flutter#85555 |
here's a proposed api for the framework: flutter/flutter@master...Hixie:freq |
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Hi Everyone. Thank you for being patient. This is in development and we are waiting on some benchmark work to be done before landing this. I will hide the comments that unrelated to the solution to keep the conversation in this PR directly related to the solution itself. Thank you for your understanding :) |
I wrote some code to try,both in flutter framework and engine. Any advice😀? |
This pull request executed golden file tests, but it has not been updated in a while (20+ days). Test results from Gold expire after as many days, so this pull request will need to be updated with a fresh commit in order to get results from Gold. |
Since it is still blocked by flutter/flutter#85555 |
The default iOS frame rate is set to 60 by default. This PR explicitly sets the preferred rate to the maximum refresh rate supported by the display. (120 on iPhone 13 pro, 60 on slower devices)
On iOS 15 and above, we also set the frame rate range, where the preferred and max are both screen max, the min is max/2.
Also, we avoid setting the preferred frame rate to a value lower than 60.
Fixes flutter/flutter#90675
Pre-launch Checklist
writing and running engine tests.
///
).If you need help, consider asking for advice on the #hackers-new channel on Discord.