#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 |
void | fl_renderer_set_engine (FlRenderer *renderer, FlEngine *engine) |
void | fl_renderer_add_view (FlRenderer *renderer, FlutterViewId view_id, FlView *view) |
void | fl_renderer_remove_view (FlRenderer *renderer, FlutterViewId view_id) |
: 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, FlutterViewId view_id, 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, FlutterViewId view_id, int width, int height, const GdkRGBA *background_color) |
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_add_view | ( | FlRenderer * | renderer, |
FlutterViewId | view_id, | ||
FlView * | view | ||
) |
fl_renderer_add_view: @renderer: an #FlRenderer. @view_id: the ID of the view. @view: the view Flutter is renderering to.
Add a view to render on.
Definition at line 314 of file fl_renderer.cc.
Referenced by fl_view_new_for_engine(), realize_cb(), and TEST().
void fl_renderer_cleanup | ( | FlRenderer * | renderer | ) |
fl_renderer_cleanup:
Removes OpenGL resources used for rendering. Requires an active OpenGL context.
Definition at line 528 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 350 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 399 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 367 of file fl_renderer.cc.
References fl_framebuffer_get_id(), fl_framebuffer_new(), fl_renderer_make_current(), initialize(), priv, and TRUE.
Referenced by compositor_create_backing_store_callback(), and TEST().
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 360 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 355 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 340 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 345 of file fl_renderer.cc.
Referenced by fl_engine_gl_make_resource_current().
gboolean fl_renderer_present_layers | ( | FlRenderer * | renderer, |
FlutterViewId | view_id, | ||
const FlutterLayer ** | layers, | ||
size_t | layers_count | ||
) |
fl_renderer_present_layers: @renderer: an #FlRenderer. @view_id: view to present. @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 429 of file fl_renderer.cc.
References fl_renderer_unblock_main_thread(), fl_view_redraw(), i, priv, TRUE, and view.
Referenced by compositor_present_view_callback(), and TEST().
void fl_renderer_remove_view | ( | FlRenderer * | renderer, |
FlutterViewId | view_id | ||
) |
fl_renderer_remove_view: @renderer: an #FlRenderer. @view_id: the ID of the view.
Remove a view from the renderer.
Definition at line 325 of file fl_renderer.cc.
References priv.
Referenced by fl_view_dispose().
void fl_renderer_render | ( | FlRenderer * | renderer, |
FlutterViewId | view_id, | ||
int | width, | ||
int | height, | ||
const GdkRGBA * | background_color | ||
) |
fl_renderer_render: @renderer: an #FlRenderer. @view_id: view to render. @width: width of the window in pixels. @height: height of the window in pixels. @background_color: color to use for background.
Performs OpenGL commands to render current Flutter view.
Definition at line 501 of file fl_renderer.cc.
References height, priv, render_with_blit(), render_with_textures(), and width.
Referenced by render_cb(), and TEST().
void fl_renderer_set_engine | ( | FlRenderer * | renderer, |
FlEngine * | engine | ||
) |
fl_renderer_set_engine: @renderer: an #FlRenderer. @engine: an #FlEngine.
Called when the renderer is connected to an engine.
Definition at line 305 of file fl_renderer.cc.
References priv.
Referenced by fl_engine_new_with_renderer().
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 484 of file fl_renderer.cc.
References is_nvidia(), priv, and setup_shader().
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 409 of file fl_renderer.cc.
References fl_engine_get_task_runner(), fl_task_runner_block_main_thread(), and priv.
Referenced by handle_geometry_changed(), and TEST().