Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
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]
 

Protected Attributes

FlutterTexture_texture
 
__weak FlutterMetalLayer_layer
 
NSUInteger _drawableId
 
BOOL _presented
 

Detailed Description

Definition at line 84 of file FlutterMetalLayer.mm.

Method Documentation

◆ addPresentedHandler:

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

Definition at line 88 of file FlutterMetalLayer.mm.

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

◆ dealloc

- (void) dealloc
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

134 {
135 if (!_presented) {
136 [_layer returnTexture:self->_texture];
137 }
138}

◆ drawableID

- (NSUInteger) drawableID
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

121 {
122 return self->_drawableId;
123}

◆ flutterPrepareForPresent:

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

Reimplemented from <FlutterMetalDrawable>.

Definition at line 88 of file FlutterMetalLayer.mm.

152 :(nonnull id<MTLCommandBuffer>)commandBuffer {
155 [commandBuffer addCompletedHandler:^(id<MTLCommandBuffer> buffer) {
156 texture.waitingForCompletion = NO;
157 }];
158}
FlutterTexture * _texture
id< MTLTexture > texture()

◆ initWithTexture:layer:drawableId:

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

Definition at line 88 of file FlutterMetalLayer.mm.

101 drawableId:(NSUInteger)drawableId {
102 if (self = [super init]) {
104 _layer = layer;
105 _drawableId = drawableId;
106 }
107 return self;
108}
if(end==-1)
CAMetalLayer * layer()
__weak FlutterMetalLayer * _layer
init(device_serial, adb_binary)
Definition _adb_path.py:12

◆ layer

- (CAMetalLayer *) layer
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

116 {
117 return (id)self->_layer;
118}

◆ present

- (void) present
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

129 {
130 [_layer presentTexture:self->_texture];
131 self->_presented = YES;
132}

◆ presentAfterMinimumDuration:

- (void) presentAfterMinimumDuration: (CFTimeInterval)  duration
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

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

◆ presentAtTime:

- (void) presentAtTime: (CFTimeInterval)  presentationTime
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

144 :(CFTimeInterval)presentationTime {
145 FML_LOG(WARNING) << "FlutterMetalLayer drawable does not implement presentAtTime:";
146}

◆ presentedTime

- (CFTimeInterval) presentedTime
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

125 {
126 return 0;
127}

◆ texture

- (id< MTLTexture >) texture
implementation

Definition at line 88 of file FlutterMetalLayer.mm.

110 {
111 return self->_texture.texture;
112}

Member Data Documentation

◆ _drawableId

- (NSUInteger) _drawableId
protected

Definition at line 87 of file FlutterMetalLayer.mm.

◆ _layer

- (__weak FlutterMetalLayer*) _layer
protected

Definition at line 86 of file FlutterMetalLayer.mm.

◆ _presented

- (BOOL) _presented
protected

Definition at line 88 of file FlutterMetalLayer.mm.

◆ _texture

- (FlutterTexture*) _texture
protected

Definition at line 85 of file FlutterMetalLayer.mm.


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