FlutterDesktopPixelBufferTextureCallback typedef

FlutterDesktopPixelBufferTextureCallback = Pointer<NativeFunction<Pointer<FlutterDesktopPixelBuffer> Function(Size, Size, Pointer<NativeType>)>>

The pixel buffer copy callback definition provided to the Flutter engine to copy the texture. It is invoked with the intended surface size specified by width and height and the user_data held by FlutterDesktopPixelBufferTextureConfig.

As this is usually called from the render thread, the callee must take care of proper synchronization. It also needs to be ensured that the returned FlutterDesktopPixelBuffer isn't released prior to unregistering the corresponding texture.

Implementation

typedef FlutterDesktopPixelBufferTextureCallback = Pointer<
    NativeFunction<
        Pointer<FlutterDesktopPixelBuffer> Function(Size, Size, Pointer)>>;