10 NSObject<FlutterTextureRegistry>* textureRegistry = [registrar
textures];
12 int64_t textureId = [textureRegistry registerTexture:texture];
13 [NSTimer scheduledTimerWithTimeInterval:0.05
15 block:^(NSTimer* _Nonnull timer) {
16 [textureRegistry textureFrameAvailable:textureId];
25 return [
self pixelBuffer];
31 (NSString*)kCVPixelBufferMetalCompatibilityKey : @YES
33 CVPixelBufferRef pxbuffer = NULL;
34 CVReturn status = CVPixelBufferCreate(kCFAllocatorDefault, 200, 200, kCVPixelFormatType_32BGRA,
35 (__bridge CFDictionaryRef)
options, &pxbuffer);
37 NSAssert(status == kCVReturnSuccess && pxbuffer != NULL,
@"Failed to create pixel buffer.");
CVPixelBufferRef _Nullable copyPixelBuffer()
CVPixelBufferRef pixelBuffer()
id< FlutterTextureRegistry > textures