Skip to content

[Linux] Request a frame when a view starts rendering - #192911

Merged
auto-submit[bot] merged 6 commits into
flutter:masterfrom
robert-ancell:linux-schedule-frame
Sep 21, 2026
Merged

auto-submit[bot] merged 6 commits into
flutter:masterfrom
robert-ancell:linux-schedule-frame

Conversation

@robert-ancell

Copy link
Copy Markdown
Contributor

Frames rendered before a view is realized are dropped, as there is nothing to present them to. The view is then left empty until something else makes Flutter render, which happens to be the window metrics sent when the view is first given a size.

Add fl_engine_schedule_frame and ask the engine for a frame instead of relying on that.

Frames rendered before a view is realized are dropped, as there is
nothing to present them to. The view is then left empty until something
else makes Flutter render, which happens to be the window metrics sent
when the view is first given a size.

Add fl_engine_schedule_frame and ask the engine for a frame instead of
relying on that.
@robert-ancell
robert-ancell requested a review from a team as a code owner September 17, 2026 04:11
@flutter-dashboard flutter-dashboard Bot added the CICD Run CI/CD label Sep 17, 2026
@flutter-dashboard

Copy link
Copy Markdown

It looks like this pull request may not have tests. Please make sure to add tests or get an explicit test exemption before merging.

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. If you believe this PR qualifies for a test exemption, contact "@test-exemption-reviewer" in the #hackers channel in Discord (don't just cc them here, they won't see it!). 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.

@github-actions github-actions Bot added engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically a: desktop Running on desktop team-linux Owned by the Linux platform team labels Sep 17, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request introduces the fl_engine_schedule_frame function to the Linux platform shell, which requests the Flutter engine to render a new frame. This function is called during the realization phase of the OpenGL, software, and subsurface view renderers to ensure a frame is scheduled and the view is not left empty if initial frames were dropped. There are no review comments, and I have no feedback to provide.

Covers fl_engine_schedule_frame and a view asking for a frame when it is
realized. The mock engine didn't have a ScheduleFrame method, so calling
it in a test used a null pointer.
mattkae
mattkae previously approved these changes Sep 17, 2026

@mattkae mattkae left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Fantastique!

@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 17, 2026
@auto-submit
auto-submit Bot added this pull request to the merge queue Sep 17, 2026
@jtmcdole
jtmcdole removed this pull request from the merge queue due to a manual request Sep 17, 2026
@flutter-dashboard flutter-dashboard Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 17, 2026
# Conflicts:
#	engine/src/flutter/shell/platform/linux/fl_engine_private.h
#	engine/src/flutter/shell/platform/linux/fl_view_renderer_subsurface.cc
mattkae
mattkae previously approved these changes Sep 18, 2026
@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 18, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 18, 2026
@auto-submit

auto-submit Bot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/192911, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

@mattkae mattkae added the autosubmit Merge PR when tree becomes green via auto submit App label Sep 21, 2026
@auto-submit auto-submit Bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Sep 21, 2026
@auto-submit

auto-submit Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

autosubmit label was removed for flutter/flutter/192911, because - The status or check suite Dashboard Checks has failed. Please fix the issues identified (or deflake) before re-applying this label.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

a: desktop Running on desktop CICD Run CI/CD engine flutter/engine related. See also e: labels. platform-linux Building on or for Linux specifically team-linux Owned by the Linux platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants