5 #ifndef FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_TEXTURE_REGISTRAR_H_
6 #define FLUTTER_SHELL_PLATFORM_COMMON_CLIENT_WRAPPER_INCLUDE_FLUTTER_TEXTURE_REGISTRAR_H_
32 : copy_buffer_callback_(std::move(copy_buffer_callback)) {}
38 size_t height)
const {
39 return copy_buffer_callback_(width, height);
50 typedef std::function<
57 obtain_descriptor_callback_(std::move(obtain_descriptor_callback)) {}
64 size_t height)
const {
65 return obtain_descriptor_callback_(width, height);
102 std::function<
void()> callback) = 0;
GpuSurfaceTexture(FlutterDesktopGpuSurfaceType surface_type, ObtainDescriptorCallback obtain_descriptor_callback)
FlutterDesktopGpuSurfaceType surface_type() const
std::function< const FlutterDesktopGpuSurfaceDescriptor *(size_t width, size_t height)> ObtainDescriptorCallback
const FlutterDesktopGpuSurfaceDescriptor * ObtainDescriptor(size_t width, size_t height) const
const FlutterDesktopPixelBuffer * CopyPixelBuffer(size_t width, size_t height) const
std::function< const FlutterDesktopPixelBuffer *(size_t width, size_t height)> CopyBufferCallback
PixelBufferTexture(CopyBufferCallback copy_buffer_callback)
virtual bool UnregisterTexture(int64_t texture_id)=0
virtual ~TextureRegistrar()=default
virtual void UnregisterTexture(int64_t texture_id, std::function< void()> callback)=0
virtual bool MarkTextureFrameAvailable(int64_t texture_id)=0
virtual int64_t RegisterTexture(TextureVariant *texture)=0
FlutterDesktopGpuSurfaceType
std::variant< PixelBufferTexture, GpuSurfaceTexture > TextureVariant