Flutter Engine
FlutterOpenGLRendererConfig Struct Reference

#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
 

Detailed Description

Definition at line 377 of file embedder.h.

Member Data Documentation

◆ clear_current

BoolCallback FlutterOpenGLRendererConfig::clear_current

◆ fbo_callback

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 391 of file embedder.h.

Referenced by fl_engine_start(), InferOpenGLPlatformViewCreationCallback(), RunFlutter(), RunFlutterEngine(), and flutter::testing::EmbedderConfigBuilder::SetOpenGLFBOCallBack().

◆ fbo_reset_after_present

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 403 of file embedder.h.

◆ fbo_with_frame_info_callback

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 428 of file embedder.h.

Referenced by InferOpenGLPlatformViewCreationCallback().

◆ gl_external_texture_frame_callback

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 420 of file embedder.h.

Referenced by FlutterEngineInitialize().

◆ gl_proc_resolver

ProcResolver FlutterOpenGLRendererConfig::gl_proc_resolver

◆ make_current

BoolCallback FlutterOpenGLRendererConfig::make_current

◆ make_resource_current

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 398 of file embedder.h.

Referenced by fl_engine_start(), InferOpenGLPlatformViewCreationCallback(), and RunFlutterEngine().

◆ present

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.

Definition at line 385 of file embedder.h.

Referenced by fl_engine_start(), InferOpenGLPlatformViewCreationCallback(), RunFlutter(), RunFlutterEngine(), and flutter::testing::EmbedderConfigBuilder::SetOpenGLPresentCallBack().

◆ present_with_info

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.

Definition at line 434 of file embedder.h.

Referenced by InferOpenGLPlatformViewCreationCallback().

◆ struct_size

size_t FlutterOpenGLRendererConfig::struct_size

The size of this struct. Must be sizeof(FlutterOpenGLRendererConfig).

Definition at line 379 of file embedder.h.

Referenced by fl_engine_start(), RunFlutter(), and RunFlutterEngine().

◆ surface_transformation

TransformationCallback FlutterOpenGLRendererConfig::surface_transformation

The transformation to apply to the render target before any rendering operations. This callback is optional.

Attention
When using a custom compositor, the layer offset and sizes will be affected by this transformation. It will be embedder responsibility to render contents at the transformed offset and size. This is useful for embedders that want to render transformed contents directly into hardware overlay planes without having to apply extra transformations to layer contents (which may necessitate an expensive off-screen render pass).

Definition at line 414 of file embedder.h.

Referenced by InferOpenGLPlatformViewCreationCallback().


The documentation for this struct was generated from the following file: