#include <texture_registrar_impl.h>
Definition at line 14 of file texture_registrar_impl.h.
◆ TextureRegistrarImpl() [1/2]
◆ ~TextureRegistrarImpl()
flutter::TextureRegistrarImpl::~TextureRegistrarImpl |
( |
| ) |
|
|
virtualdefault |
◆ TextureRegistrarImpl() [2/2]
◆ MarkTextureFrameAvailable()
bool flutter::TextureRegistrarImpl::MarkTextureFrameAvailable |
( |
int64_t |
texture_id | ) |
|
|
overridevirtual |
◆ operator=()
◆ RegisterTexture()
int64_t flutter::TextureRegistrarImpl::RegisterTexture |
( |
TextureVariant * |
texture | ) |
|
|
overridevirtual |
Implements flutter::TextureRegistrar.
Definition at line 217 of file core_implementations.cc.
219 if (
auto pixel_buffer_texture = std::get_if<PixelBufferTexture>(texture)) {
223 [](
size_t width,
size_t height,
225 auto texture =
static_cast<PixelBufferTexture*
>(
user_data);
226 return texture->CopyPixelBuffer(width, height);
228 }
else if (
auto gpu_surface_texture =
229 std::get_if<GpuSurfaceTexture>(texture)) {
236 [](
size_t width,
size_t height,
238 auto texture =
static_cast<GpuSurfaceTexture*
>(
user_data);
239 return texture->ObtainDescriptor(width, height);
242 std::cerr <<
"Attempting to register unknown texture variant." << std::endl;
247 texture_registrar_ref_, &info);
References FlutterDesktopPixelBufferTextureConfig::callback, FlutterDesktopGpuSurfaceTextureConfig::callback, flutter::PixelBufferTexture::CopyPixelBuffer(), FlutterDesktopTextureRegistrarRegisterExternalTexture(), FlutterDesktopTextureInfo::gpu_surface_config, kFlutterDesktopGpuSurfaceTexture, kFlutterDesktopPixelBufferTexture, flutter::GpuSurfaceTexture::ObtainDescriptor(), FlutterDesktopTextureInfo::pixel_buffer_config, FlutterDesktopGpuSurfaceTextureConfig::struct_size, texture_id, FlutterDesktopGpuSurfaceTextureConfig::type, FlutterDesktopTextureInfo::type, user_data, FlutterDesktopPixelBufferTextureConfig::user_data, and FlutterDesktopGpuSurfaceTextureConfig::user_data.
◆ UnregisterTexture() [1/2]
bool flutter::TextureRegistrarImpl::UnregisterTexture |
( |
int64_t |
texture_id | ) |
|
|
overridevirtual |
◆ UnregisterTexture() [2/2]
void flutter::TextureRegistrarImpl::UnregisterTexture |
( |
int64_t |
texture_id, |
|
|
std::function< void()> |
callback |
|
) |
| |
|
overridevirtual |
The documentation for this class was generated from the following files:
@ kFlutterDesktopGpuSurfaceTexture
FLUTTER_EXPORT int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *info)
FlutterDesktopPixelBufferTextureCallback callback
FlutterDesktopTextureType type
FlutterDesktopPixelBufferTextureConfig pixel_buffer_config
FlutterDesktopGpuSurfaceType type
FlutterDesktopGpuSurfaceTextureCallback callback
void UnregisterTexture(int64_t texture_id, std::function< void()> callback) override
FlutterDesktopGpuSurfaceTextureConfig gpu_surface_config
FLUTTER_EXPORT void FlutterDesktopTextureRegistrarUnregisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
FLUTTER_EXPORT bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable(FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id)
@ kFlutterDesktopPixelBufferTexture