#import <FlutterTextureRegistrar.h>
Definition at line 28 of file FlutterTextureRegistrar.h.
◆ getTextureWithID:
Definition at line 15 of file FlutterTextureRegistrar.mm.
57 :(int64_t)textureID {
59}
NSMutableDictionary< NSNumber *, FlutterExternalTexture * > * _textures
◆ initWithDelegate:engine: [1/2]
Definition at line 15 of file FlutterTextureRegistrar.mm.
18 :(id<FlutterTextureRegistrarDelegate>)delegate
20 if (
self = [super
init]) {
21 _delegate = delegate;
23 _textures = [[NSMutableDictionary alloc] init];
24 }
25 return self;
26}
__weak FlutterEngine * _flutterEngine
◆ initWithDelegate:engine: [2/2]
◆ NS_UNAVAILABLE [1/2]
- (nullable instancetype) NS_UNAVAILABLE |
|
|
|
◆ NS_UNAVAILABLE [2/2]
+ (nullable instancetype) NS_UNAVAILABLE |
|
|
|
◆ registerTexture:
Definition at line 15 of file FlutterTextureRegistrar.mm.
30 int64_t textureID = [externalTexture
textureID];
31 BOOL success = [_flutterEngine registerTextureWithID:textureID];
32 if (success) {
33 _textures[@(textureID)] = externalTexture;
34 return textureID;
35 } else {
36 NSLog(@"Unable to register the texture with id: %lld.", textureID);
37 return 0;
38 }
39}
◆ textureFrameAvailable:
- (void) textureFrameAvailable: |
|
(int64_t) |
textureId |
|
|
implementation |
Notifies Flutter that the content of the previously registered texture has been updated.
This will trigger a call to -[FlutterTexture copyPixelBuffer]
on the raster thread.
Reimplemented from <FlutterTextureRegistry>.
Definition at line 15 of file FlutterTextureRegistrar.mm.
41 :(int64_t)textureID {
42 BOOL success = [_flutterEngine markTextureFrameAvailable:textureID];
43 if (!success) {
44 NSLog(@"Unable to mark texture with id %lld as available.", textureID);
45 }
46}
◆ unregisterTexture:
- (void) unregisterTexture: |
|
(int64_t) |
textureId |
|
|
implementation |
Unregisters a FlutterTexture
that has previously regeistered with registerTexture:
. Textures must be unregistered on the platform thread.
- Parameters
-
textureId | The result that was previously returned from registerTexture: . |
Reimplemented from <FlutterTextureRegistry>.
Definition at line 15 of file FlutterTextureRegistrar.mm.
48 :(int64_t)textureID {
49 bool success = [_flutterEngine unregisterTextureWithID:textureID];
50 if (success) {
51 [_textures removeObjectForKey:@(textureID)];
52 } else {
53 NSLog(@"Unable to unregister texture with id: %lld.", textureID);
54 }
55}
The documentation for this class was generated from the following files: