Skip to content

Conversation

@jason-simmons
Copy link
Member

@jason-simmons jason-simmons commented Apr 10, 2025

If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then the engine will be started on the UI thread. After engine setup completes and the Dart isolate is loaded, the UI task runner will be merged into the platform thread and all future Dart execution will run on the platform thread.

This makes it possible for other work to run on the platform thread while the engine starts.

See #163064

@jason-simmons jason-simmons requested a review from a team as a code owner April 10, 2025 15:47
@github-actions github-actions bot added platform-android Android applications specifically platform-ios iOS applications specifically engine flutter/engine related. See also e: labels. team-ios Owned by iOS platform team labels Apr 10, 2025
Copy link
Contributor

@jonahwilliams jonahwilliams left a comment

Choose a reason for hiding this comment

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

LGTM!

} else if (merged_platform_ui == "disabled") {
settings.merged_platform_ui_thread =
Settings::MergedPlatformUIThread::kDisabled;
} else if (merged_platform_ui == "mergeAfterLaunch") {
Copy link
Member

Choose a reason for hiding this comment

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

Why a separate option? This should be a strict improvement on all platforms. So, perhaps we should always merge after launch when the "enabled". This avoids adding an additional flag.

Copy link
Member Author

Choose a reason for hiding this comment

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

This option requires support from the embedder which has not been implemented on all host platforms.

If kMergeAfterLaunch is selected, then the embedder needs to configure the thread host to create a UI thread (which will only be used during engine startup). Some embedders may only have a platform thread and thus will not support this mode.

@chinmaygarde
Copy link
Member

Like we spoke about, my main concern remains the potential race that could happen between when the engine is setup, the isolate is launched, the merging happens, and when the main entrypoint is invoked. Not because the entrypoint cannot be invoked on a background thread, but the risk of any Dart invocation making an FFI call with the assumption that is on the main thread.

Maybe this race isn't happening but I am not able to convince myself that it cant. Perhaps add an FML_CHECK in DartIsolate::Run* or prove the same some other way?

In any case, beyond that primary concern (and perhaps the need for an additional flag), this LGTM!

@jason-simmons
Copy link
Member Author

The Dart entrypoint is invoked on the UI thread during RuntimeController::LaunchRootIsolate prior to the thread merge.

To avoid that race, this relies on the current design of Dart where the entrypoint starts the isolate and queues execution of the app's actual main function.
(see https://dart.googlesource.com/sdk/+/refs/heads/main/sdk/lib/_internal/vm/lib/isolate_patch.dart#270)

The engine does the thread merge after LaunchRootIsolate returns. Any tasks that were queued to the UI task runner while starting the isolate will be moved to the platform thread. So the app's main will be executed entirely on the platform thread.

If Dart does not do this internally, then we would need to add our own mechanism to defer execution of user code until the thread merge is done.

@github-actions github-actions bot added the platform-fuchsia Fuchsia code specifically label Apr 10, 2025
…hread

If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then the
engine will be started on the UI thread.  After engine setup completes and
the Dart isolate is loaded, the UI task runner will be merged into the platform
thread and all future Dart execution will run on the platform thread.

This makes it possible for other work to run on the platform thread while the
engine starts.

This PR makes kMergeAfterLaunch the default mode in the Android embedder.

See flutter#163064
@jason-simmons jason-simmons force-pushed the bug_163064_merge_after_launch branch from 511e401 to f868f26 Compare April 15, 2025 18:32
@jason-simmons
Copy link
Member Author

There is a deadlock when using MergedPlatformUIThread::kMergeAfterLaunch with the Shell::Spawn API (which creates a clone of the engine that shares the same task runners):

  • The app creates the root Shell instance on the platform thread.
  • The root Shell creates its engine and starts initializing it on the UI thread.
  • While the UI thread is starting the root engine, the platform thread can do other work.
    • On the platform thread, the app calls Shell::Spawn to create a clone of the root shell.
  • Shell::Spawn calls Shell::CreateShellOnPlatformThread, which queues a task to the UI task runner to create the cloned engine.
  • The UI thread continues setting up the root engine and creates the root isolate. The UI thread then calls MessageLoopTaskQueues::Merge to merge the UI task queue into the platform queue so the isolate's tasks will run on the platform thread.
  • After the Merge the engine cloning task that was queued to the UI task runner will now be scheduled to run on the platform thread.
    • But the platform thread is blocked in Shell::CreateShellOnPlatformThread waiting for that task to complete. So Shell::Spawn can not complete.

I experimented with a potential solution for this involving creation of a new UI task queue and task runner for each Shell instance:
https://github.com/jason-simmons/flutter/tree/merge_after_launch_sub_queue
Each shell's UI task runner can then be moved from the UI thread to the platform thread without affecting other clones of that shell. This works in the experiments that I tried, but the additional complexity and risk seem like a questionable tradeoff.

So I've updated this PR to disallow engine spawning if MergedPlatformUIThread::kMergeAfterLaunch is in use.

@jason-simmons jason-simmons added the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
@auto-submit auto-submit bot added this pull request to the merge queue Apr 17, 2025
Merged via the queue into flutter:master with commit c53fdbd Apr 17, 2025
179 checks passed
@flutter-dashboard flutter-dashboard bot removed the autosubmit Merge PR when tree becomes green via auto submit App label Apr 17, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Apr 18, 2025
auto-submit bot pushed a commit to flutter/packages that referenced this pull request Apr 18, 2025
flutter/flutter@ecabb1a...3ed38e2

2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380)
2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948)
2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143)
2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400)
2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271)
2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396)
2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834)
2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389)
2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388)
2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387)
2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385)
2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347)
2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918)
2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361)
2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226)
2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228)
2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308)
2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227)
2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655)
2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346)
2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536)
2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726)
2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
jason-simmons added a commit to jason-simmons/flutter that referenced this pull request Apr 18, 2025
github-merge-queue bot pushed a commit that referenced this pull request Apr 19, 2025
jason-simmons added a commit to jason-simmons/flutter that referenced this pull request Apr 21, 2025
…parate thread (flutter#166918)"

This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner

The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required
changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks
so that TaskObserverAdd returned the TaskQueueId where the observer was
added.  That TaskQueueId would later be given to TaskObserverRemove.

The original implementation of this PR updated the embedder library's
implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal
that the observer was not added.  However, this conflicted with the embedder's
EmbedderTaskRunner, whose implementation of GetTaskQueueId returns
TaskQueueId::kInvalid as a placeholder.

This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the
original implementaion which adds the observer to the current thread's message
loop and does not call GetTaskQueueId.

See flutter#167418
jason-simmons added a commit to jason-simmons/flutter that referenced this pull request Apr 21, 2025
…parate thread (flutter#166918)"

This includes a fix for a race seen in EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner

The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required
changing the interface of the TaskObserverAdd/TaskObserverRemove callbacks
so that TaskObserverAdd returned the TaskQueueId where the observer was
added.  That TaskQueueId would later be given to TaskObserverRemove.

The original implementation of this PR updated the embedder library's
implementation of TaskObserverAdd to return TaskQueueId::kInvalid to signal
that the observer was not added.  However, this conflicted with the embedder's
EmbedderTaskRunner, whose implementation of GetTaskQueueId returns
TaskQueueId::kInvalid as a placeholder.

This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the
original implementation which adds the observer to the current thread's message
loop and does not call GetTaskQueueId.

See flutter#167418
github-merge-queue bot pushed a commit that referenced this pull request Apr 22, 2025
…parate thread (#166918)" (#167519)

This includes a fix for a race seen in
EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner

The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required
changing the interface of the TaskObserverAdd/TaskObserverRemove
callbacks so that TaskObserverAdd returned the TaskQueueId where the
observer was added. That TaskQueueId would later be given to
TaskObserverRemove.

The original implementation of this PR updated the embedder library's
implementation of TaskObserverAdd to return TaskQueueId::kInvalid to
signal that the observer was not added. However, this conflicted with
the embedder's EmbedderTaskRunner, whose implementation of
GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder.

This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the
original implementation which adds the observer to the current thread's
message loop and does not call GetTaskQueueId.

See #167418
github-merge-queue bot pushed a commit that referenced this pull request Apr 28, 2025
…167472)

This relands #163726 without
changes.

The likely reason for flakiness was
#166918
(#167418 (comment)).

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
CodixNinja pushed a commit to CodixNinja/packages that referenced this pull request May 15, 2025
flutter/flutter@ecabb1a...3ed38e2

2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380)
2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948)
2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143)
2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400)
2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271)
2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396)
2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834)
2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389)
2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388)
2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387)
2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385)
2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347)
2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918)
2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361)
2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226)
2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228)
2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308)
2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227)
2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655)
2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346)
2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536)
2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726)
2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
androidseb pushed a commit to androidseb/packages that referenced this pull request Jun 8, 2025
…r#9114)

flutter/flutter@ecabb1a...3ed38e2

2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380)
2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948)
2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143)
2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400)
2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271)
2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396)
2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834)
2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389)
2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388)
2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387)
2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385)
2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347)
2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918)
2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361)
2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226)
2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228)
2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308)
2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227)
2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655)
2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346)
2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536)
2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726)
2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
FMorschel pushed a commit to FMorschel/packages that referenced this pull request Jun 9, 2025
…r#9114)

flutter/flutter@ecabb1a...3ed38e2

2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380)
2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948)
2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143)
2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400)
2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271)
2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396)
2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834)
2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389)
2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388)
2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387)
2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385)
2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347)
2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918)
2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361)
2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226)
2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228)
2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308)
2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227)
2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655)
2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346)
2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536)
2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726)
2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
Ortes pushed a commit to Ortes/packages that referenced this pull request Jun 25, 2025
…r#9114)

flutter/flutter@ecabb1a...3ed38e2

2025-04-18 [email protected] Update `led` docs (flutter/flutter#167380)
2025-04-18 [email protected] Throw an error if --local-engine-host is used without --local-engine (flutter/flutter#166948)
2025-04-18 [email protected] Add kotlin compatability to build file validation (flutter/flutter#167143)
2025-04-18 [email protected] Roll Skia from 844496884aa0 to 6c4595124690 (2 revisions) (flutter/flutter#167400)
2025-04-18 [email protected] Fix CarouselView crashes when initlal viewportDimension is 0.0 (flutter/flutter#167271)
2025-04-18 [email protected] Roll Dart SDK from b1eb743f97f5 to ab60afc99bcb (1 revision) (flutter/flutter#167396)
2025-04-18 [email protected] Add InputDecoration.visualDensity and InputDecorationTheme.visualDensity (flutter/flutter#166834)
2025-04-18 [email protected] Roll Skia from acc910544da7 to 844496884aa0 (1 revision) (flutter/flutter#167389)
2025-04-18 [email protected] Roll Skia from a409d685a711 to acc910544da7 (10 revisions) (flutter/flutter#167388)
2025-04-18 [email protected] Roll Dart SDK from 2bb85834e77e to b1eb743f97f5 (2 revisions) (flutter/flutter#167387)
2025-04-18 [email protected] Roll Fuchsia Linux SDK from m8Aln7fTF_8zy1V9N... to MwYckh5OvwwmIYLx0... (flutter/flutter#167385)
2025-04-17 [email protected] Roll Skia from cc2b57434651 to a409d685a711 (3 revisions) (flutter/flutter#167347)
2025-04-17 [email protected] Reduce app startup latency by initializing the engine on a separate thread (flutter/flutter#166918)
2025-04-17 [email protected] Roll Dart SDK from 992221a362ec to 2bb85834e77e (7 revisions) (flutter/flutter#167361)
2025-04-17 [email protected] Added docstring for FilterInput::GetSnapshot (flutter/flutter#167226)
2025-04-17 [email protected] adds Entity docstrings (flutter/flutter#167228)
2025-04-17 [email protected] fixed impeller golden content scale (flutter/flutter#167308)
2025-04-17 [email protected] Added docstring for FilterContents::RenderFilter (flutter/flutter#167227)
2025-04-17 [email protected] Feat: Add equality to NoDefaultCupertinoThemeData (flutter/flutter#166655)
2025-04-17 [email protected] Fix link to engine docs (flutter/flutter#167346)
2025-04-17 [email protected] [macOS] Enable merged platform and UI thread by default (flutter/flutter#166536)
2025-04-17 [email protected] [Windows] Enable merged platform and UI thread by default (flutter/flutter#163726)
2025-04-17 [email protected] Update `CHANGELOG.md` (flutter/flutter#167225)

If this roll has caused a breakage, revert this CL and stop the roller
using the controls here:
https://autoroll.skia.org/r/flutter-packages
Please CC [email protected],[email protected] on the revert to ensure that a human
is aware of the problem.

To file a bug in Packages: 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
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…hread (flutter#166918)

If settings.merged_platform_ui_thread is set to kMergeAfterLaunch, then
the engine will be started on the UI thread. After engine setup
completes and the Dart isolate is loaded, the UI task runner will be
merged into the platform thread and all future Dart execution will run
on the platform thread.

This makes it possible for other work to run on the platform thread
while the engine starts.

See flutter#163064
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…parate thread (flutter#166918)" (flutter#167519)

This includes a fix for a race seen in
EmbedderTest.PlatformThreadIsolatesWithCustomPlatformTaskRunner

The implementaion of MergedPlatformUIThread::kMergeAfterLaunch required
changing the interface of the TaskObserverAdd/TaskObserverRemove
callbacks so that TaskObserverAdd returned the TaskQueueId where the
observer was added. That TaskQueueId would later be given to
TaskObserverRemove.

The original implementation of this PR updated the embedder library's
implementation of TaskObserverAdd to return TaskQueueId::kInvalid to
signal that the observer was not added. However, this conflicted with
the embedder's EmbedderTaskRunner, whose implementation of
GetTaskQueueId returns TaskQueueId::kInvalid as a placeholder.

This PR reverts the embedder's TaskObserverAdd/TaskObserverRemove to the
original implementation which adds the observer to the current thread's
message loop and does not call GetTaskQueueId.

See flutter#167418
romanejaquez pushed a commit to romanejaquez/flutter that referenced this pull request Aug 14, 2025
…lutter#167472)

This relands flutter#163726 without
changes.

The likely reason for flakiness was
flutter#166918
(flutter#167418 (comment)).

<!--
Thanks for filing a pull request!
Reviewers are typically assigned within a week of filing a request.
To learn more about code review, see our documentation on Tree Hygiene:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
-->

*Replace this paragraph with a description of what this PR is changing
or adding, and why. Consider including before/after screenshots.*

*List which issues are fixed by this PR. You must list at least one
issue. An issue is not required if the PR fixes something trivial like a
typo.*

*If you had to change anything in the [flutter/tests] repo, include a
link to the migration guide as per the [breaking change policy].*

## Pre-launch Checklist

- [x] I read the [Contributor Guide] and followed the process outlined
there for submitting PRs.
- [x] I read the [Tree Hygiene] wiki page, which explains my
responsibilities.
- [x] I read and followed the [Flutter Style Guide], including [Features
we expect every widget to implement].
- [x] I signed the [CLA].
- [x] I listed at least one issue that this PR fixes in the description
above.
- [x] I updated/added relevant documentation (doc comments with `///`).
- [x] I added new tests to check the change I am making, or this PR is
[test-exempt].
- [x] I followed the [breaking change policy] and added [Data Driven
Fixes] where supported.
- [x] All existing and new tests are passing.

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

<!-- Links -->
[Contributor Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#overview
[Tree Hygiene]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md
[test-exempt]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#tests
[Flutter Style Guide]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md
[Features we expect every widget to implement]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Style-guide-for-Flutter-repo.md#features-we-expect-every-widget-to-implement
[CLA]: https://cla.developers.google.com/
[flutter/tests]: https://github.com/flutter/tests
[breaking change policy]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Tree-hygiene.md#handling-breaking-changes
[Discord]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Chat.md
[Data Driven Fixes]:
https://github.com/flutter/flutter/blob/main/docs/contributing/Data-driven-Fixes.md
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 15, 2025
engine-flutter-autoroll added a commit to engine-flutter-autoroll/packages that referenced this pull request Aug 16, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

engine flutter/engine related. See also e: labels. platform-android Android applications specifically platform-fuchsia Fuchsia code specifically platform-ios iOS applications specifically team-ios Owned by iOS platform team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants