#include "fl_framebuffer.h"#include <epoxy/egl.h>#include <epoxy/gl.h>#include "flutter/shell/platform/linux/fl_egl_image.h"Go to the source code of this file.
Classes | |
| struct | _FlFramebuffer |
Functions | |
| static void | fl_framebuffer_dispose (GObject *object) |
| static void | fl_framebuffer_class_init (FlFramebufferClass *klass) |
| static void | fl_framebuffer_init (FlFramebuffer *self) |
| FlFramebuffer * | fl_framebuffer_new (GLint format, size_t width, size_t height, gboolean shareable) |
| gboolean | fl_framebuffer_get_shareable (FlFramebuffer *self) |
| FlFramebuffer * | fl_framebuffer_create_sibling (FlFramebuffer *self) |
| GLuint | fl_framebuffer_get_id (FlFramebuffer *self) |
| GLuint | fl_framebuffer_get_texture_id (FlFramebuffer *self) |
| size_t | fl_framebuffer_get_width (FlFramebuffer *self) |
| size_t | fl_framebuffer_get_height (FlFramebuffer *self) |
|
static |
Definition at line 47 of file fl_framebuffer.cc.
References fl_framebuffer_dispose().
| FlFramebuffer* fl_framebuffer_create_sibling | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_create_sibling: @framebuffer: an #FlFramebuffer.
Creates a new framebuffer with the same backing texture as the original. This uses EGLImage to share the texture and allows a framebuffer created in one OpenGL context to be used in another.
Returns: a new #FlFramebuffer.
Definition at line 104 of file fl_framebuffer.cc.
References fl_egl_image_get_image().
Referenced by fl_compositor_opengl_render(), and TEST().
|
static |
| size_t fl_framebuffer_get_height | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_height: @framebuffer: an #FlFramebuffer.
Gets the height of the framebuffer in pixels.
Returns: height in pixels.
Definition at line 145 of file fl_framebuffer.cc.
Referenced by composite_layer(), fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), and fl_compositor_opengl_render().
| GLuint fl_framebuffer_get_id | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_id: @framebuffer: an #FlFramebuffer.
Gets the ID for this framebuffer.
Returns: OpenGL framebuffer id or 0 if creation failed.
Definition at line 133 of file fl_framebuffer.cc.
Referenced by create_opengl_backing_store(), and fl_compositor_opengl_present_layers().
| gboolean fl_framebuffer_get_shareable | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_shareable: @framebuffer: an #FlFramebuffer.
Checks if this framebuffer can be shared between contexts (using fl_framebuffer_create_sibling).
Returns: TRUE if this framebuffer can be shared.
Definition at line 99 of file fl_framebuffer.cc.
Referenced by fl_compositor_opengl_render().
| GLuint fl_framebuffer_get_texture_id | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_texture_id: @framebuffer: an #FlFramebuffer.
Gets the ID of the texture associated with this framebuffer.
Returns: OpenGL texture id or 0 if creation failed.
Definition at line 137 of file fl_framebuffer.cc.
Referenced by composite_layer(), and fl_compositor_opengl_render().
| size_t fl_framebuffer_get_width | ( | FlFramebuffer * | framebuffer | ) |
fl_framebuffer_get_width: @framebuffer: an #FlFramebuffer.
Gets the width of the framebuffer in pixels.
Returns: width in pixels.
Definition at line 141 of file fl_framebuffer.cc.
Referenced by composite_layer(), fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), and fl_compositor_opengl_render().
|
static |
Definition at line 51 of file fl_framebuffer.cc.
| FlFramebuffer* fl_framebuffer_new | ( | GLint | format, |
| size_t | width, | ||
| size_t | height, | ||
| gboolean | shareable | ||
| ) |
FlFramebuffer:
#FlFramebuffer creates framebuffers and their backing textures for use by the Flutter compositor. fl_framebuffer_new: @format: format, e.g. GL_RGB, GL_BGR @width: width of texture. @height: height of texture. @shareable: TRUE if this framebuffer can be shared between contexts (requires EGL).
Creates a new frame buffer. Requires a valid OpenGL context to create.
Returns: a new #FlFramebuffer.
Definition at line 53 of file fl_framebuffer.cc.
References fl_egl_image_new(), format, height, shareable, and width.
Referenced by create_opengl_backing_store(), fl_compositor_opengl_present_layers(), and TEST().