#include <epoxy/gl.h>#include <gtk/gtk.h>#include "flutter/shell/platform/linux/fl_gl_fence.h"#include "flutter/shell/platform/linux/fl_opengl_manager.h"#include "flutter/shell/platform/linux/fl_subsurface.h"Go to the source code of this file.
Functions | |
| G_BEGIN_DECLS | G_DECLARE_FINAL_TYPE (FlSubsurfaceEGL, fl_subsurface_egl, FL, SUBSURFACE_EGL, GObject) FlSubsurfaceEGL *fl_subsurface_egl_new(FlOpenGLManager *opengl_manager |
| void | fl_subsurface_egl_resize (FlSubsurfaceEGL *egl, size_t width, size_t height) |
| void | fl_subsurface_egl_present (FlSubsurfaceEGL *egl, GLuint texture_id, size_t width, size_t height, FlGLFence *fence) |
Variables | |
| G_BEGIN_DECLS FlSubsurface * | subsurface |
| G_BEGIN_DECLS FlSubsurface size_t | width |
| G_BEGIN_DECLS FlSubsurface size_t size_t | height |
| G_BEGIN_DECLS FlSubsurface size_t size_t gint | scale |
| 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().
| G_BEGIN_DECLS G_DECLARE_FINAL_TYPE | ( | FlSubsurfaceEGL | , |
| fl_subsurface_egl | , | ||
| FL | , | ||
| SUBSURFACE_EGL | , | ||
| GObject | |||
| ) |
FlSubsurfaceEGL:
#FlSubsurfaceEGL manages the EGL context and window surface used to present engine frames onto a Wayland subsurface. Its context shares resources with the engine's render context, so the engine's frame texture can be blitted to the subsurface directly, without using EGLImage. fl_subsurface_egl_new: @opengl_manager: the #FlOpenGLManager providing the engine's EGL display and share context. @subsurface: the #FlSubsurface to present onto. @width: the surface width in logical pixels. @height: the surface height in logical pixels. @scale: the surface buffer scale.
Creates the EGL context and window surface for presenting frames onto @subsurface. A reference is kept on @subsurface, so its Wayland surface is guaranteed to outlive the EGL surface created here. If this fails a warning is printed and the returned object will fail to present frames, generating the usual EGL/OpenGL errors.
Returns: a new #FlSubsurfaceEGL.
| G_BEGIN_DECLS FlSubsurface size_t size_t height |
Definition at line 52 of file fl_subsurface_egl.h.
| G_BEGIN_DECLS FlSubsurface size_t size_t gint scale |
Definition at line 53 of file fl_subsurface_egl.h.
Referenced by fl_engine_send_pointer_pan_zoom_event(), fl_scrolling_manager_handle_zoom_update(), fl_subsurface_egl_new(), gesture_zoom_update_cb(), round_to_scale(), setup(), and TEST_F().
| G_BEGIN_DECLS FlSubsurface* subsurface |
Definition at line 50 of file fl_subsurface_egl.h.
Referenced by fl_subsurface_egl_new(), and TEST_F().
| G_BEGIN_DECLS FlSubsurface size_t width |
Definition at line 51 of file fl_subsurface_egl.h.