#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.
217 {
219 if (
auto pixel_buffer_texture = std::get_if<PixelBufferTexture>(
texture)) {
221 info.pixel_buffer_config.user_data = pixel_buffer_texture;
222 info.pixel_buffer_config.callback =
227 };
228 } else if (auto gpu_surface_texture =
229 std::get_if<GpuSurfaceTexture>(
texture)) {
231 info.gpu_surface_config.struct_size =
233 info.gpu_surface_config.type = gpu_surface_texture->surface_type();
234 info.gpu_surface_config.user_data = gpu_surface_texture;
235 info.gpu_surface_config.callback =
240 };
241 } else {
242 std::cerr << "Attempting to register unknown texture variant." << std::endl;
243 return -1;
244 }
245
247 texture_registrar_ref_, &
info);
249}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
@ kFlutterDesktopGpuSurfaceTexture
@ kFlutterDesktopPixelBufferTexture
int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *info)
◆ 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 |
Implements flutter::TextureRegistrar.
Definition at line 256 of file core_implementations.cc.
257 {
260 texture_registrar_ref_,
texture_id,
nullptr,
nullptr);
261 return;
262 }
263
264 struct Captures {
266 };
267 auto captures = new Captures();
268 captures->callback = std::move(
callback);
271 [](void* opaque) {
272 auto captures = reinterpret_cast<Captures*>(opaque);
273 captures->callback();
274 delete captures;
275 },
276 captures);
277}
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
Dart_NativeFunction function
void FlutterDesktopTextureRegistrarUnregisterExternalTexture(FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
The documentation for this class was generated from the following files: