#include <gtk/gtk.h>
#include "flutter/shell/platform/linux/public/flutter_linux/fl_dart_project.h"
#include "flutter/shell/platform/linux/public/flutter_linux/fl_view.h"
#include "flutter/shell/platform/embedder/embedder.h"
Go to the source code of this file.
Classes | |
struct | _FlRendererClass |
Enumerations | |
enum | FlRendererError { FL_RENDERER_ERROR_FAILED } |
Functions | |
GQuark | fl_renderer_error_quark (void) G_GNUC_CONST |
gboolean | fl_renderer_start (FlRenderer *renderer, FlView *view) |
: a function name. | |
fl_renderer_get_proc_address: @renderer: an #FlRenderer. Gets the rendering API function that matches the given name. Returns: a function pointer. | |
void * | fl_renderer_get_proc_address (FlRenderer *renderer, const char *name) |
void | fl_renderer_make_current (FlRenderer *renderer) |
void | fl_renderer_make_resource_current (FlRenderer *renderer) |
void | fl_renderer_clear_current (FlRenderer *renderer) |
guint32 | fl_renderer_get_fbo (FlRenderer *renderer) |
gboolean | fl_renderer_create_backing_store (FlRenderer *renderer, const FlutterBackingStoreConfig *config, FlutterBackingStore *backing_store_out) |
gboolean | fl_renderer_collect_backing_store (FlRenderer *renderer, const FlutterBackingStore *backing_store) |
gboolean | fl_renderer_present_layers (FlRenderer *renderer, const FlutterLayer **layers, size_t layers_count) |
void | fl_renderer_wait_for_frame (FlRenderer *renderer, int target_width, int target_height) |
void | fl_renderer_setup (FlRenderer *renderer) |
void | fl_renderer_render (FlRenderer *renderer, int width, int height) |
void | fl_renderer_cleanup (FlRenderer *renderer) |
gdouble | fl_renderer_get_refresh_rate (FlRenderer *renderer) |
enum FlRendererError |
FlRendererError: Errors for #FlRenderer objects to set on failures.
Enumerator | |
---|---|
FL_RENDERER_ERROR_FAILED |
Definition at line 22 of file fl_renderer.h.
void fl_renderer_cleanup | ( | FlRenderer * | renderer | ) |
fl_renderer_cleanup:
Removes OpenGL resources used for rendering. Requires an active OpenGL context.
Definition at line 392 of file fl_renderer.cc.
References priv.
Referenced by unrealize_cb().
void fl_renderer_clear_current | ( | FlRenderer * | renderer | ) |
fl_renderer_clear_current: @renderer: an #FlRenderer.
Clears the current rendering context.
Definition at line 155 of file fl_renderer.cc.
Referenced by fl_engine_gl_clear_current().
gboolean fl_renderer_collect_backing_store | ( | FlRenderer * | renderer, |
const FlutterBackingStore * | backing_store | ||
) |
fl_renderer_collect_backing_store: @renderer: an #FlRenderer. @backing_store: backing store to be released.
A callback invoked by the engine to release the backing store. The embedder may collect any resources associated with the backing store.
Returns TRUE if successful.
Definition at line 201 of file fl_renderer.cc.
References fl_renderer_make_current(), and TRUE.
Referenced by compositor_collect_backing_store_callback().
gboolean fl_renderer_create_backing_store | ( | FlRenderer * | renderer, |
const FlutterBackingStoreConfig * | config, | ||
FlutterBackingStore * | backing_store_out | ||
) |
fl_renderer_create_backing_store: @renderer: an #FlRenderer. @config: backing store config. @backing_store_out: saves created backing store.
Obtain a backing store for a specific #FlutterLayer.
Returns TRUE if successful.
Definition at line 172 of file fl_renderer.cc.
References fl_backing_store_provider_get_gl_format(), fl_backing_store_provider_get_gl_framebuffer_id(), fl_backing_store_provider_new(), fl_renderer_make_current(), format, and TRUE.
Referenced by compositor_create_backing_store_callback().
GQuark fl_renderer_error_quark | ( | void | ) |
guint32 fl_renderer_get_fbo | ( | FlRenderer * | renderer | ) |
fl_renderer_get_fbo: @renderer: an #FlRenderer.
Gets the frame buffer object to render to.
Returns: a frame buffer object index.
Definition at line 165 of file fl_renderer.cc.
Referenced by fl_engine_gl_get_fbo().
void* fl_renderer_get_proc_address | ( | FlRenderer * | renderer, |
const char * | name | ||
) |
gdouble fl_renderer_get_refresh_rate | ( | FlRenderer * | renderer | ) |
fl_renderer_get_refresh_rate: @renderer: an #FlRenderer.
Returns: The refresh rate of the display in Hz. If the refresh rate is not available, returns -1.0.
Definition at line 160 of file fl_renderer.cc.
Referenced by fl_engine_start(), and TEST().
void fl_renderer_make_current | ( | FlRenderer * | renderer | ) |
fl_renderer_make_current: @renderer: an #FlRenderer.
Makes the rendering context current.
Definition at line 145 of file fl_renderer.cc.
Referenced by fl_engine_gl_make_current(), fl_renderer_collect_backing_store(), fl_renderer_create_backing_store(), realize_cb(), and unrealize_cb().
void fl_renderer_make_resource_current | ( | FlRenderer * | renderer | ) |
fl_renderer_make_resource_current: @renderer: an #FlRenderer.
Makes the resource rendering context current.
Definition at line 150 of file fl_renderer.cc.
Referenced by fl_engine_gl_make_resource_current().
gboolean fl_renderer_present_layers | ( | FlRenderer * | renderer, |
const FlutterLayer ** | layers, | ||
size_t | layers_count | ||
) |
fl_renderer_present_layers: @renderer: an #FlRenderer. @layers: layers to be composited. @layers_count: number of layers.
Callback invoked by the engine to composite the contents of each layer onto the screen.
Returns TRUE if successful.
Definition at line 230 of file fl_renderer.cc.
References fl_renderer_unblock_main_thread(), fl_view_redraw(), i, priv, and TRUE.
Referenced by compositor_present_layers_callback(), and TEST().
void fl_renderer_render | ( | FlRenderer * | renderer, |
int | width, | ||
int | height | ||
) |
fl_renderer_render: @renderer: an #FlRenderer. @width: width of the window in pixels. @height: height of the window in pixels.
Performs OpenGL commands to render current Flutter view.
Definition at line 320 of file fl_renderer.cc.
References fl_backing_store_provider_get_geometry(), fl_backing_store_provider_get_gl_texture_id(), height, i, pixels_to_gl_coords(), priv, texture_id, and width.
Referenced by render_cb(), and TEST().
void fl_renderer_setup | ( | FlRenderer * | renderer | ) |
fl_renderer_setup: @renderer: an #FlRenderer.
Creates OpenGL resources required before rendering. Requires an active OpenGL context.
Definition at line 278 of file fl_renderer.cc.
References fragment_shader_src, get_program_log(), get_shader_log(), priv, and vertex_shader_src.
Referenced by realize_cb().
gboolean fl_renderer_start | ( | FlRenderer * | renderer, |
FlView * | view | ||
) |
fl_renderer_start: @renderer: an #FlRenderer. @view: the view Flutter is renderering to.
Start the renderer.
Returns: TRUE if successfully started.
Definition at line 129 of file fl_renderer.cc.
Referenced by realize_cb(), and TEST().
void fl_renderer_wait_for_frame | ( | FlRenderer * | renderer, |
int | target_width, | ||
int | target_height | ||
) |
fl_renderer_wait_for_frame: @renderer: an #FlRenderer. @target_width: width of frame being waited for @target_height: height of frame being waited for
Holds the thread until frame with requested dimensions is presented. While waiting for frame Flutter platform and raster tasks are being processed.
Definition at line 211 of file fl_renderer.cc.
References fl_engine_get_task_runner(), fl_task_runner_block_main_thread(), fl_view_get_engine(), and priv.
Referenced by handle_geometry_changed(), and TEST().