Flutter Engine
The Flutter Engine
|
#include <embedder.h>
Public Attributes | |
size_t | struct_size |
The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig). More... | |
BoolCallback | make_current |
BoolCallback | clear_current |
BoolCallback | present |
UIntCallback | fbo_callback |
BoolCallback | make_resource_current |
bool | fbo_reset_after_present |
TransformationCallback | surface_transformation |
ProcResolver | gl_proc_resolver |
TextureFrameCallback | gl_external_texture_frame_callback |
UIntFrameInfoCallback | fbo_with_frame_info_callback |
BoolPresentInfoCallback | present_with_info |
FlutterFrameBufferWithDamageCallback | populate_existing_damage |
Definition at line 513 of file embedder.h.
BoolCallback FlutterOpenGLRendererConfig::clear_current |
Definition at line 517 of file embedder.h.
UIntCallback FlutterOpenGLRendererConfig::fbo_callback |
Specifying one (and only one) of the fbo_callback
or fbo_with_frame_info_callback
is required. Specifying both is an error and engine intialization will be terminated. The return value indicates the id of the frame buffer object that flutter will obtain the gl surface from.
Definition at line 530 of file embedder.h.
bool FlutterOpenGLRendererConfig::fbo_reset_after_present |
By default, the renderer config assumes that the FBO does not change for the duration of the engine run. If this argument is true, the engine will ask the embedder for an updated FBO target (via an fbo_callback invocation) after a present call.
Definition at line 542 of file embedder.h.
UIntFrameInfoCallback FlutterOpenGLRendererConfig::fbo_with_frame_info_callback |
Specifying one (and only one) of the fbo_callback
or fbo_with_frame_info_callback
is required. Specifying both is an error and engine intialization will be terminated. The return value indicates the id of the frame buffer object (fbo) that flutter will obtain the gl surface from. When using this variant, the embedder is passed a FlutterFrameInfo
struct that indicates the properties of the surface that flutter will acquire from the returned fbo.
Definition at line 567 of file embedder.h.
TextureFrameCallback FlutterOpenGLRendererConfig::gl_external_texture_frame_callback |
When the embedder specifies that a texture has a frame available, the engine will call this method (on an internal engine managed thread) so that external texture details can be supplied to the engine for subsequent composition.
Definition at line 559 of file embedder.h.
ProcResolver FlutterOpenGLRendererConfig::gl_proc_resolver |
Definition at line 554 of file embedder.h.
BoolCallback FlutterOpenGLRendererConfig::make_current |
Definition at line 516 of file embedder.h.
BoolCallback FlutterOpenGLRendererConfig::make_resource_current |
This is an optional callback. Flutter will ask the emebdder to create a GL context current on a background thread. If the embedder is able to do so, Flutter will assume that this context is in the same sharegroup as the main rendering context and use this context for asynchronous texture uploads. Though optional, it is recommended that all embedders set this callback as it will lead to better performance in texture handling.
Definition at line 537 of file embedder.h.
FlutterFrameBufferWithDamageCallback FlutterOpenGLRendererConfig::populate_existing_damage |
Specifying this callback is a requirement for dirty region management. Dirty region management will only render the areas of the screen that have changed in between frames, greatly reducing rendering times and energy consumption. To take advantage of these benefits, it is necessary to define populate_existing_damage as a callback that takes user data, an FBO ID, and an existing damage FlutterDamage. The callback should use the given FBO ID to identify the FBO's exisiting damage (i.e. areas that have changed since the FBO was last used) and use it to populate the given existing damage variable. This callback is dependent on either fbo_callback or fbo_with_frame_info_callback being defined as they are responsible for providing populate_existing_damage with the FBO's ID. Not specifying populate_existing_damage will result in full repaint (i.e. rendering all the pixels on the screen at every frame).
Definition at line 592 of file embedder.h.
BoolCallback FlutterOpenGLRendererConfig::present |
Specifying one (and only one) of present
or present_with_info
is required. Specifying both is an error and engine initialization will be terminated. The return value indicates success of the present call. If the intent is to use dirty region management, present_with_info must be defined as present will not succeed in communicating information about damage.
Definition at line 524 of file embedder.h.
BoolPresentInfoCallback FlutterOpenGLRendererConfig::present_with_info |
Specifying one (and only one) of present
or present_with_info
is required. Specifying both is an error and engine initialization will be terminated. When using this variant, the embedder is passed a FlutterPresentInfo
struct that the embedder can use to release any resources. The return value indicates success of the present call. This callback is essential for dirty region management. If not defined, all the pixels on the screen will be rendered at every frame (regardless of whether damage is actually being computed or not). This is because the information that is passed along to the callback contains the frame and buffer damage that are essential for dirty region management.
Definition at line 578 of file embedder.h.
size_t FlutterOpenGLRendererConfig::struct_size |
The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).
Definition at line 515 of file embedder.h.
TransformationCallback FlutterOpenGLRendererConfig::surface_transformation |
The transformation to apply to the render target before any rendering operations. This callback is optional.
Definition at line 553 of file embedder.h.