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

Multiview pipeline Pt. 2: Split out EndFrame #49341

Closed
wants to merge 4 commits into from

Conversation

dkwingsmt
Copy link
Contributor

@dkwingsmt dkwingsmt commented Dec 21, 2023

This is one of a series of changes to reland #47239, following #49266. All changes included in this PR are exactly the same as they were in the original PR #47239.

This PR is a refactor that splits out the per-frame operations of Animator at the end of Render and BeginFrame to a separate function, EndFrame, which is executed right after Render.

This PR is expected to increase the build time, because more code is now run before frame_timings_recorder_->RecordBuildEnd:

  • The following lines of code are now run before the RecordBuildEnd:
  // These lines were executed after `RecordBuildEnd`, but now before it.
  int64_t view_id = kFlutterImplicitViewId;
  std::vector<std::unique_ptr<LayerTreeTask>> layer_trees_tasks;
  layer_trees_tasks.push_back(std::make_unique<LayerTreeTask>(
      view_id, std::move(layer_tree), device_pixel_ratio));
  • The Render call must now return to Dart, then to Animator::BeginFrame, before RecordBuildEnd in EndFrame. The two extra context switches are included in the build time.

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 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.

@dkwingsmt dkwingsmt marked this pull request as draft December 21, 2023 20:29
@dkwingsmt dkwingsmt marked this pull request as ready for review December 21, 2023 21:49
Copy link
Member

@loic-sharma loic-sharma left a comment

Choose a reason for hiding this comment

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

LGTM

@loic-sharma
Copy link
Member

Thanks for the comment on how build time changes!

@dkwingsmt
Copy link
Contributor Author

I'll merge this PR once #49266 has been rolled into g3 for a while, possibly a few days after the new years holiday.

@dkwingsmt dkwingsmt closed this Jan 12, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants