Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Classes | Public Member Functions | List of all members
flutter::PlatformViewAndroidJNI Class Referenceabstract

#include <platform_view_android_jni.h>

Inheritance diagram for flutter::PlatformViewAndroidJNI:
flutter::JNIMock flutter::PlatformViewAndroidJNIImpl

Classes

struct  OverlayMetadata
 

Public Member Functions

virtual ~PlatformViewAndroidJNI ()
 
virtual void FlutterViewHandlePlatformMessage (std::unique_ptr< flutter::PlatformMessage > message, int responseId)=0
 Sends a platform message. The message may be empty.
 
virtual void FlutterViewHandlePlatformMessageResponse (int responseId, std::unique_ptr< fml::Mapping > data)=0
 Responds to a platform message. The data may be a nullptr.
 
virtual void FlutterViewUpdateSemantics (std::vector< uint8_t > buffer, std::vector< std::string > strings, std::vector< std::vector< uint8_t > > string_attribute_args)=0
 Sends semantics tree updates.
 
virtual void FlutterViewUpdateCustomAccessibilityActions (std::vector< uint8_t > actions_buffer, std::vector< std::string > strings)=0
 Sends new custom accessibility events.
 
virtual void FlutterViewOnFirstFrame ()=0
 Indicates that FlutterView should start painting pixels.
 
virtual void FlutterViewOnPreEngineRestart ()=0
 Indicates that a hot restart is about to happen.
 
virtual void SurfaceTextureAttachToGLContext (JavaLocalRef surface_texture, int textureId)=0
 Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread.
 
virtual bool SurfaceTextureShouldUpdate (JavaLocalRef surface_texture)=0
 Returns true if surface_texture should be updated.
 
virtual void SurfaceTextureUpdateTexImage (JavaLocalRef surface_texture)=0
 Updates the texture image to the most recent frame from the image stream.
 
virtual void SurfaceTextureGetTransformMatrix (JavaLocalRef surface_texture, SkMatrix &transform)=0
 Gets the transform matrix from the SurfaceTexture. Then, it updates the transform matrix, so it fill the canvas and preserve the aspect ratio.
 
virtual void SurfaceTextureDetachFromGLContext (JavaLocalRef surface_texture)=0
 Detaches a SurfaceTexture from the OpenGL ES context.
 
virtual JavaLocalRef ImageProducerTextureEntryAcquireLatestImage (JavaLocalRef image_texture_entry)=0
 Acquire the latest image available.
 
virtual JavaLocalRef ImageGetHardwareBuffer (JavaLocalRef image)=0
 Grab the HardwareBuffer from image.
 
virtual void ImageClose (JavaLocalRef image)=0
 Call close on image.
 
virtual void HardwareBufferClose (JavaLocalRef hardware_buffer)=0
 Call close on hardware_buffer.
 
virtual void FlutterViewOnDisplayPlatformView (int view_id, int x, int y, int width, int height, int viewWidth, int viewHeight, MutatorsStack mutators_stack)=0
 Positions and sizes a platform view if using hybrid composition.
 
virtual void FlutterViewDisplayOverlaySurface (int surface_id, int x, int y, int width, int height)=0
 Positions and sizes an overlay surface in hybrid composition.
 
virtual void FlutterViewBeginFrame ()=0
 Initiates a frame if using hybrid composition.
 
virtual void FlutterViewEndFrame ()=0
 Indicates that the current frame ended. It's used to clean up state.
 
virtual std::unique_ptr< PlatformViewAndroidJNI::OverlayMetadataFlutterViewCreateOverlaySurface ()=0
 Instantiates an overlay surface in hybrid composition and provides the necessary metadata to operate the surface in C.
 
virtual void FlutterViewDestroyOverlaySurfaces ()=0
 Destroys the overlay surfaces.
 
virtual std::unique_ptr< std::vector< std::string > > FlutterViewComputePlatformResolvedLocale (std::vector< std::string > supported_locales_data)=0
 Computes the locale Android would select.
 
virtual double GetDisplayRefreshRate ()=0
 
virtual double GetDisplayWidth ()=0
 
virtual double GetDisplayHeight ()=0
 
virtual double GetDisplayDensity ()=0
 
virtual bool RequestDartDeferredLibrary (int loading_unit_id)=0
 
virtual double FlutterViewGetScaledFontSize (double unscaled_font_size, int configuration_id) const =0
 

Detailed Description

Allows to call Java code running in the JVM from any thread. However, most methods can only be called from the platform thread as that is where the Java code runs.

This interface must not depend on the Android toolchain directly, so it can be used in unit tests compiled with the host toolchain.

Definition at line 38 of file platform_view_android_jni.h.

Constructor & Destructor Documentation

◆ ~PlatformViewAndroidJNI()

flutter::PlatformViewAndroidJNI::~PlatformViewAndroidJNI ( )
virtualdefault

Member Function Documentation

◆ FlutterViewBeginFrame()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewBeginFrame ( )
pure virtual

Initiates a frame if using hybrid composition.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewComputePlatformResolvedLocale()

virtual std::unique_ptr< std::vector< std::string > > flutter::PlatformViewAndroidJNI::FlutterViewComputePlatformResolvedLocale ( std::vector< std::string >  supported_locales_data)
pure virtual

Computes the locale Android would select.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewCreateOverlaySurface()

virtual std::unique_ptr< PlatformViewAndroidJNI::OverlayMetadata > flutter::PlatformViewAndroidJNI::FlutterViewCreateOverlaySurface ( )
pure virtual

Instantiates an overlay surface in hybrid composition and provides the necessary metadata to operate the surface in C.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewDestroyOverlaySurfaces()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewDestroyOverlaySurfaces ( )
pure virtual

Destroys the overlay surfaces.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewDisplayOverlaySurface()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewDisplayOverlaySurface ( int  surface_id,
int  x,
int  y,
int  width,
int  height 
)
pure virtual

Positions and sizes an overlay surface in hybrid composition.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewEndFrame()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewEndFrame ( )
pure virtual

Indicates that the current frame ended. It's used to clean up state.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewGetScaledFontSize()

virtual double flutter::PlatformViewAndroidJNI::FlutterViewGetScaledFontSize ( double  unscaled_font_size,
int  configuration_id 
) const
pure virtual

◆ FlutterViewHandlePlatformMessage()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewHandlePlatformMessage ( std::unique_ptr< flutter::PlatformMessage message,
int  responseId 
)
pure virtual

Sends a platform message. The message may be empty.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewHandlePlatformMessageResponse()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewHandlePlatformMessageResponse ( int  responseId,
std::unique_ptr< fml::Mapping data 
)
pure virtual

Responds to a platform message. The data may be a nullptr.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewOnDisplayPlatformView()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewOnDisplayPlatformView ( int  view_id,
int  x,
int  y,
int  width,
int  height,
int  viewWidth,
int  viewHeight,
MutatorsStack  mutators_stack 
)
pure virtual

Positions and sizes a platform view if using hybrid composition.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewOnFirstFrame()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewOnFirstFrame ( )
pure virtual

Indicates that FlutterView should start painting pixels.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewOnPreEngineRestart()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewOnPreEngineRestart ( )
pure virtual

Indicates that a hot restart is about to happen.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewUpdateCustomAccessibilityActions()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewUpdateCustomAccessibilityActions ( std::vector< uint8_t >  actions_buffer,
std::vector< std::string >  strings 
)
pure virtual

Sends new custom accessibility events.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ FlutterViewUpdateSemantics()

virtual void flutter::PlatformViewAndroidJNI::FlutterViewUpdateSemantics ( std::vector< uint8_t >  buffer,
std::vector< std::string >  strings,
std::vector< std::vector< uint8_t > >  string_attribute_args 
)
pure virtual

Sends semantics tree updates.

Note
Must be called from the platform thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ GetDisplayDensity()

virtual double flutter::PlatformViewAndroidJNI::GetDisplayDensity ( )
pure virtual

◆ GetDisplayHeight()

virtual double flutter::PlatformViewAndroidJNI::GetDisplayHeight ( )
pure virtual

◆ GetDisplayRefreshRate()

virtual double flutter::PlatformViewAndroidJNI::GetDisplayRefreshRate ( )
pure virtual

◆ GetDisplayWidth()

virtual double flutter::PlatformViewAndroidJNI::GetDisplayWidth ( )
pure virtual

◆ HardwareBufferClose()

virtual void flutter::PlatformViewAndroidJNI::HardwareBufferClose ( JavaLocalRef  hardware_buffer)
pure virtual

Call close on hardware_buffer.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ ImageClose()

virtual void flutter::PlatformViewAndroidJNI::ImageClose ( JavaLocalRef  image)
pure virtual

Call close on image.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ ImageGetHardwareBuffer()

virtual JavaLocalRef flutter::PlatformViewAndroidJNI::ImageGetHardwareBuffer ( JavaLocalRef  image)
pure virtual

Grab the HardwareBuffer from image.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ ImageProducerTextureEntryAcquireLatestImage()

virtual JavaLocalRef flutter::PlatformViewAndroidJNI::ImageProducerTextureEntryAcquireLatestImage ( JavaLocalRef  image_texture_entry)
pure virtual

Acquire the latest image available.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ RequestDartDeferredLibrary()

virtual bool flutter::PlatformViewAndroidJNI::RequestDartDeferredLibrary ( int  loading_unit_id)
pure virtual

◆ SurfaceTextureAttachToGLContext()

virtual void flutter::PlatformViewAndroidJNI::SurfaceTextureAttachToGLContext ( JavaLocalRef  surface_texture,
int  textureId 
)
pure virtual

Attach the SurfaceTexture to the OpenGL ES context that is current on the calling thread.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ SurfaceTextureDetachFromGLContext()

virtual void flutter::PlatformViewAndroidJNI::SurfaceTextureDetachFromGLContext ( JavaLocalRef  surface_texture)
pure virtual

Detaches a SurfaceTexture from the OpenGL ES context.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ SurfaceTextureGetTransformMatrix()

virtual void flutter::PlatformViewAndroidJNI::SurfaceTextureGetTransformMatrix ( JavaLocalRef  surface_texture,
SkMatrix transform 
)
pure virtual

Gets the transform matrix from the SurfaceTexture. Then, it updates the transform matrix, so it fill the canvas and preserve the aspect ratio.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ SurfaceTextureShouldUpdate()

virtual bool flutter::PlatformViewAndroidJNI::SurfaceTextureShouldUpdate ( JavaLocalRef  surface_texture)
pure virtual

Returns true if surface_texture should be updated.

Implemented in flutter::PlatformViewAndroidJNIImpl.

◆ SurfaceTextureUpdateTexImage()

virtual void flutter::PlatformViewAndroidJNI::SurfaceTextureUpdateTexImage ( JavaLocalRef  surface_texture)
pure virtual

Updates the texture image to the most recent frame from the image stream.

Implemented in flutter::PlatformViewAndroidJNIImpl.


The documentation for this class was generated from the following files: