Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Functions
fl_texture_registrar_private.h File Reference
#include "flutter/shell/platform/embedder/embedder.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_engine.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_texture_registrar.h"

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}
int64_t texture_id

◆ 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}
FlutterEngine engine
Definition main.cc:68
static void engine_weak_notify_cb(gpointer user_data, GObject *where_the_object_was)