Class FlutterRenderer

    • Constructor Detail

      • FlutterRenderer

        public FlutterRenderer​(@NonNull
                               FlutterJNI flutterJNI)
    • Method Detail

      • isDisplayingFlutterUi

        public boolean isDisplayingFlutterUi()
        Returns true if this FlutterRenderer is painting pixels to an Android View hierarchy, false otherwise.
      • SetRenderingToImageView

        public void SetRenderingToImageView​(boolean value)
        Informs the renderer whether the surface it is rendering to is backend by a FlutterImageView, which requires additional synchonization in the Vulkan backend.
      • addIsDisplayingFlutterUiListener

        public void addIsDisplayingFlutterUiListener​(@NonNull
                                                     FlutterUiDisplayListener listener)
        Adds a listener that is invoked whenever this FlutterRenderer starts and stops painting pixels to an Android View hierarchy.
      • startRenderingToSurface

        public void startRenderingToSurface​(@NonNull
                                            Surface surface,
                                            boolean keepCurrentSurface)
        Notifies Flutter that the given surface was created and is available for Flutter rendering.

        If called more than once, the current native resources are released. This can be undesired if the Engine expects to reuse this surface later. For example, this is true when platform views are displayed in a frame, and then removed in the next frame.

        To avoid releasing the current surface resources, set keepCurrentSurface to true.

        See SurfaceHolder.Callback and TextureView.SurfaceTextureListener

        surface - The render surface.
        keepCurrentSurface - True if the current active surface should not be released.
      • setViewportMetrics

        public void setViewportMetrics​(@NonNull
                                       FlutterRenderer.ViewportMetrics viewportMetrics)
        Notifies Flutter that the viewport metrics, e.g. window height and width, have changed.

        If the width, height, or devicePixelRatio are less than or equal to 0, this update is ignored.

        viewportMetrics - The metrics to send to the Dart application.
      • getBitmap

        public Bitmap getBitmap()
      • dispatchPointerDataPacket

        public void dispatchPointerDataPacket​(@NonNull
                                              ByteBuffer buffer,
                                              int position)
      • isSoftwareRenderingEnabled

        public boolean isSoftwareRenderingEnabled()
      • setAccessibilityFeatures

        public void setAccessibilityFeatures​(int flags)
      • setSemanticsEnabled

        public void setSemanticsEnabled​(boolean enabled)
      • dispatchSemanticsAction

        public void dispatchSemanticsAction​(int nodeId,
                                            int action,
                                            ByteBuffer args,
                                            int argsPosition)