Flutter Linux Embedder
fl_gl_area.h File Reference

Go to the source code of this file.

Functions

G_BEGIN_DECLS GtkWidget * fl_gl_area_new (GdkGLContext *context)
 
void fl_gl_area_queue_render (FlGLArea *area, GPtrArray *textures)
 

Function Documentation

◆ fl_gl_area_new()

G_BEGIN_DECLS GtkWidget* fl_gl_area_new ( GdkGLContext *  context)

FlGLArea:

#FlGLArea is a OpenGL drawing area that shows Flutter backing store Layer. fl_gl_area_new: @context: an #GdkGLContext.

Creates a new #FlGLArea widget.

Returns: the newly created #FlGLArea widget.

Definition at line 121 of file fl_gl_area.cc.

121  {
122  g_return_val_if_fail(GDK_IS_GL_CONTEXT(context), nullptr);
123  FlGLArea* area =
124  reinterpret_cast<FlGLArea*>(g_object_new(fl_gl_area_get_type(), nullptr));
125  area->context = GDK_GL_CONTEXT(g_object_ref(context));
126  return GTK_WIDGET(area);
127 }

Referenced by fl_view_set_textures().

◆ fl_gl_area_queue_render()

void fl_gl_area_queue_render ( FlGLArea *  area,
GPtrArray *  textures 
)

fl_gl_area_queue_render: @area: an #FlGLArea. @textures: (transfer none) (element-type FlBackingStoreProvider): a list of #FlBackingStoreProvider.

Queues textures to be drawn later.

Definition at line 129 of file fl_gl_area.cc.

129  {
130  g_return_if_fail(FL_IS_GL_AREA(self));
131 
132  g_clear_pointer(&self->textures, g_ptr_array_unref);
133  self->textures = g_ptr_array_ref(textures);
134 
135  gtk_widget_queue_draw(GTK_WIDGET(self));
136 }

References self.

Referenced by fl_view_set_textures().

self
GdkEvent FlView * self
Definition: fl_view.cc:100