#include "flutter/shell/platform/linux/fl_subsurface_egl.h"#include <epoxy/egl.h>#include <epoxy/gl.h>#include <wayland-client.h>#include <wayland-egl.h>#include "flutter/shell/platform/linux/fl_compositor_opengl_shader.h"Go to the source code of this file.
Classes | |
| struct | _FlSubsurfaceEGL |
Functions | |
| static size_t | round_to_scale (size_t size, gint scale) |
| static EGLDisplay | get_display (FlSubsurfaceEGL *self) |
| static void | setup (FlSubsurfaceEGL *self, size_t width, size_t height, gint scale) |
| static void | fl_subsurface_egl_dispose (GObject *object) |
| static void | fl_subsurface_egl_class_init (FlSubsurfaceEGLClass *klass) |
| static void | fl_subsurface_egl_init (FlSubsurfaceEGL *self) |
| FlSubsurfaceEGL * | fl_subsurface_egl_new (FlOpenGLManager *opengl_manager, FlSubsurface *subsurface, size_t width, size_t height, gint scale) |
| void | fl_subsurface_egl_resize (FlSubsurfaceEGL *self, size_t width, size_t height) |
| void | fl_subsurface_egl_present (FlSubsurfaceEGL *self, GLuint texture_id, size_t width, size_t height, FlGLFence *fence) |
|
static |
Definition at line 212 of file fl_subsurface_egl.cc.
References fl_subsurface_egl_dispose().
|
static |
Definition at line 174 of file fl_subsurface_egl.cc.
References get_display().
Referenced by fl_subsurface_egl_class_init().
|
static |
Definition at line 216 of file fl_subsurface_egl.cc.
| FlSubsurfaceEGL* fl_subsurface_egl_new | ( | FlOpenGLManager * | opengl_manager, |
| FlSubsurface * | subsurface, | ||
| size_t | width, | ||
| size_t | height, | ||
| gint | scale | ||
| ) |
Definition at line 221 of file fl_subsurface_egl.cc.
References height, scale, setup(), subsurface, and width.
Referenced by FlSubsurfaceEGLTest::CreateEGL().
| void fl_subsurface_egl_present | ( | FlSubsurfaceEGL * | egl, |
| GLuint | texture_id, | ||
| size_t | width, | ||
| size_t | height, | ||
| FlGLFence * | fence | ||
| ) |
fl_subsurface_egl_present: @egl: an #FlSubsurfaceEGL. @texture_id: the OpenGL texture holding the frame to present. @width: the frame width in pixels. @height: the frame height in pixels. @fence: (allow-none): an #FlGLFence reached when @texture_id has finished rendering, or NULL if the rendering is known to have completed.
Blits @texture_id to the subsurface window surface and swaps buffers, then restores the engine's rendering context. @texture_id must have been rendered by the engine (or a context sharing resources with it).
The frame is presented using the subsurface's own context, so @fence is waited for once that context is current.
Definition at line 250 of file fl_subsurface_egl.cc.
References fl_compositor_opengl_shader_set_offset(), fl_compositor_opengl_shader_set_scale(), fl_compositor_opengl_shader_use(), fl_gl_fence_wait(), fl_opengl_manager_make_current(), get_display(), height, round_to_scale(), texture_id, and width.
Referenced by TEST_F().
| void fl_subsurface_egl_resize | ( | FlSubsurfaceEGL * | egl, |
| size_t | width, | ||
| size_t | height | ||
| ) |
fl_subsurface_egl_resize: @egl: an #FlSubsurfaceEGL. @width: the new width in pixels. @height: the new height in pixels.
Resizes the native Wayland window backing the EGL surface.
Definition at line 236 of file fl_subsurface_egl.cc.
References height, round_to_scale(), and width.
Referenced by TEST_F().
|
static |
Definition at line 76 of file fl_subsurface_egl.cc.
References fl_opengl_manager_get_display().
Referenced by fl_subsurface_egl_dispose(), fl_subsurface_egl_present(), and setup().
|
static |
Definition at line 70 of file fl_subsurface_egl.cc.
References scale.
Referenced by fl_subsurface_egl_present(), and fl_subsurface_egl_resize().
|
static |
Definition at line 83 of file fl_subsurface_egl.cc.
References fl_compositor_opengl_shader_new(), fl_opengl_manager_can_blit(), fl_opengl_manager_clear_current(), fl_opengl_manager_get_context(), fl_subsurface_get_surface(), get_display(), height, scale, and width.
Referenced by fl_subsurface_egl_new().