#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 | |
| G_DEFINE_TYPE (FlCompositorOpenGL, fl_compositor_opengl, fl_compositor_get_type()) static void composite_layer(FlCompositorOpenGL *self | |
| fl_compositor_opengl_shader_set_offset (self->shader,(2 *x/width) - 1.0,(2 *y/height) - 1.0) | |
| fl_compositor_opengl_shader_set_scale (self->shader, texture_width/width, texture_height/height) | |
| glBindTexture (GL_TEXTURE_2D, texture_id) | |
| glDrawArrays (GL_TRIANGLES, 0, 6) | |
| static gboolean | fl_compositor_opengl_present_layers (FlCompositor *compositor, const FlutterLayer **layers, size_t layers_count) |
| static void | fl_compositor_opengl_get_frame_size (FlCompositor *compositor, size_t *width, size_t *height) |
| static gboolean | fl_compositor_opengl_render (FlCompositor *compositor, cairo_t *cr, GdkWindow *window, gboolean wait_for_frame) |
| 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 (FlTaskRunner *task_runner, FlOpenGLManager *opengl_manager, gboolean shareable) |
Variables | |
| FlFramebuffer * | framebuffer |
| FlFramebuffer double | x |
| FlFramebuffer double double | y |
| FlFramebuffer double double int | width |
| FlFramebuffer double double int int | height |
| size_t | texture_height = fl_framebuffer_get_height(framebuffer) |
| GLuint | texture_id = fl_framebuffer_get_texture_id(framebuffer) |
|
static |
Definition at line 324 of file fl_compositor_opengl.cc.
References fl_compositor_opengl_dispose(), fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), and fl_compositor_opengl_render().
|
static |
Definition at line 310 of file fl_compositor_opengl.cc.
References self.
Referenced by fl_compositor_opengl_class_init().
|
static |
Definition at line 211 of file fl_compositor_opengl.cc.
References fl_framebuffer_get_height(), fl_framebuffer_get_width(), g_autoptr(), height, self, and width.
Referenced by fl_compositor_opengl_class_init().
|
static |
Definition at line 334 of file fl_compositor_opengl.cc.
References self.
| FlCompositorOpenGL * fl_compositor_opengl_new | ( | FlTaskRunner * | task_runner, |
| FlOpenGLManager * | opengl_manager, | ||
| gboolean | shareable | ||
| ) |
Definition at line 338 of file fl_compositor_opengl.cc.
References fl_compositor_opengl_shader_new(), opengl_manager, self, and shareable.
Referenced by FlCompositorOpenGLTest::SetUp(), and setup_opengl().
|
static |
Definition at line 64 of file fl_compositor_opengl.cc.
References FlutterLayer::backing_store, epoxy_has_gl_extension(), fl_compositor_opengl_shader_use(), fl_framebuffer_get_height(), fl_framebuffer_get_id(), fl_framebuffer_get_width(), fl_framebuffer_new(), fl_task_runner_stop_wait(), FlutterOpenGLBackingStore::framebuffer, framebuffer, glBindTexture(), FlutterSize::height, height, i, kFlutterLayerContentTypeBackingStore, kFlutterLayerContentTypePlatformView, layers, layers_count, FlutterLayer::offset, FlutterBackingStore::open_gl, self, FlutterLayer::size, TRUE, FlutterLayer::type, FlutterOpenGLFramebuffer::user_data, FlutterSize::width, width, FlutterPoint::x, and FlutterPoint::y.
Referenced by fl_compositor_opengl_class_init().
|
static |
Definition at line 230 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(), fl_task_runner_wait(), g_autoptr(), gdk_cairo_draw_from_gl(), gdk_window_get_height(), gdk_window_get_scale_factor(), gdk_window_get_width(), glBindTexture(), height, kCompositorRenderTimeoutMicroseconds, self, texture_id, TRUE, width, and window.
Referenced by fl_compositor_opengl_class_init().
| fl_compositor_opengl_shader_set_scale | ( | self-> | shader, |
| texture_width/ | width, | ||
| texture_height/ | height | ||
| ) |
| G_DEFINE_TYPE | ( | FlCompositorOpenGL | , |
| fl_compositor_opengl | , | ||
| fl_compositor_get_type() | |||
| ) |
| glBindTexture | ( | GL_TEXTURE_2D | , |
| texture_id | |||
| ) |
| glDrawArrays | ( | GL_TRIANGLES | , |
| 0 | , | ||
| 6 | |||
| ) |
| FlFramebuffer* framebuffer |
Definition at line 46 of file fl_compositor_opengl.cc.
Referenced by create_opengl_backing_store(), impeller::ProcTableGLES::DescribeCurrentFramebuffer(), fl_compositor_opengl_present_layers(), impeller::ProcTableGLES::IsCurrentFramebufferComplete(), MakeRenderTargetFromBackingStoreImpeller(), MakeSkSurfaceFromBackingStore(), impeller::testing::mockBindFramebuffer(), flutter::testing::TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), TEST_F(), and TEST_F().
| FlFramebuffer double double int int height |
Definition at line 50 of file fl_compositor_opengl.cc.
Referenced by fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), and fl_compositor_opengl_render().
| size_t texture_height = fl_framebuffer_get_height(framebuffer) |
Definition at line 52 of file fl_compositor_opengl.cc.
| GLuint texture_id = fl_framebuffer_get_texture_id(framebuffer) |
Definition at line 58 of file fl_compositor_opengl.cc.
Referenced by fl_compositor_opengl_render().
| FlFramebuffer double double int width |
Definition at line 49 of file fl_compositor_opengl.cc.
Referenced by fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), and fl_compositor_opengl_render().
| FlFramebuffer double x |
Definition at line 47 of file fl_compositor_opengl.cc.
| FlFramebuffer double double y |
Definition at line 48 of file fl_compositor_opengl.cc.