| 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:

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

## Properties
IOSurfaceRef | ioSurface
CGSize | size
int64_t | textureId

## Detailed Description

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

Definition at line 13 of file FlutterSurface.h.

## Method Documentation

## ◆ asFlutterMetalTexture

- (FlutterMetalTexture) asFlutterMetalTexture |  |  |

Definition at line 45 of file FlutterSurface.mm.

45 {
46 FlutterMetalTexture res;
47 memset(&res, 0, sizeof(FlutterMetalTexture));
48 res.struct_size = sizeof(FlutterMetalTexture);
49 res.texture = (__bridge void*)_texture;
50 res.texture_id = self.textureId;
51 res.user_data = (void*)CFBridgingRetain(self);
52 res.destruction_callback = ReleaseSurface;
53 return res;
54 }

References _texture.

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

## ◆ fromFlutterMetalTexture:

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

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

## ◆ initWithSize:device:

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

Provided by category FlutterSurface(Private).

## Property Documentation

## ◆ ioSurface

- (IOSurfaceRef) ioSurface
| readnonatomicassign

Provided by category FlutterSurface(Private).

Definition at line 29 of file FlutterSurface.h.

## ◆ size

- (CGSize) size
| readnonatomicassign

Provided by category FlutterSurface(Private).

Definition at line 30 of file FlutterSurface.h.

Referenced by FlutterBackBufferCache::removeSurfaceForSize:.

## ◆ textureId

- (int64_t) textureId
| readnonatomicassign

Provided by category FlutterSurface(Private).

Definition at line 31 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

_texture
id< FlutterTexture > _texture
Definition: FlutterExternalTexture.mm:14