#include "flutter/shell/platform/linux/public/flutter_linux/fl_texture_registrar.h"#include <gmodule.h>#include "flutter/shell/platform/embedder/embedder.h"#include "flutter/shell/platform/linux/fl_engine_private.h"#include "flutter/shell/platform/linux/fl_pixel_buffer_texture_private.h"#include "flutter/shell/platform/linux/fl_texture_gl_private.h"#include "flutter/shell/platform/linux/fl_texture_private.h"#include "flutter/shell/platform/linux/fl_texture_registrar_private.h"Go to the source code of this file.
Functions | |
| G_DECLARE_FINAL_TYPE (FlTextureRegistrarImpl, fl_texture_registrar_impl, FL, TEXTURE_REGISTRAR_IMPL, GObject) struct _FlTextureRegistrarImpl | |
| static void | fl_texture_registrar_impl_iface_init (FlTextureRegistrarInterface *iface) |
| G_DEFINE_TYPE_WITH_CODE (FlTextureRegistrarImpl, fl_texture_registrar_impl, G_TYPE_OBJECT, G_IMPLEMENT_INTERFACE(fl_texture_registrar_get_type(), fl_texture_registrar_impl_iface_init)) static void fl_texture_registrar_default_init(FlTextureRegistrarInterface *iface) | |
| static void | fl_texture_registrar_impl_dispose (GObject *object) |
| static void | fl_texture_registrar_impl_class_init (FlTextureRegistrarImplClass *klass) |
| static gboolean | register_texture (FlTextureRegistrar *registrar, FlTexture *texture) |
| static FlTexture * | lookup_texture (FlTextureRegistrar *registrar, int64_t texture_id) |
| static gboolean | mark_texture_frame_available (FlTextureRegistrar *registrar, FlTexture *texture) |
| static gboolean | unregister_texture (FlTextureRegistrar *registrar, FlTexture *texture) |
| static void | shutdown (FlTextureRegistrar *registrar) |
| static void | fl_texture_registrar_impl_init (FlTextureRegistrarImpl *self) |
| G_MODULE_EXPORT gboolean | fl_texture_registrar_register_texture (FlTextureRegistrar *self, FlTexture *texture) |
| FlTexture * | fl_texture_registrar_lookup_texture (FlTextureRegistrar *self, int64_t texture_id) |
| G_MODULE_EXPORT gboolean | fl_texture_registrar_mark_texture_frame_available (FlTextureRegistrar *self, FlTexture *texture) |
| G_MODULE_EXPORT gboolean | fl_texture_registrar_unregister_texture (FlTextureRegistrar *self, FlTexture *texture) |
| void | fl_texture_registrar_shutdown (FlTextureRegistrar *self) |
| FlTextureRegistrar * | fl_texture_registrar_new (FlEngine *engine) |
|
static |
Definition at line 70 of file fl_texture_registrar.cc.
References fl_texture_registrar_impl_dispose().
|
static |
Definition at line 57 of file fl_texture_registrar.cc.
References self.
Referenced by fl_texture_registrar_impl_class_init().
|
static |
Definition at line 164 of file fl_texture_registrar.cc.
References lookup_texture(), mark_texture_frame_available(), register_texture(), shutdown(), and unregister_texture().
|
static |
| FlTexture * fl_texture_registrar_lookup_texture | ( | FlTextureRegistrar * | registrar, |
| int64_t | texture_id | ||
| ) |
fl_texture_registrar_lookup_texture: @registrar: an #FlTextureRegistrar. @texture_id: ID of texture.
Looks for the texture with the given ID.
Returns: an #FlTexture or NULL if no texture with this ID.
Definition at line 190 of file fl_texture_registrar.cc.
References self, and texture_id.
Referenced by fl_engine_gl_external_texture_frame_callback(), and TEST().
| G_MODULE_EXPORT gboolean fl_texture_registrar_mark_texture_frame_available | ( | FlTextureRegistrar * | registrar, |
| FlTexture * | texture | ||
| ) |
fl_texture_registrar_mark_texture_frame_available: @registrar: an #FlTextureRegistrar. @texture: the texture that has a frame available.
Notifies the flutter engine that the texture object has updated and needs to be rerendered.
Returns: TRUE on success.
Definition at line 198 of file fl_texture_registrar.cc.
| FlTextureRegistrar * fl_texture_registrar_new | ( | FlEngine * | engine | ) |
fl_texture_registrar_new: @engine: an #FlEngine.
Creates a new #FlTextureRegistrar.
Returns: a new #FlTextureRegistrar.
Definition at line 221 of file fl_texture_registrar.cc.
Referenced by fl_engine_init(), TEST(), TEST(), TEST(), TEST(), and TEST().
| G_MODULE_EXPORT gboolean fl_texture_registrar_register_texture | ( | FlTextureRegistrar * | registrar, |
| FlTexture * | texture | ||
| ) |
FlTextureRegistrar:
#FlTextureRegistrar is used when registering textures.
Flutter Framework accesses your texture by the related unique texture ID. To draw your texture in Dart, you should add Texture widget in your widget tree with the same texture ID. Use platform channels to send this unique texture ID to the Dart side. fl_texture_registrar_register_texture: @registrar: an #FlTextureRegistrar. @texture: an #FlTexture for registration.
Registers a texture.
Returns: TRUE on success.
Definition at line 182 of file fl_texture_registrar.cc.
Referenced by add_mock_texture_to_registrar(), TEST(), TEST(), TEST(), and TEST().
| void fl_texture_registrar_shutdown | ( | FlTextureRegistrar * | registrar | ) |
fl_texture_registrar_shutdown: @registrar: an #FlTextureRegistrar.
Shutdown the registrary and unregister any textures.
Definition at line 215 of file fl_texture_registrar.cc.
References self.
Referenced by fl_engine_dispose().
| G_MODULE_EXPORT gboolean fl_texture_registrar_unregister_texture | ( | FlTextureRegistrar * | registrar, |
| FlTexture * | texture | ||
| ) |
fl_texture_registrar_unregister_texture: @registrar: an #FlTextureRegistrar. @texture: the texture being unregistered.
Unregisters an existing texture object.
Returns: TRUE on success.
Definition at line 207 of file fl_texture_registrar.cc.
| G_DECLARE_FINAL_TYPE | ( | FlTextureRegistrarImpl | , |
| fl_texture_registrar_impl | , | ||
| FL | , | ||
| TEXTURE_REGISTRAR_IMPL | , | ||
| GObject | |||
| ) |
Definition at line 16 of file fl_texture_registrar.cc.
References engine.
| G_DEFINE_TYPE_WITH_CODE | ( | FlTextureRegistrarImpl | , |
| fl_texture_registrar_impl | , | ||
| G_TYPE_OBJECT | , | ||
| G_IMPLEMENT_INTERFACE(fl_texture_registrar_get_type(), fl_texture_registrar_impl_iface_init) | |||
| ) |
Definition at line 47 of file fl_texture_registrar.cc.
|
static |
Definition at line 107 of file fl_texture_registrar.cc.
References self, texture, and texture_id.
Referenced by fl_texture_registrar_impl_iface_init().
|
static |
Definition at line 117 of file fl_texture_registrar.cc.
References engine, fl_engine_mark_texture_frame_available(), fl_texture_get_id(), g_autoptr(), self, and texture.
Referenced by fl_texture_registrar_impl_iface_init(), and G_DECLARE_INTERFACE().
|
static |
Definition at line 75 of file fl_texture_registrar.cc.
References engine, fl_engine_register_external_texture(), fl_texture_set_id(), g_autoptr(), g_hash_table_insert(), self, texture, and TRUE.
Referenced by fl_mock_texture_registrar_iface_init(), fl_texture_registrar_impl_iface_init(), and G_DECLARE_INTERFACE().
|
static |
Definition at line 152 of file fl_texture_registrar.cc.
References g_autoptr(), and self.
Referenced by fl_texture_registrar_impl_iface_init().
|
static |
Definition at line 130 of file fl_texture_registrar.cc.
References engine, fl_engine_unregister_external_texture(), fl_texture_get_id(), g_autoptr(), self, and texture.
Referenced by fl_texture_registrar_impl_iface_init(), and G_DECLARE_INTERFACE().