15 NSMutableDictionary<NSNumber*, FlutterExternalTexture*>*
_textures;
18- (instancetype)initWithDelegate:(
id<FlutterTextureRegistrarDelegate>)delegate
20 if (
self = [super init]) {
23 _textures = [[NSMutableDictionary alloc] init];
30 int64_t textureID = [externalTexture
textureID];
31 BOOL success = [_flutterEngine registerTextureWithID:textureID];
33 _textures[@(textureID)] = externalTexture;
36 NSLog(
@"Unable to register the texture with id: %lld.", textureID);
41- (void)textureFrameAvailable:(int64_t)textureID {
42 BOOL success = [_flutterEngine markTextureFrameAvailable:textureID];
44 NSLog(
@"Unable to mark texture with id %lld as available.", textureID);
48- (void)unregisterTexture:(int64_t)textureID {
49 bool success = [_flutterEngine unregisterTextureWithID:textureID];
51 [_textures removeObjectForKey:@(textureID)];
53 NSLog(
@"Unable to unregister texture with id: %lld.", textureID);
std::vector< FlutterMetalTextureHandle > _textures
NSMutableDictionary< NSNumber *, FlutterExternalTexture * > * _textures
__weak FlutterEngine * _flutterEngine