| Flutter macOS Embedder |

Instance Methods | Class Methods | Properties | List of all members
FlutterSurface Class Reference

`#import <FlutterSurface.h>`

Inheritance diagram for FlutterSurface:

## Instance Methods
(FlutterMetalTexture) | - asFlutterMetalTexture
(nonnull instancetype) | - initWithSize:device:enableWideGamut:

## Class Methods
(nullable FlutterSurface *) | + fromFlutterMetalTexture:

## Properties
IOSurfaceRef | ioSurface
CGSize | size
int64_t | textureId
BOOL | isInUse
BOOL | isWideGamut
BOOL | isInUseOverride

## Detailed Description

Opaque surface type. Can be represented as FlutterMetalTexture to cross the embedder API boundary.

Definition at line 16 of file FlutterSurface.h.

## Method Documentation

## ◆ asFlutterMetalTexture

- (FlutterMetalTexture) asFlutterMetalTexture |  |  |

Definition at line 19 of file FlutterSurface.mm.

71 {
72 return FlutterMetalTexture{
73 .struct_size = sizeof(FlutterMetalTexture),
74 .texture_id = self.textureId,
75 .texture = (__bridge void*)_texture,
76 // Retain for use in [FlutterSurface fromFlutterMetalTexture]. Released in
77 // destruction_callback.
78 .user_data = (__bridge_retained void*)self,
79 .destruction_callback =
80 [](void* user_data) {
81 // Balancing release for the retain when setting user_data above.
82 FlutterSurface* surface = (__bridge_transfer FlutterSurface*)user_data;
83 surface = nil;
84 },
85 };
86 }
_texture
id< FlutterTexture > _texture
Definition: FlutterExternalTexture.mm:14
FlutterSurface(Private)::textureId
int64_t textureId
Definition: FlutterSurface.h:36
FlutterSurface
Definition: FlutterSurface.h:17
user_data
void * user_data
Definition: texture_registrar_unittests.cc:27
texture_id
int64_t texture_id
Definition: texture_registrar_unittests.cc:24

Referenced by flutter::FlutterCompositor::CreateBackingStore(), and flutter::testing::TEST().

## ◆ fromFlutterMetalTexture:

+ (nullable FlutterSurface*) fromFlutterMetalTexture: |  | (nonnull const FlutterMetalTexture *) | texture |

Referenced by flutter::testing::TEST().

## ◆ initWithSize:device:enableWideGamut:

- (nonnull instancetype) initWithSize: |  | (CGSize) | size
device: |  | (nonnull id< MTLDevice >) | device
enableWideGamut: |  | (BOOL) | enableWideGamut

Provided by category FlutterSurface(Private).

## Property Documentation

## ◆ ioSurface

- (IOSurfaceRef) ioSurface
| read nonatomic assign

Provided by category FlutterSurface(Private).

Definition at line 34 of file FlutterSurface.h.

Referenced by flutter::testing::TEST().

## ◆ isInUse

- (BOOL) isInUse
| read nonatomic assign

Provided by category FlutterSurface(Private).

Definition at line 38 of file FlutterSurface.h.

## ◆ isInUseOverride

- (BOOL) isInUseOverride
| read write nonatomic assign

Provided by category FlutterSurface(Testing).

Definition at line 45 of file FlutterSurface.h.

## ◆ isWideGamut

- (BOOL) isWideGamut
| read nonatomic assign

Provided by category FlutterSurface(Private).

Definition at line 40 of file FlutterSurface.h.

## ◆ size

- (CGSize) size
| read nonatomic assign

Provided by category FlutterSurface(Private).

Definition at line 35 of file FlutterSurface.h.

## ◆ textureId

- (int64_t) textureId
| read nonatomic assign

Provided by category FlutterSurface(Private).

Definition at line 36 of file FlutterSurface.h.

The documentation for this class was generated from the following files:

- shell/platform/darwin/macos/framework/Source/FlutterSurface.h
- shell/platform/darwin/macos/framework/Source/FlutterSurface.mm