#include "fl_compositor_opengl.h"#include <epoxy/egl.h>#include <epoxy/gl.h>#include "flutter/common/constants.h"#include "flutter/shell/platform/embedder/embedder.h"#include "flutter/shell/platform/linux/fl_compositor_opengl_shader.h"#include "flutter/shell/platform/linux/fl_engine_private.h"#include "flutter/shell/platform/linux/fl_framebuffer.h"Go to the source code of this file.
Classes | |
| struct | _FlCompositorOpenGL |
Functions | |
| static void | fl_compositor_opengl_dispose (GObject *object) |
| static void | fl_compositor_opengl_class_init (FlCompositorOpenGLClass *klass) |
| static void | fl_compositor_opengl_init (FlCompositorOpenGL *self) |
| FlCompositorOpenGL * | fl_compositor_opengl_new (FlOpenGLManager *opengl_manager, gboolean shareable) |
| static void | composite_layer (FlCompositorOpenGL *self, FlFramebuffer *framebuffer, double x, double y, int width, int height) |
| gboolean | fl_compositor_opengl_composite_layers (FlCompositorOpenGL *self, const FlutterLayer **layers, size_t layers_count) |
| void | fl_compositor_opengl_get_frame_size (FlCompositorOpenGL *self, size_t *width, size_t *height) |
| gboolean | fl_compositor_opengl_render (FlCompositorOpenGL *self, cairo_t *cr, GdkWindow *window) |
|
static |
Definition at line 67 of file fl_compositor_opengl.cc.
References fl_compositor_opengl_shader_set_offset(), fl_compositor_opengl_shader_set_scale(), fl_framebuffer_get_height(), fl_framebuffer_get_texture_id(), fl_framebuffer_get_width(), height, self, texture_id, width, x, and y.
Referenced by fl_compositor_opengl_composite_layers().
|
static |
Definition at line 49 of file fl_compositor_opengl.cc.
References fl_compositor_opengl_dispose().
| gboolean fl_compositor_opengl_composite_layers | ( | FlCompositorOpenGL * | compositor, |
| const FlutterLayer ** | layers, | ||
| size_t | layers_count | ||
| ) |
fl_compositor_opengl_composite_layers: @compositor: an #FlCompositorOpenGL. @layers: layers to be composited. @layers_count: number of layers.
Composite layers into the stored frame using the current OpenGL context.
Returns TRUE if successful.
Definition at line 86 of file fl_compositor_opengl.cc.
References FlutterLayer::backing_store, composite_layer(), epoxy_has_gl_extension(), fl_compositor_opengl_shader_use(), fl_framebuffer_get_height(), fl_framebuffer_get_id(), fl_framebuffer_get_width(), fl_framebuffer_new(), FlutterOpenGLBackingStore::framebuffer, height, FlutterSize::height, i, kFlutterLayerContentTypeBackingStore, kFlutterLayerContentTypePlatformView, layers, layers_count, FlutterLayer::offset, FlutterBackingStore::open_gl, self, FlutterLayer::size, TRUE, FlutterLayer::type, FlutterOpenGLFramebuffer::user_data, width, FlutterSize::width, FlutterPoint::x, and FlutterPoint::y.
Referenced by fl_view_renderer_opengl_present_layers(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
|
static |
Definition at line 37 of file fl_compositor_opengl.cc.
References self.
Referenced by fl_compositor_opengl_class_init().
| void fl_compositor_opengl_get_frame_size | ( | FlCompositorOpenGL * | compositor, |
| size_t * | width, | ||
| size_t * | height | ||
| ) |
fl_compositor_opengl_get_frame_size: @compositor: an #FlCompositorOpenGL. @width: location to write frame width in pixels. @height: location to write frame height in pixels.
Get the size of the layer ready for rendering.
Definition at line 225 of file fl_compositor_opengl.cc.
References fl_framebuffer_get_height(), fl_framebuffer_get_width(), height, self, and width.
Referenced by G_DEFINE_TYPE(), TEST_F(), TEST_F(), and wait_for_frame().
|
static |
Definition at line 53 of file fl_compositor_opengl.cc.
| FlCompositorOpenGL * fl_compositor_opengl_new | ( | FlOpenGLManager * | opengl_manager, |
| gboolean | shareable | ||
| ) |
Definition at line 55 of file fl_compositor_opengl.cc.
References fl_compositor_opengl_shader_new(), self, and shareable.
Referenced by fl_view_renderer_opengl_realize(), and FlCompositorOpenGLTest::SetUp().
| gboolean fl_compositor_opengl_render | ( | FlCompositorOpenGL * | compositor, |
| cairo_t * | cr, | ||
| GdkWindow * | window | ||
| ) |
fl_compositor_opengl_render: @compositor: an #FlCompositorOpenGL. @cr: a Cairo rendering context. @window: window being rendered into.
Renders the current frame using the current OpenGL context.
Returns TRUE if successful.
Definition at line 240 of file fl_compositor_opengl.cc.
References fl_framebuffer_create_sibling(), fl_framebuffer_get_height(), fl_framebuffer_get_shareable(), fl_framebuffer_get_texture_id(), fl_framebuffer_get_width(), g_autoptr(), gdk_cairo_draw_from_gl(), gdk_window_get_height(), gdk_window_get_scale_factor(), gdk_window_get_width(), height, self, texture_id, TRUE, width, and window.
Referenced by fl_view_renderer_opengl_draw(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().