Misc docs cleanup and fixes (#155501)

This commit is contained in:
Parker Lougheed
2024-09-24 16:03:08 -04:00
committed by GitHub
parent 35d57144ce
commit 22570daa18
49 changed files with 229 additions and 109 deletions

View File

@@ -8,9 +8,9 @@ Here are some terms that we use in the Flutter project and what they mean:
- **Dynamic patching**. The ability to update the Dart code of an app in the field by downloading a patch (of sorts) and providing it to the Dart VM, probably requiring a restart of the application.
- **Embedder**. The core of the Flutter engine is platform agnostic. But platforms that run Flutter applications need platform specific logic to wire up rendering to the native window toolkit, handle input events, etc.. This platform specific logic is referred to as the Flutter embedder. Embedders interact with the engine using a [very low level C/C++ API](https://github.com/flutter/engine/blob/043d92c48abdebdad926569bc204a59c5cf20a11/shell/platform/embedder/embedder.h). While this API exposed by the engine to its embedders is platform agnostic, it is usually not suitable for developers used to the tools, frameworks and libraries on that specific platform (UIKit using Objective-C/Swift on iOS, or, Android APIs using Java on Android). To make interacting with the engine more ergonomic to developers on a specific platform, there are platform specific embedding APIs ([iOS](https://docs.flutter.io/objcdoc/) and [Android](https://docs.flutter.io/javadoc/)). These APIs provide higher level abstractions but are optional.
- **Embedder**. The core of the Flutter engine is platform agnostic. But platforms that run Flutter applications need platform specific logic to wire up rendering to the native window toolkit, handle input events, etc.. This platform specific logic is referred to as the Flutter embedder. Embedders interact with the engine using a [very low level C/C++ API](https://github.com/flutter/engine/blob/0a3423abd79c282c8a5e84a24e03733c98b31144/shell/platform/embedder/embedder.h). While this API exposed by the engine to its embedders is platform agnostic, it is usually not suitable for developers used to the tools, frameworks and libraries on that specific platform (UIKit using Objective-C/Swift on iOS, or, Android APIs using Java on Android). To make interacting with the engine more ergonomic to developers on a specific platform, there are platform specific embedding APIs ([iOS](https://api.flutter.dev/ios-embedder) and [Android](https://api.flutter.dev/javadoc/)). These APIs provide higher level abstractions but are optional.
- **Embedding**. Flutter provides "embedders" to port Flutter behavior to specific platforms, as defined elsewhere in this glossary. However, embedders use a [very low level C/C++ API](https://github.com/flutter/engine/blob/043d92c48abdebdad926569bc204a59c5cf20a11/shell/platform/embedder/embedder.h) which would feel unnatural to typical developers of a platform, e.g., Android or iOS. A Flutter "embedding" is a counterpart to an "embedder", which introduces common platform tools for interacting with Flutter. The Android embedding offers a `FlutterActivity`, `FlutterFragment`, `FlutterView`, etc: [Android embedding](https://docs.flutter.io/javadoc/). The iOS embedding offers a `FlutterViewController`, etc: [iOS embedding](https://docs.flutter.io/objcdoc/). An embedding + an embedder signifies the entire story of how Flutter ports to a specific platform.
- **Embedding**. Flutter provides "embedders" to port Flutter behavior to specific platforms, as defined elsewhere in this glossary. However, embedders use a [very low level C/C++ API](https://github.com/flutter/engine/blob/0a3423abd79c282c8a5e84a24e03733c98b31144/shell/platform/embedder/embedder.h) which would feel unnatural to typical developers of a platform, e.g., Android or iOS. A Flutter "embedding" is a counterpart to an "embedder", which introduces common platform tools for interacting with Flutter. The Android embedding offers a `FlutterActivity`, `FlutterFragment`, `FlutterView`, etc: [Android embedding](https://api.flutter.dev/javadoc/). The iOS embedding offers a `FlutterViewController`, etc: [iOS embedding](https://api.flutter.dev/ios-embedder). An embedding + an embedder signifies the entire story of how Flutter ports to a specific platform.
- **Engine**. The C++ (and Java and ObjectiveC and...) side of Flutter. Defined in the `engine` repository. Includes Skia, Dart, and other low-level components. Exposed as `dart:ui` and other Dart libraries to author code.

View File

@@ -81,7 +81,7 @@ responsibility of the embedder to create and manage threads (and their message
loops) for the Flutter engine. The embedder gives the Flutter engine task
runners for the threads it manages. In addition to the threads managed by the
embedder for the engine, the Dart VM also has its own thread pool. Neither the
Flutter engine or the embedder have any access to the threads in this pool.
Flutter engine nor the embedder have any access to the threads in this pool.
### Task Runner Configuration
@@ -122,7 +122,7 @@ Interacting with the Flutter engine in any way must happen on the platform
thread. Interacting with the engine on any other thread will trip assertions in
unoptimized builds and is not thread safe in release builds. There are numerous
components in the Flutter engine that are not thread safe. Once the Flutter
engine is setup and running, the embedder does not have to post tasks to any of
engine is set up and running, the embedder does not have to post tasks to any of
the task runners used to configure the engine as long as all accesses to the
embedder API are made on the platform thread.