You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Each has a different set of limitations and tradeoffs, as discussed below. The pages linked above give details about each implementation.
37
38
39
+
## Hybrid Composition++
40
+
41
+
This mode is the latest hybrid composition strategy, and is designed to solve compositing performance and synchronization issues seen in the original Hybrid Composition mode. It is currently available as an opt-in feature.
42
+
43
+
### Requirements
44
+
-**Android API 34 or later**: Required for native transaction synchronization capabilities.
45
+
-**Vulkan Rendering**: The device must be capable of rendering with Vulkan.
46
+
47
+
If these requirements are not met on the end-user device, Flutter will automatically fall back to the existing platform view strategy configured for the app.
48
+
49
+
### Opting In
50
+
Because HCPP acts as a global upgrade for how platform views are backed, it is enabled via configuration rather than standard Dart initialization methods (`initAndroidView`, etc.).
51
+
52
+
You can enable HCPP using one of the following methods:
53
+
54
+
1.**Command Line Flag (Run/Test)**:
55
+
Pass the `--enable-hcpp` flag to your `flutter run` or `flutter test` command:
56
+
```bash
57
+
flutter run --enable-hcpp
58
+
```
59
+
*Note: This flag is intended for local execution and testing. It cannot be passed to `flutter build` commands. For release builds, use the manifest configuration below.*
60
+
61
+
2.**AndroidManifest.xml**:
62
+
Include a `<meta-data>` tag inside the `<application>` block of your `AndroidManifest.xml`:
The following is a list of limitations and known issues. If you encounter an issue not listed below, please file an issue!
71
+
-**SurfaceView Compatibility**: Opting in is currently not recommended if your application contains a platform view which is or contains a native [`SurfaceView`](https://developer.android.com/reference/android/view/SurfaceView) (often used by video players or map plugins), due to clipping issues. This is tracked in https://github.com/flutter/flutter/issues/175546.
72
+
-**Complex Overlay Stacking**: Transparent platform views will not display correctly in layout stacks structured as: Flutter canvas -> Platform View -> Overlay -> Transparent Platform View, when all four of these layers intersect.
73
+
38
74
## Virtual Display
39
75
40
76
This mode works by rendering the platform view into [a `VirtualDisplay`](https://developer.android.com/reference/android/hardware/display/VirtualDisplay), whose contents are connected to [a Flutter `Texture`](https://api.flutter.dev/flutter/widgets/Texture-class.html).
@@ -61,6 +97,7 @@ In most cases this combines the best aspects of Virtual Display and Hybrid Compo
61
97
62
98
This display mode requires SDK 23 or later.
63
99
100
+
64
101
# Selecting a mode
65
102
66
103
Usually Android platform views are created with one of the `init*` methods:
0 commit comments