#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 = kRealBufferWidth |
| 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.
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, and width.
Referenced by fl_compositor_opengl_class_init().
|
static |
Definition at line 334 of file fl_compositor_opengl.cc.
| 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, and shareable.
Referenced by FlCompositorOpenGLTest::SetUp(), and setup_opengl().
|
static |
Definition at line 64 of file fl_compositor_opengl.cc.
References 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(), framebuffer, glBindTexture(), height, i, layers, layers_count, TRUE, and width.
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(), glBindTexture(), height, kCompositorRenderTimeoutMicroseconds, texture_id, TRUE, and width.
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(), fl_compositor_opengl_present_layers(), and TEST_F().
| * height |
Definition at line 50 of file fl_compositor_opengl.cc.
Referenced by flutter::PixelBufferTexture::CopyPixelBuffer(), fl_accessible_node_get_extents(), fl_accessible_node_set_extents(), fl_accessible_node_set_extents_impl(), fl_compositor_get_frame_size(), fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), fl_compositor_opengl_render(), fl_engine_gl_external_texture_frame_callback(), fl_engine_start(), fl_framebuffer_new(), fl_pixel_buffer_texture_populate(), fl_test_texture_populate(), fl_texture_gl_populate(), G_DECLARE_DERIVABLE_TYPE(), handle_geometry_changed(), flutter::GpuSurfaceTexture::ObtainDescriptor(), redraw_cb(), flutter::TextureRegistrarImpl::RegisterTexture(), set_marked_text_rect(), flutter::TEST(), and TEST_F().
| 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 create_egl_image(), fl_compositor_opengl_render(), fl_engine_gl_external_texture_frame_callback(), fl_engine_mark_texture_frame_available(), fl_engine_register_external_texture(), fl_engine_unregister_external_texture(), fl_texture_registrar_lookup_texture(), lookup_texture(), flutter::TextureRegistrarImpl::MarkTextureFrameAvailable(), flutter::TextureRegistrarImpl::RegisterTexture(), TEST(), TEST_F(), and flutter::TextureRegistrarImpl::UnregisterTexture().
| * width = kRealBufferWidth |
Definition at line 49 of file fl_compositor_opengl.cc.
Referenced by flutter::PixelBufferTexture::CopyPixelBuffer(), fl_accessible_node_get_extents(), fl_accessible_node_set_extents(), fl_accessible_node_set_extents_impl(), fl_compositor_get_frame_size(), fl_compositor_opengl_get_frame_size(), fl_compositor_opengl_present_layers(), fl_compositor_opengl_render(), fl_engine_gl_external_texture_frame_callback(), fl_framebuffer_new(), fl_pixel_buffer_texture_populate(), fl_test_texture_populate(), fl_texture_gl_populate(), G_DECLARE_DERIVABLE_TYPE(), handle_geometry_changed(), flutter::GpuSurfaceTexture::ObtainDescriptor(), redraw_cb(), flutter::TextureRegistrarImpl::RegisterTexture(), set_marked_text_rect(), flutter::TEST(), and TEST_F().
| FlFramebuffer double x |
Definition at line 47 of file fl_compositor_opengl.cc.
Referenced by button_press_event_cb(), button_release_event_cb(), ensure_pointer_added(), ensure_touch_added(), enter_notify_event_cb(), fl_accessible_node_get_extents(), fl_accessible_node_set_extents(), fl_accessible_node_set_extents_impl(), fl_compositor_opengl_shader_set_offset(), fl_compositor_opengl_shader_set_scale(), fl_engine_send_mouse_pointer_event(), fl_engine_send_pointer_pan_zoom_event(), fl_engine_send_touch_add_event(), fl_engine_send_touch_down_event(), fl_engine_send_touch_move_event(), fl_engine_send_touch_remove_event(), fl_engine_send_touch_up_event(), fl_pointer_manager_handle_button_press(), fl_pointer_manager_handle_button_release(), fl_pointer_manager_handle_enter(), fl_pointer_manager_handle_leave(), fl_pointer_manager_handle_motion(), fl_scrolling_manager_set_last_mouse_position(), fl_touch_manager_handle_touch_event(), leave_notify_event_cb(), motion_notify_event_cb(), set_marked_text_rect(), set_scrolling_position(), TEST_F(), and update_im_cursor_position().
| FlFramebuffer double double y |
Definition at line 48 of file fl_compositor_opengl.cc.
Referenced by button_press_event_cb(), button_release_event_cb(), ensure_pointer_added(), ensure_touch_added(), enter_notify_event_cb(), fl_accessible_node_get_extents(), fl_accessible_node_set_extents(), fl_accessible_node_set_extents_impl(), fl_compositor_opengl_shader_set_offset(), fl_compositor_opengl_shader_set_scale(), fl_engine_send_mouse_pointer_event(), fl_engine_send_pointer_pan_zoom_event(), fl_engine_send_touch_add_event(), fl_engine_send_touch_down_event(), fl_engine_send_touch_move_event(), fl_engine_send_touch_remove_event(), fl_engine_send_touch_up_event(), fl_pointer_manager_handle_button_press(), fl_pointer_manager_handle_button_release(), fl_pointer_manager_handle_enter(), fl_pointer_manager_handle_leave(), fl_pointer_manager_handle_motion(), fl_scrolling_manager_set_last_mouse_position(), fl_touch_manager_handle_touch_event(), leave_notify_event_cb(), motion_notify_event_cb(), set_marked_text_rect(), set_scrolling_position(), TEST_F(), and update_im_cursor_position().