Flutter Engine
The Flutter Engine
Classes | Typedefs | Enumerations | Functions
flutter_texture_registrar.h File Reference
#include <stddef.h>
#include <stdint.h>
#include "flutter_export.h"

Go to the source code of this file.

Classes

struct  FlutterDesktopPixelBuffer
 
struct  FlutterDesktopGpuSurfaceDescriptor
 
struct  FlutterDesktopPixelBufferTextureConfig
 
struct  FlutterDesktopGpuSurfaceTextureConfig
 
struct  FlutterDesktopTextureInfo
 

Typedefs

typedef struct FlutterDesktopTextureRegistrar * FlutterDesktopTextureRegistrarRef
 
typedef const FlutterDesktopPixelBuffer *(* FlutterDesktopPixelBufferTextureCallback) (size_t width, size_t height, void *user_data)
 
typedef const FlutterDesktopGpuSurfaceDescriptor *(* FlutterDesktopGpuSurfaceTextureCallback) (size_t width, size_t height, void *user_data)
 

Enumerations

enum  FlutterDesktopTextureType { kFlutterDesktopPixelBufferTexture , kFlutterDesktopGpuSurfaceTexture }
 
enum  FlutterDesktopGpuSurfaceType { kFlutterDesktopGpuSurfaceTypeNone , kFlutterDesktopGpuSurfaceTypeDxgiSharedHandle , kFlutterDesktopGpuSurfaceTypeD3d11Texture2D }
 
enum  FlutterDesktopPixelFormat { kFlutterDesktopPixelFormatNone , kFlutterDesktopPixelFormatRGBA8888 , kFlutterDesktopPixelFormatBGRA8888 }
 

Functions

FLUTTER_EXPORT int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, const FlutterDesktopTextureInfo *info)
 
FLUTTER_EXPORT void FlutterDesktopTextureRegistrarUnregisterExternalTexture (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id, void(*callback)(void *user_data), void *user_data)
 
FLUTTER_EXPORT bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable (FlutterDesktopTextureRegistrarRef texture_registrar, int64_t texture_id)
 

Typedef Documentation

◆ FlutterDesktopGpuSurfaceTextureCallback

typedef const FlutterDesktopGpuSurfaceDescriptor *( * FlutterDesktopGpuSurfaceTextureCallback) (size_t width, size_t height, void *user_data)

Definition at line 124 of file flutter_texture_registrar.h.

◆ FlutterDesktopPixelBufferTextureCallback

typedef const FlutterDesktopPixelBuffer *( * FlutterDesktopPixelBufferTextureCallback) (size_t width, size_t height, void *user_data)

Definition at line 115 of file flutter_texture_registrar.h.

◆ FlutterDesktopTextureRegistrarRef

typedef struct FlutterDesktopTextureRegistrar* FlutterDesktopTextureRegistrarRef

Definition at line 20 of file flutter_texture_registrar.h.

Enumeration Type Documentation

◆ FlutterDesktopGpuSurfaceType

Enumerator
kFlutterDesktopGpuSurfaceTypeNone 
kFlutterDesktopGpuSurfaceTypeDxgiSharedHandle 
kFlutterDesktopGpuSurfaceTypeD3d11Texture2D 

Definition at line 32 of file flutter_texture_registrar.h.

32 {
33 // Uninitialized.
35 // A DXGI shared texture handle (Windows only).
36 // See
37 // https://docs.microsoft.com/en-us/windows/win32/api/dxgi/nf-dxgi-idxgiresource-getsharedhandle
39 // A |ID3D11Texture2D| (Windows only).
FlutterDesktopGpuSurfaceType
@ kFlutterDesktopGpuSurfaceTypeDxgiSharedHandle
@ kFlutterDesktopGpuSurfaceTypeD3d11Texture2D
@ kFlutterDesktopGpuSurfaceTypeNone

◆ FlutterDesktopPixelFormat

Enumerator
kFlutterDesktopPixelFormatNone 
kFlutterDesktopPixelFormatRGBA8888 
kFlutterDesktopPixelFormatBGRA8888 

Definition at line 44 of file flutter_texture_registrar.h.

44 {
45 // Uninitialized.
47 // Represents a 32-bit RGBA color format with 8 bits each for red, green, blue
48 // and alpha.
50 // Represents a 32-bit BGRA color format with 8 bits each for blue, green, red
51 // and alpha.
FlutterDesktopPixelFormat
@ kFlutterDesktopPixelFormatBGRA8888
@ kFlutterDesktopPixelFormatNone
@ kFlutterDesktopPixelFormatRGBA8888

◆ FlutterDesktopTextureType

Enumerator
kFlutterDesktopPixelBufferTexture 
kFlutterDesktopGpuSurfaceTexture 

Definition at line 24 of file flutter_texture_registrar.h.

24 {
25 // A Pixel buffer-based texture.
27 // A platform-specific GPU surface-backed texture.
FlutterDesktopTextureType
@ kFlutterDesktopGpuSurfaceTexture
@ kFlutterDesktopPixelBufferTexture

Function Documentation

◆ FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable()

FLUTTER_EXPORT bool FlutterDesktopTextureRegistrarMarkExternalTextureFrameAvailable ( FlutterDesktopTextureRegistrarRef  texture_registrar,
int64_t  texture_id 
)

Definition at line 152 of file stub_flutter_api.cc.

154 {
155 bool result = false;
158 texture_id);
159 }
160 return result;
161}
virtual bool TextureRegistrarMarkTextureFrameAvailable(int64_t texture_id)
GAsyncResult * result
static flutter::testing::StubFlutterApi * s_stub_implementation
int64_t texture_id

◆ FlutterDesktopTextureRegistrarRegisterExternalTexture()

FLUTTER_EXPORT int64_t FlutterDesktopTextureRegistrarRegisterExternalTexture ( FlutterDesktopTextureRegistrarRef  texture_registrar,
const FlutterDesktopTextureInfo info 
)

Definition at line 128 of file stub_flutter_api.cc.

130 {
131 uint64_t result = -1;
133 result =
135 }
136 return result;
137}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition: DM.cpp:213
virtual int64_t TextureRegistrarRegisterExternalTexture(const FlutterDesktopTextureInfo *info)

◆ FlutterDesktopTextureRegistrarUnregisterExternalTexture()

FLUTTER_EXPORT void FlutterDesktopTextureRegistrarUnregisterExternalTexture ( FlutterDesktopTextureRegistrarRef  texture_registrar,
int64_t  texture_id,
void(*)(void *user_data callback,
void *  user_data 
)

Definition at line 139 of file stub_flutter_api.cc.

143 {
147 } else if (callback) {
149 }
150}
virtual void TextureRegistrarUnregisterExternalTexture(int64_t texture_id, void(*callback)(void *user_data), void *user_data)
FlKeyEvent uint64_t FlKeyResponderAsyncCallback callback
void * user_data