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

[engine] more consistently flush dart event loop, run vsync callback immediately #56738

Merged
merged 6 commits into from
Nov 22, 2024

Conversation

jonahwilliams
Copy link
Member

Changes the following shell callbacks to flush the dart event loop:

  • OnPlatformViewSetViewportMetrics
  • OnPlatformViewDispatchPointerDataPacket
  • OnPlatformViewDispatchPlatformMessage
  • OnPlatformViewSetSemanticsEnabled
  • OnPlatformViewSetAccessibilityFeatures

Using a new TaskRunner API RunNowAndFlushMessages. If the task runner can run tasks on the current thread, this will immediately invoke a callback and then post an empty task to the event loop to ensure dart listeners fire.

This also updates the vsync waiter to use RunNowOrPostTask, so that we start vsync events as early as possible.

@jonahwilliams
Copy link
Member Author

WDUT @jason-simmons @LongCatIsLooong ?

@jason-simmons
Copy link
Member

LGTM

@jonahwilliams jonahwilliams marked this pull request as ready for review November 21, 2024 21:54
@flutter-dashboard
Copy link

Golden file changes have been found for this pull request. Click here to view and triage (e.g. because this is an intentional change).

If you are still iterating on this change and are not ready to resolve the images on the Flutter Gold dashboard, consider marking this PR as a draft pull request above. You will still be able to view image results on the dashboard, commenting will be silenced, and the check will not try to resolve itself until marked ready for review.

Changes reported for pull request #56738 at sha c02ac53

@jonahwilliams
Copy link
Member Author

Those goldens are concerning. if they aren't stable I need to roll back the MSAA patch

@jonahwilliams jonahwilliams added the autosubmit Merge PR when tree becomes green via auto submit App label Nov 22, 2024
@auto-submit auto-submit bot merged commit 9b9d5e6 into flutter:main Nov 22, 2024
31 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
autosubmit Merge PR when tree becomes green via auto submit App
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants