| Flutter iOS Embedder |

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

`#import <FlutterMetalLayer.h>`

Inheritance diagram for FlutterMetalLayer:

## Instance Methods
(nullable id< CAMetalDrawable >) | - nextDrawable

## Class Methods
(BOOL) | + enabled

## Properties
id< MTLDevice > | device
id< MTLDevice > | preferredDevice
MTLPixelFormat | pixelFormat
BOOL | framebufferOnly
CGSize | drawableSize
BOOL | presentsWithTransaction
CGColorSpaceRef | colorspace
BOOL | wantsExtendedDynamicRangeContent

## Detailed Description

Drop-in replacement (as far as Flutter is concerned) for CAMetalLayer that can present with transaction from a background thread.

Definition at line 9 of file FlutterMetalLayer.h.

## Method Documentation

## ◆ enabled

+ (BOOL) enabled |  |  |

Returns whether the Metal layer is enabled. This is controlled by FLTUseFlutterMetalLayer value in Info.plist.

Definition at line 408 of file FlutterMetalLayer.mm.

408 {
409 static BOOL enabled = NO;
410 static BOOL didCheckInfoPlist = NO;
411 if (!didCheckInfoPlist) {
412 didCheckInfoPlist = YES;
413 NSNumber* use_flutter_metal_layer =
414 [[NSBundle mainBundle] objectForInfoDictionaryKey:@"FLTUseFlutterMetalLayer"];
415 if (use_flutter_metal_layer != nil && [use_flutter_metal_layer boolValue]) {
416 enabled = YES;
417 FML_LOG(WARNING) << "Using FlutterMetalLayer. This is an experimental feature.";
418 }
419 }
420 return enabled;
421 }

## ◆ nextDrawable

- (id< CAMetalDrawable >) nextDrawable |  |  |

Definition at line 354 of file FlutterMetalLayer.mm.

354 {
355 FlutterTexture* texture = [self nextTexture];
356 if (texture == nil) {
357 return nil;
358 }
359 FlutterDrawable* drawable = [[FlutterDrawable alloc] initWithTexture:texture
360 layer:self
361 drawableId:_nextDrawableId++];
362 return drawable;
363 }

## Property Documentation

## ◆ colorspace

- (CGColorSpaceRef) colorspace
| read write atomic assign

Definition at line 17 of file FlutterMetalLayer.h.

## ◆ device

- (id<MTLDevice>) device
| read write atomic retain

Definition at line 11 of file FlutterMetalLayer.h.

## ◆ drawableSize

- (CGSize) drawableSize
| read write atomic

Definition at line 15 of file FlutterMetalLayer.h.

## ◆ framebufferOnly

- (BOOL) framebufferOnly
| read write atomic

Definition at line 14 of file FlutterMetalLayer.h.

## ◆ pixelFormat

- (MTLPixelFormat) pixelFormat
| read write atomic

Definition at line 13 of file FlutterMetalLayer.h.

## ◆ preferredDevice

- (id<MTLDevice>) preferredDevice
| read atomic assign

Definition at line 12 of file FlutterMetalLayer.h.

## ◆ presentsWithTransaction

- (BOOL) presentsWithTransaction
| read write atomic

Definition at line 16 of file FlutterMetalLayer.h.

## ◆ wantsExtendedDynamicRangeContent

- (BOOL) wantsExtendedDynamicRangeContent
| read write atomic

Definition at line 18 of file FlutterMetalLayer.h.

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

- shell/platform/darwin/ios/framework/Source/FlutterMetalLayer.h
- shell/platform/darwin/ios/framework/Source/FlutterMetalLayer.mm

+[FlutterMetalLayer enabled]
BOOL enabled()
Definition: FlutterMetalLayer.mm:408
FlutterDrawable
Definition: FlutterMetalLayer.mm:82
FlutterTexture
Definition: FlutterMetalLayer.mm:54