Flutter Linux Embedder
fl_texture_registrar_private.h File Reference

Go to the source code of this file.

Functions

G_BEGIN_DECLS FlTextureRegistrar * fl_texture_registrar_new (FlEngine *engine)
 
FlTexture * fl_texture_registrar_lookup_texture (FlTextureRegistrar *registrar, int64_t texture_id)
 

Function Documentation

◆ fl_texture_registrar_lookup_texture()

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 191 of file fl_texture_registrar.cc.

192  {
193  g_return_val_if_fail(FL_IS_TEXTURE_REGISTRAR(self), NULL);
194 
195  return FL_TEXTURE_REGISTRAR_GET_IFACE(self)->lookup_texture(self, texture_id);
196 }

References texture_id.

Referenced by fl_engine_gl_external_texture_frame_callback(), and TEST().

◆ fl_texture_registrar_new()

G_BEGIN_DECLS 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 216 of file fl_texture_registrar.cc.

216  {
217  FlTextureRegistrarImpl* self = FL_TEXTURE_REGISTRAR_IMPL(
218  g_object_new(fl_texture_registrar_impl_get_type(), nullptr));
219 
220  // Added to stop compiler complaining about an unused function.
221  FL_IS_TEXTURE_REGISTRAR_IMPL(self);
222 
223  self->engine = engine;
224  g_object_weak_ref(G_OBJECT(engine), engine_weak_notify_cb, self);
225 
226  return FL_TEXTURE_REGISTRAR(self);
227 }

References engine, and engine_weak_notify_cb().

Referenced by fl_engine_init(), and TEST().

engine_weak_notify_cb
static void engine_weak_notify_cb(gpointer user_data, GObject *where_the_object_was)
Definition: fl_texture_registrar.cc:57
engine
FlEngine * engine
Definition: fl_view_accessible.cc:26
texture_id
int64_t texture_id
Definition: texture_registrar_unittests.cc:24