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

Conversation

@jonahwilliams
Copy link
Contributor

Fixes the reported GPU time regression when rendering platform views. The problem was that we delayed the tracing of the end of the frame until the CATransaction, which artificially stretches out GPU frame time. Instead add a new method SurfaceMTL::PreparePResent which performs the final blit and tracing, call this in the encode callback.

Fixes: https://flutter-flutter-perf.skia.org/e/?queries=sub_result%3Daverage_gpu_frame_time%26test%3Dplatform_views_scroll_perf_ios__timeline_summary&selected=commit%3D41853%26name%3D%252Carch%253Dintel%252Cbranch%253Dmaster%252Cconfig%253Ddefault%252Cdevice_type%253DiPhone_11%252Cdevice_version%253Dnone%252Chost_type%253Dmac%252Csub_result%253Daverage_gpu_frame_time%252Ctest%253Dplatform_views_scroll_perf_ios__timeline_summary%252C

Test: benchmarks.

@flutter-dashboard
Copy link

It looks like this pull request may not have tests. Please make sure to add tests before merging. If you need an exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!).

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. The test exemption team is a small volunteer group, so all reviewers should feel empowered to ask for tests, without delegating that responsibility entirely to the test exemption group.

}

/// @brief Perform the final blit and trigger end of frame workloads.
bool PreparePresent();
Copy link
Member

Choose a reason for hiding this comment

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

Perhaps Present can not be renamed to SubmitCommandBuffer? What happens if there is a missing call to prepare present? Does Present do that for you implicitly?

I suppose we can figure this out later.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I wil add an FML_CHECK that we've done both. its all our code so we should be able to do that...

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, I'm not too concerned. Simple DCHECKS ought to be fine.

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Aug 8, 2024
@auto-submit auto-submit bot merged commit ef820aa into flutter:main Aug 8, 2024
engine-flutter-autoroll added a commit to engine-flutter-autoroll/flutter that referenced this pull request Aug 8, 2024
auto-submit bot pushed a commit to flutter/flutter that referenced this pull request Aug 8, 2024
…153124)

flutter/engine@387f6f3...ef820aa

2024-08-08 [email protected] [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452)
2024-08-08 [email protected] Add EGL Surface backing store (flutter/engine#43683)
2024-08-08 [email protected] Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449)
2024-08-08 [email protected] Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448)

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
DBowen33 pushed a commit to DBowen33/flutter that referenced this pull request Aug 16, 2024
…lutter#153124)

flutter/engine@387f6f3...ef820aa

2024-08-08 [email protected] [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452)
2024-08-08 [email protected] Add EGL Surface backing store (flutter/engine#43683)
2024-08-08 [email protected] Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449)
2024-08-08 [email protected] Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448)

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
Buchimi pushed a commit to Buchimi/flutter that referenced this pull request Sep 2, 2024
…lutter#153124)

flutter/engine@387f6f3...ef820aa

2024-08-08 [email protected] [Impeller] perform final blit and gpu end frame tracing earlier. (flutter/engine#54452)
2024-08-08 [email protected] Add EGL Surface backing store (flutter/engine#43683)
2024-08-08 [email protected] Fix include of GrVkImageInfo header for the Fuchsia build (flutter/engine#54449)
2024-08-08 [email protected] Roll Fuchsia Test Scripts from AYS3tfC91ZRfdmIL0... to TXbf0oL9XzQ8vcHJP... (flutter/engine#54448)

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 [email protected],[email protected],[email protected] 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://issues.skia.org/issues/new?component=1389291&template=1850622

Documentation for the AutoRoller is here:
https://skia.googlesource.com/buildbot/+doc/main/autoroll/README.md
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 e: impeller

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants