Skip to content

Commit 300a2ea

Browse files
sfshaza2gemini-code-assist[bot]parlough
authored
Adding a note about "the great thread merge" (#12627)
For iOS and Android. --------- Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Co-authored-by: Parker Lougheed <[email protected]>
1 parent 392c661 commit 300a2ea

File tree

1 file changed

+18
-9
lines changed

1 file changed

+18
-9
lines changed

src/content/resources/architectural-overview.md

Lines changed: 18 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -797,19 +797,22 @@ As we've seen, rather than being translated into the equivalent OS widgets,
797797
Flutter user interfaces are built, laid out, composited, and painted by Flutter
798798
itself. The mechanism for obtaining the texture and participating in the app
799799
lifecycle of the underlying operating system inevitably varies depending on the
800-
unique concerns of that platform. The engine is platform-agnostic, presenting a
801-
[stable ABI (Application Binary
802-
Interface)]({{site.repo.flutter}}/blob/main/engine/src/flutter/shell/platform/embedder/embedder.h)
800+
unique concerns of that platform. The engine is platform-agnostic,
801+
presenting a [stable ABI (Application Binary Interface)][ABI].
803802
that provides a _platform embedder_ with a way to set up and use Flutter.
804803

804+
[ABI]: {{site.repo.flutter}}/blob/main/engine/src/flutter/shell/platform/embedder/embedder.h
805+
805806
The platform embedder is the native OS application that hosts all Flutter
806807
content, and acts as the glue between the host operating system and Flutter.
807-
When you start a Flutter app, the embedder provides the entrypoint, initializes
808-
the Flutter engine, obtains threads for UI and rastering, and creates a texture
809-
that Flutter can write to. The embedder is also responsible for the app
810-
lifecycle, including input gestures (such as mouse, keyboard, touch), window
811-
sizing, thread management, and platform messages. Flutter includes platform
812-
embedders for Android, iOS, Windows, macOS, and Linux; you can also create a
808+
When you start a Flutter app, the embedder provides the entrypoint,
809+
initializes the Flutter engine, obtains threads for UI and rastering,
810+
and creates a texture that Flutter can write to.
811+
The embedder is also responsible for the app lifecycle,
812+
including input gestures (such as mouse, keyboard, touch), window
813+
sizing, thread management, and platform messages.
814+
Flutter includes platform embedders for Android, iOS, Windows,
815+
macOS, and Linux; you can also create a
813816
custom platform embedder, as in [this worked
814817
example]({{site.github}}/chinmaygarde/fluttercast) that supports remoting
815818
Flutter sessions through a VNC-style framebuffer or [this worked example for
@@ -818,6 +821,10 @@ Raspberry Pi]({{site.github}}/ardera/flutter-pi).
818821
Each platform has its own set of APIs and constraints. Some brief
819822
platform-specific notes:
820823

824+
- As of Flutter 3.29, the UI and platform threads are merged on
825+
iOS and Android. Specifically, the UI thread
826+
is removed and the Dart code runs on the native platform thread.
827+
For more information, see [The great thread merge][] video.
821828
- On iOS and macOS, Flutter is loaded into the embedder as a `UIViewController`
822829
or `NSViewController`, respectively. The platform embedder creates a
823830
`FlutterEngine`, which serves as a host to the Dart VM and your Flutter
@@ -834,6 +841,8 @@ platform-specific notes:
834841
[ANGLE](https://chromium.googlesource.com/angle/angle/+/master/README.md), a
835842
library that translates OpenGL API calls to the DirectX 11 equivalents.
836843

844+
[The great thread merge]: https://youtu.be/miW7vCmQwnw?si=9EYvRDxtkpkPrcSO
845+
837846
## Integrating with other code
838847

839848
Flutter provides a variety of interoperability mechanisms, whether you're

0 commit comments

Comments
 (0)