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

[tool] Add CADisableMinimumFrameDurationOnPhone to iOS templates #94509

Merged

Conversation

cyanglaz
Copy link
Contributor

@cyanglaz cyanglaz commented Dec 1, 2021

This PR adds CADisableMinimumFrameDurationOnPhone to the iOS templates.

Fixes #94508

Pre-launch Checklist

  • I read the Contributor Guide and followed the process outlined there for submitting PRs.
  • I read the Tree Hygiene wiki page, which explains my responsibilities.
  • I read and followed the Flutter Style Guide, including Features we expect every widget to implement.
  • I signed the CLA.
  • I listed at least one issue that this PR fixes in the description above.
  • I updated/added relevant documentation (doc comments with ///).
  • I added new tests to check the change I am making, or this PR is test-exempt.
  • All existing and new tests are passing.

If you need help, consider asking for advice on the #hackers-new channel on Discord.

@flutter-dashboard flutter-dashboard bot added the tool Affects the "flutter" command-line tool. See also t: labels. label Dec 1, 2021
@google-cla google-cla bot added the cla: yes label Dec 1, 2021
@@ -2839,6 +2839,114 @@ void main() {
platform: globals.platform,
),
});

testUsingContext('CADisableMinimumFrameDurationOnPhone is true in info.plist for objc iOS project.', () async {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of adding new tests for this plist value, what if you change the UIViewControllerBasedStatusBarAppearance tests to check expected Info.plist values.

final bool viewControllerBasedStatusBarAppearance = _getBooleanValueFromPlist(plistFile: plistFile, key: 'UIViewControllerBasedStatusBarAppearance');
expect(viewControllerBasedStatusBarAppearance, true);

    final bool viewControllerBasedStatusBarAppearance = _getBooleanValueFromPlist(plistFile: plistFile, key: 'UIViewControllerBasedStatusBarAppearance');
    expect(viewControllerBasedStatusBarAppearance, true);
    final bool disabled = _getBooleanValueFromPlist(plistFile: plistFile, key: 'CADisableMinimumFrameDurationOnPhone');

@iskakaushik
Copy link
Contributor

I think we should wait until we have some baseline benchmarks for the devices before we land this as the default. Interested users can manually add this pref value if they desire. Once <> PR lands, users will be able to opt-in to default max frame rate by setting this manually, after that we can get some benchmarks specifically targeting lack of idle time and energy usage, we can then make this the default. I attempted to capture the sequence of steps here: #90675 (comment)

Copy link
Member

@jmagman jmagman left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code LGTM, merge when you and @iskakaushik think is best.

@cyanglaz cyanglaz marked this pull request as draft December 6, 2021 18:06
@cyanglaz
Copy link
Contributor Author

cyanglaz commented Dec 6, 2021

Convert to draft so we don't accidentally merge. this is blocked by #92444

@Hixie
Copy link
Contributor

Hixie commented Feb 23, 2022

Convert to draft so we don't accidentally merge. this is blocked by #92444

this has been marked WONTFIX, so we should figure out next steps here.

@jmagman
Copy link
Member

jmagman commented Mar 9, 2022

@cyanglaz cyanglaz force-pushed the template_allow_max_refresh_rate branch from ce899f5 to bebfb3f Compare March 9, 2022 00:58
@skia-gold
Copy link

Gold has detected about 10 new digest(s) on patchset 3.
View them at https://flutter-gold.skia.org/cl/github/94509

@cyanglaz cyanglaz marked this pull request as ready for review March 9, 2022 01:10
@cyanglaz cyanglaz force-pushed the template_allow_max_refresh_rate branch from f1f0eed to ccb66b9 Compare March 9, 2022 17:39
@cyanglaz
Copy link
Contributor Author

cyanglaz commented Mar 9, 2022

We need to land this to address some iPhone 13 pro issue, see: #99151 (comment)

engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 14, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Mar 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tool Affects the "flutter" command-line tool. See also t: labels.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Flutter iOS app should set CADisableMinimumFrameDurationOnPhone to true in info.plist by default
6 participants