Flutter Engine
The Flutter Engine
Instance Methods | Protected Attributes | List of all members
FlutterDrawable Class Reference
Inheritance diagram for FlutterDrawable:
<FlutterMetalDrawable>

Instance Methods

(instancetype) - initWithTexture:layer:drawableId:
 
(id< MTLTexture >) - texture [implementation]
 
(CAMetalLayer *) - layer [implementation]
 
(NSUInteger) - drawableID [implementation]
 
(CFTimeInterval) - presentedTime [implementation]
 
(void) - present [implementation]
 
(void) - dealloc [implementation]
 
(void) - addPresentedHandler: [implementation]
 
(void) - presentAtTime: [implementation]
 
(void) - presentAfterMinimumDuration: [implementation]
 
(void) - flutterPrepareForPresent: [implementation]
 
(void) - flutterPrepareForPresent:
 
(void) - flutterPrepareForPresent:
 
(void) - flutterPrepareForPresent:
 

Protected Attributes

FlutterTexture_texture
 
__weak FlutterMetalLayer_layer
 
NSUInteger _drawableId
 
BOOL _presented
 

Detailed Description

Definition at line 88 of file FlutterMetalLayer.mm.

Method Documentation

◆ addPresentedHandler:

- (void) addPresentedHandler: (nonnull MTLDrawablePresentedHandler)  block
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

144 :(nonnull MTLDrawablePresentedHandler)block {
145 FML_LOG(WARNING) << "FlutterMetalLayer drawable does not implement addPresentedHandler:";
146}
#define FML_LOG(severity)
Definition: logging.h:82

◆ dealloc

- (void) dealloc
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

138 {
139 if (!_presented) {
140 [_layer returnTexture:self->_texture];
141 }
142}

◆ drawableID

- (NSUInteger) drawableID
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

125 {
126 return self->_drawableId;
127}

◆ flutterPrepareForPresent:

- (void) flutterPrepareForPresent: (nonnull id<MTLCommandBuffer>)  commandBuffer
implementation

Reimplemented from <FlutterMetalDrawable>.

Definition at line 92 of file FlutterMetalLayer.mm.

156 :(nonnull id<MTLCommandBuffer>)commandBuffer {
158 texture.waitingForCompletion = YES;
159 [commandBuffer addCompletedHandler:^(id<MTLCommandBuffer> buffer) {
160 texture.waitingForCompletion = NO;
161 }];
162}
FlutterTexture * _texture
id< MTLTexture > texture()

◆ initWithTexture:layer:drawableId:

- (instancetype) initWithTexture: (FlutterTexture*)  texture
layer: (FlutterMetalLayer*)  layer
drawableId: (NSUInteger)  drawableId 

Definition at line 92 of file FlutterMetalLayer.mm.

105 drawableId:(NSUInteger)drawableId {
106 if (self = [super init]) {
108 _layer = layer;
109 _drawableId = drawableId;
110 }
111 return self;
112}
NSUInteger _drawableId
CAMetalLayer * layer()
__weak FlutterMetalLayer * _layer
static bool init()

◆ layer

- (CAMetalLayer *) layer
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

120 {
121 return (id)self->_layer;
122}

◆ present

- (void) present
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

133 {
134 [_layer presentTexture:self->_texture];
135 self->_presented = YES;
136}

◆ presentAfterMinimumDuration:

- (void) presentAfterMinimumDuration: (CFTimeInterval)  duration
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

152 :(CFTimeInterval)duration {
153 FML_LOG(WARNING) << "FlutterMetalLayer drawable does not implement presentAfterMinimumDuration:";
154}
double duration
Definition: examples.cpp:30

◆ presentAtTime:

- (void) presentAtTime: (CFTimeInterval)  presentationTime
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

148 :(CFTimeInterval)presentationTime {
149 FML_LOG(WARNING) << "FlutterMetalLayer drawable does not implement presentAtTime:";
150}

◆ presentedTime

- (CFTimeInterval) presentedTime
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

129 {
130 return 0;
131}

◆ texture

- (id< MTLTexture >) texture
implementation

Definition at line 92 of file FlutterMetalLayer.mm.

114 {
115 return self->_texture.texture;
116}

Member Data Documentation

◆ _drawableId

- (NSUInteger) _drawableId
protected

Definition at line 91 of file FlutterMetalLayer.mm.

◆ _layer

- (__weak FlutterMetalLayer*) _layer
protected

Definition at line 90 of file FlutterMetalLayer.mm.

◆ _presented

- (BOOL) _presented
protected

Definition at line 92 of file FlutterMetalLayer.mm.

◆ _texture

- (FlutterTexture*) _texture
protected

Definition at line 89 of file FlutterMetalLayer.mm.


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