Skip to content
This repository was archived by the owner on Feb 25, 2025. It is now read-only.

Conversation

@moffatman
Copy link
Contributor

Right now framerate when platform views are on screen is capped to 80 fps on iOS devices. I tried uncapping the framerate and ran the test app in flutter/flutter#116640 on my M1 Max MBP and didn't notice any of the same slowdowns. iOSAppOnMac is only available on Apple Silicon Macs, so the performance baseline is really high. I think it's safe to remove the cap here.

120 Hz / ProMotion minimum specs

Category Device SoC CPU GPU
iOS iPhone 13 Pro A15 2P+4e 5 EU
Mac with built-in ProMotion MacBook Pro 2021 M1 Pro 6P+2e 14 EU
Mac with external 120Hz display MacBook Air 2020 M1 4P+4e 7 EU

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 and the C++, Objective-C, Java style guides.
  • I listed at least one issue that this PR fixes in the description above.
  • I added new tests to check the change I am making or feature I am adding, or Hixie said the PR is test-exempt. See testing the engine for instructions on writing and running engine tests.
  • I updated/added relevant documentation (doc comments with ///).
  • I signed the CLA.
  • All existing and new tests are passing.

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

@chinmaygarde
Copy link
Contributor

chinmaygarde commented Jul 20, 2023

Adding arbitrary caps to framerate seems like a dodgy way to fix such an issue. I am unsure what the issue even is. Can we reconsider the cap?

Perhaps we can change the framerate only when we detect we are slow and add a debouncing mechanism on switches to make it less jarring.

@cyanglaz
Copy link
Contributor

Perhaps we can change the framerate only when we detect we are slow

I have tried it without success. (As soon as we detected the slowness, the jitter has already happened. The jitter was very inconsistent.) Maybe I was doing it wrong. Could you explain the "a debouncing mechanism on switches"?

@stuartmorgan-g
Copy link
Contributor

@chinmaygarde Since this is partially removing the cap, not adding a cap, can re-considering the cap for iOS be filed as a follow-up for further investigation rather than blocking this PR?

@chinmaygarde
Copy link
Contributor

Sure. Just wanted to make sure there was a followup.

Copy link
Contributor

@cyanglaz cyanglaz left a comment

Choose a reason for hiding this comment

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

LGTM

@moffatman moffatman added the autosubmit Merge PR when tree becomes green via auto submit App label Jul 25, 2023
@auto-submit auto-submit bot merged commit 1dd75f5 into flutter:main Jul 25, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 25, 2023
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Jul 26, 2023
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Jul 26, 2023
flutter/engine@9e00c11...db711f1

2023-07-26 matanlurey@users.noreply.github.com [Impeller] ToColor should produce a DlColor, not SkColor. (flutter/engine#43987)
2023-07-26 skia-flutter-autoroll@skia.org Roll ANGLE from b0b71d59391c to 84f5295c9782 (3 revisions) (flutter/engine#44025)
2023-07-25 smartercallum@gmail.com Uncap framerate for `iOSAppOnMac` (flutter/engine#43840)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
LouiseHsu pushed a commit to LouiseHsu/flutter that referenced this pull request Jul 31, 2023
…1307)

flutter/engine@9e00c11...db711f1

2023-07-26 matanlurey@users.noreply.github.com [Impeller] ToColor should produce a DlColor, not SkColor. (flutter/engine#43987)
2023-07-26 skia-flutter-autoroll@skia.org Roll ANGLE from b0b71d59391c to 84f5295c9782 (3 revisions) (flutter/engine#44025)
2023-07-25 smartercallum@gmail.com Uncap framerate for `iOSAppOnMac` (flutter/engine#43840)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
vashworth pushed a commit to vashworth/flutter that referenced this pull request Aug 2, 2023
…1307)

flutter/engine@9e00c11...db711f1

2023-07-26 matanlurey@users.noreply.github.com [Impeller] ToColor should produce a DlColor, not SkColor. (flutter/engine#43987)
2023-07-26 skia-flutter-autoroll@skia.org Roll ANGLE from b0b71d59391c to 84f5295c9782 (3 revisions) (flutter/engine#44025)
2023-07-25 smartercallum@gmail.com Uncap framerate for `iOSAppOnMac` (flutter/engine#43840)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-engine-flutter-autoroll
Please CC jonahwilliams@google.com,rmistry@google.com,zra@google.com on the revert to ensure that a human
is aware of the problem.

To file a bug in Flutter: https://github.com/flutter/flutter/issues/new/choose

To report a problem with the AutoRoller itself, please file a bug:
https://bugs.chromium.org/p/skia/issues/entry?template=Autoroller+Bug

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
gaaclarke pushed a commit to gaaclarke/engine that referenced this pull request Aug 30, 2023
Right now framerate when platform views are on screen is capped to 80 fps on iOS devices. I tried uncapping the framerate and ran the test app in flutter/flutter#116640 on my M1 Max MBP and didn't notice any of the same slowdowns. `iOSAppOnMac` is only available on Apple Silicon Macs, so the performance baseline is really high. I think it's safe to remove the cap here.

### 120 Hz / ProMotion minimum specs

| Category | Device | SoC | CPU | GPU |
|--|--|--|--|--|
iOS | iPhone 13 Pro | A15 | 2P+4e | 5 EU |
Mac with built-in ProMotion | MacBook Pro 2021 | M1 Pro | 6P+2e |  14 EU |
Mac with external 120Hz display | MacBook Air 2020 | M1 | 4P+4e | 7 EU |

[C++, Objective-C, Java style guides]: https://github.com/flutter/engine/blob/main/CONTRIBUTING.md#style
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

autosubmit Merge PR when tree becomes green via auto submit App platform-ios

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants