#include <gtk/gtk.h>#include "flutter/shell/platform/embedder/embedder.h"#include "flutter/shell/platform/linux/fl_compositor_opengl.h"Go to the source code of this file.
Functions | |
| G_BEGIN_DECLS FlOpenGLFrame * | fl_opengl_frame_new () |
| void | fl_opengl_frame_composite (FlOpenGLFrame *frame, FlCompositorOpenGL *compositor, const FlutterLayer **layers, size_t layers_count) |
| void | fl_opengl_frame_get_size (FlOpenGLFrame *frame, size_t *width, size_t *height) |
| gboolean | fl_opengl_frame_draw (FlOpenGLFrame *frame, cairo_t *cr, GdkWindow *window, gint scale_factor, size_t width, size_t height) |
| void fl_opengl_frame_composite | ( | FlOpenGLFrame * | frame, |
| FlCompositorOpenGL * | compositor, | ||
| const FlutterLayer ** | layers, | ||
| size_t | layers_count | ||
| ) |
fl_opengl_frame_composite: @frame: an #FlOpenGLFrame. @compositor: the #FlCompositorOpenGL to composite with. @layers: layers to composite. @layers_count: number of layers.
Composites @layers into the frame, (re)creating the underlying framebuffer to match the frame size and copying the result into CPU memory. Must be called with an OpenGL context current.
Definition at line 52 of file fl_opengl_frame.cc.
References fl_compositor_opengl_composite_layers(), fl_compositor_opengl_get_frame_format(), fl_framebuffer_get_height(), fl_framebuffer_get_id(), fl_framebuffer_get_width(), fl_framebuffer_new(), height, layers, layers_count, and width.
Referenced by TEST_F().
| gboolean fl_opengl_frame_draw | ( | FlOpenGLFrame * | frame, |
| cairo_t * | cr, | ||
| GdkWindow * | window, | ||
| gint | scale_factor, | ||
| size_t | width, | ||
| size_t | height | ||
| ) |
fl_opengl_frame_draw: @frame: an #FlOpenGLFrame. @cr: the Cairo context to draw into. @window: the #GdkWindow being drawn. @scale_factor: the window scale factor. @width: the width to draw in pixels. @height: the height to draw in pixels.
Draws the current frame into @cr. Must be called with an OpenGL context current.
Returns: TRUE if a frame was drawn.
Definition at line 136 of file fl_opengl_frame.cc.
References fl_framebuffer_get_height(), fl_framebuffer_get_width(), height, texture_id, TRUE, and width.
Referenced by TEST_F().
| void fl_opengl_frame_get_size | ( | FlOpenGLFrame * | frame, |
| size_t * | width, | ||
| size_t * | height | ||
| ) |
fl_opengl_frame_get_size: @frame: an #FlOpenGLFrame. @width: (out): location for the width in pixels. @height: (out): location for the height in pixels.
Gets the size of the current frame in pixels. The size is zero if no frame has been composited yet.
Definition at line 122 of file fl_opengl_frame.cc.
References fl_framebuffer_get_height(), fl_framebuffer_get_width(), height, and width.
Referenced by TEST_F().
| G_BEGIN_DECLS FlOpenGLFrame* fl_opengl_frame_new | ( | ) |
FlOpenGLFrame:
#FlOpenGLFrame manages the OpenGL framebuffer a rendered frame is composited into and presented from.
When the frame can be shared between OpenGL contexts (EGL) the framebuffer is presented directly. Otherwise (GLX) the composited frame is copied into a CPU buffer so it can be re-uploaded in the presenting context. fl_opengl_frame_new:
Creates a new object that manages the framebuffer and CPU pixel copy a rendered frame is composited into.
Returns: a new #FlOpenGLFrame.
Definition at line 48 of file fl_opengl_frame.cc.
Referenced by TEST_F().