Flutter Engine
The Flutter Engine
|
Public Member Functions | |
PlatformView | createPlatformView ( @NonNull PlatformViewsChannel.PlatformViewCreationRequest request, boolean wrapContext) |
long | configureForTextureLayerComposition ( @NonNull PlatformView platformView, @NonNull PlatformViewsChannel.PlatformViewCreationRequest request) |
MotionEvent | toMotionEvent (float density, PlatformViewsChannel.PlatformViewTouch touch, boolean usingVirtualDiplay) |
PlatformViewsController () | |
void | attach ( @Nullable Context context, @NonNull TextureRegistry textureRegistry, @NonNull DartExecutor dartExecutor) |
void | setSoftwareRendering (boolean useSoftwareRendering) |
void | detach () |
void | attachToView (@NonNull FlutterView newFlutterView) |
void | detachFromView () |
void | attachAccessibilityBridge (@NonNull AccessibilityBridge accessibilityBridge) |
void | detachAccessibilityBridge () |
void | attachTextInputPlugin (@NonNull TextInputPlugin textInputPlugin) |
void | detachTextInputPlugin () |
boolean | checkInputConnectionProxy (@Nullable View view) |
PlatformViewRegistry | getRegistry () |
void | onAttachedToJNI () |
void | onDetachedFromJNI () |
void | onPreEngineRestart () |
View | getPlatformViewById (int viewId) |
boolean | usesVirtualDisplay (int id) |
void | disposePlatformView (int viewId) |
void | attachToFlutterRenderer (@NonNull FlutterRenderer flutterRenderer) |
void | onDisplayPlatformView (int viewId, int x, int y, int width, int height, int viewWidth, int viewHeight, @NonNull FlutterMutatorsStack mutatorsStack) |
void | onDisplayOverlaySurface (int id, int x, int y, int width, int height) |
void | onBeginFrame () |
void | onEndFrame () |
FlutterOverlaySurface | createOverlaySurface (@NonNull PlatformOverlayView imageView) |
FlutterOverlaySurface | createOverlaySurface () |
void | destroyOverlaySurfaces () |
SparseArray< PlatformOverlayView > | getOverlayLayerViews () |
Package Functions | |
void | initializePlatformViewIfNeeded (int viewId) |
Package Attributes | |
final HashMap< Integer, VirtualDisplayController > | vdControllers |
final HashMap< Context, View > | contextToEmbeddedView |
Manages platform views.
Each io.flutter.embedding.engine.FlutterEngine
or io.flutter.app.FlutterPluginRegistry
has a single platform views controller. A platform views controller can be attached to at most one Flutter view.
Definition at line 52 of file PlatformViewsController.java.
|
inline |
Definition at line 716 of file PlatformViewsController.java.
|
inline |
Attaches this platform views controller to its input and output channels.
context | The base context that will be passed to embedded views created by this controller. This should be the context of the Activity hosting the Flutter application. |
textureRegistry | The texture registry which provides the output textures into which the embedded views will be rendered. |
dartExecutor | The dart execution context, which is used to set up a system channel. |
Definition at line 740 of file PlatformViewsController.java.
|
inline |
Attaches an accessibility bridge for this platform views accessibility delegate.
Accessibility events originating in platform views belonging to this delegate will be delegated to this accessibility bridge.
Implements io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate.
Definition at line 856 of file PlatformViewsController.java.
|
inline |
Attaches this controller to a text input plugin.
While a text input plugin is available, the platform views controller interacts with it to facilitate delegation of text input connections to platform views.
A platform views controller should be attached to a text input plugin whenever it is possible for the Flutter framework to receive text input.
Definition at line 874 of file PlatformViewsController.java.
|
inline |
Definition at line 1127 of file PlatformViewsController.java.
|
inline |
Attaches the controller to a FlutterView
.
When io.flutter.embedding.android.FlutterFragment
is used, this method is called after the device rotates since the FlutterView is recreated after a rotation.
Definition at line 796 of file PlatformViewsController.java.
|
inline |
Returns true if Flutter should perform input connection proxying for the view.
If the view is a platform view managed by this platform views controller returns true. Else if the view was created in a platform view's VD, delegates the decision to the platform view's View#checkInputConnectionProxy(View)
method. Else returns false.
Definition at line 890 of file PlatformViewsController.java.
|
inline |
Definition at line 599 of file PlatformViewsController.java.
|
inline |
Creates an overlay surface while the Flutter view is rendered by PlatformOverlayView
.
This method is invoked by FlutterJNI
only.
This member is not intended for public use, and is only visible for testing.
Definition at line 1306 of file PlatformViewsController.java.
|
inline |
Creates and tracks the overlay surface.
imageView | The surface that displays the overlay. |
Definition at line 1292 of file PlatformViewsController.java.
|
inline |
Definition at line 506 of file PlatformViewsController.java.
|
inline |
Destroys the overlay surfaces and removes them from the view hierarchy.
This method is used only internally by FlutterJNI
.
Definition at line 1326 of file PlatformViewsController.java.
|
inline |
Detaches this platform views controller.
This is typically called when a Flutter applications moves to run in the background, or is destroyed. After calling this the platform views controller will no longer listen to it's previous messenger, and will not maintain references to the texture registry, context, and messenger passed to the previous attach call.
Definition at line 780 of file PlatformViewsController.java.
|
inline |
Detaches the current accessibility bridge.
Any accessibility events sent by platform views belonging to this delegate will be ignored until a new accessibility bridge is attached.
Implements io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate.
Definition at line 861 of file PlatformViewsController.java.
|
inline |
Detaches the controller from FlutterView
.
When io.flutter.embedding.android.FlutterFragment
is used, this method is called when the device rotates since the FlutterView is detached from the fragment. The next time the fragment needs to be displayed, a new Flutter view is created, so attachToView is called again.
Definition at line 822 of file PlatformViewsController.java.
|
inline |
Detaches this controller from the currently attached text input plugin.
Definition at line 879 of file PlatformViewsController.java.
|
inline |
Disposes a single
viewId | the PlatformView ID. |
Definition at line 1062 of file PlatformViewsController.java.
|
inline |
Definition at line 1350 of file PlatformViewsController.java.
|
inline |
Returns the root of the view hierarchy for the platform view with the requested id, or null if there is no corresponding view.
Implements io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate.
Definition at line 932 of file PlatformViewsController.java.
|
inline |
Definition at line 906 of file PlatformViewsController.java.
|
inlinepackage |
Initializes a platform view and adds it to the view hierarchy.
viewId | The view ID. This member is not intended for public use, and is only visible for testing. |
Definition at line 1080 of file PlatformViewsController.java.
|
inline |
Invoked when the io.flutter.embedding.engine.FlutterEngine
that owns this PlatformViewsController
attaches to JNI.
Definition at line 914 of file PlatformViewsController.java.
|
inline |
Definition at line 1201 of file PlatformViewsController.java.
|
inline |
Invoked when the io.flutter.embedding.engine.FlutterEngine
that owns this PlatformViewsController
detaches from JNI.
Definition at line 922 of file PlatformViewsController.java.
|
inline |
Called when an overlay surface is displayed in the current frame.
id | The ID of the surface. |
x | The left position relative to FlutterView . |
y | The top position relative to FlutterView . |
width | The width of the surface. |
height | The height of the surface. This member is not intended for public use, and is only visible for testing. |
Definition at line 1181 of file PlatformViewsController.java.
|
inline |
Called when a platform view id displayed in the current frame.
viewId | The ID of the platform view. |
x | The left position relative to FlutterView . |
y | The top position relative to FlutterView . |
width | The width of the platform view. |
height | The height of the platform view. |
viewWidth | The original width of the platform view before applying the mutator stack. |
viewHeight | The original height of the platform view before applying the mutator stack. |
mutatorsStack | The mutator stack. This member is not intended for public use, and is only visible for testing. |
Definition at line 1144 of file PlatformViewsController.java.
|
inline |
Called by FlutterJNI
when the Flutter frame was submitted.
This member is not intended for public use, and is only visible for testing.
Definition at line 1211 of file PlatformViewsController.java.
|
inline |
Definition at line 926 of file PlatformViewsController.java.
|
inline |
Sets whether Flutter uses software rendering.
When software rendering is used, no GL context is available on the raster thread. When this is set to true, there's no Flutter composition of Android views and Flutter widgets since GL textures cannot be used.
Software rendering is only used for testing in emulators, and it should never be set to true in a production environment.
useSoftwareRendering | Whether software rendering is used. |
Definition at line 767 of file PlatformViewsController.java.
|
inline |
Definition at line 671 of file PlatformViewsController.java.
|
inline |
Returns true if the platform view uses virtual displays.
Implements io.flutter.plugin.platform.PlatformViewsAccessibilityDelegate.
Definition at line 946 of file PlatformViewsController.java.
|
package |
Definition at line 99 of file PlatformViewsController.java.
|
package |
Definition at line 93 of file PlatformViewsController.java.