Flutter Engine
 
Loading...
Searching...
No Matches
FlutterOpenGLSurface Struct Reference

#include <embedder.h>

Public Attributes

size_t struct_size
 The size of this struct. Must be sizeof(FlutterOpenGLSurface).
 
void * user_data
 
FlutterOpenGLSurfaceCallback make_current_callback
 
FlutterOpenGLSurfaceCallback clear_current_callback
 
VoidCallback destruction_callback
 
uint32_t format
 

Detailed Description

Definition at line 557 of file embedder.h.

Member Data Documentation

◆ clear_current_callback

FlutterOpenGLSurfaceCallback FlutterOpenGLSurface::clear_current_callback

Callback invoked (on an engine-managed thread) when the current surface can be cleared.

Should return true if the operation succeeded, false if an error ocurred. That error will be logged but otherwise not handled by the engine.

The second parameter 'opengl state changed' is the same as with the make_current_callback.

The embedder might clear the surface here after it was previously made current. That's not required however, it's also possible to clear it in the destruction callback. There's no way to signal OpenGL state changes in the destruction callback though.

Attention
required. (non-null)

Definition at line 594 of file embedder.h.

Referenced by CreateEmbedderRenderTarget().

◆ destruction_callback

VoidCallback FlutterOpenGLSurface::destruction_callback

Callback invoked (on an engine-managed thread) that asks the embedder to collect the surface.

Attention
required. (non-null)

Definition at line 600 of file embedder.h.

Referenced by operator<<(), and operator==().

◆ format

uint32_t FlutterOpenGLSurface::format

The surface format.

Allowed values:

  • GL_RGBA8
  • GL_BGRA8_EXT

Definition at line 607 of file embedder.h.

Referenced by operator<<(), and operator==().

◆ make_current_callback

FlutterOpenGLSurfaceCallback FlutterOpenGLSurface::make_current_callback

Callback invoked (on an engine-managed thread) that asks the embedder to make the surface current.

Should return true if the operation succeeded, false if the surface could not be made current and rendering should be cancelled.

The second parameter 'opengl state changed' should be set to true if any OpenGL API state is different than before this callback was called. In that case, Flutter will invalidate the internal OpenGL API state cache, which is a somewhat expensive operation.

Attention
required. (non-null)

Definition at line 577 of file embedder.h.

Referenced by CreateEmbedderRenderTarget(), operator<<(), and operator==().

◆ struct_size

size_t FlutterOpenGLSurface::struct_size

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

Definition at line 559 of file embedder.h.

◆ user_data

void* FlutterOpenGLSurface::user_data

User data to be passed to the make_current, clear_current and destruction callbacks.

Definition at line 563 of file embedder.h.

Referenced by CreateEmbedderRenderTarget(), operator<<(), and operator==().


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