1 // Copyright 2013 The Flutter Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef FLUTTER_FLUTTERTEXTURE_H_ 6 #define FLUTTER_FLUTTERTEXTURE_H_ 7 8 #import <CoreMedia/CoreMedia.h> 9 #import <Foundation/Foundation.h> 10 11 #include "FlutterMacros.h" 12 13 NS_ASSUME_NONNULL_BEGIN 14 15 FLUTTER_EXPORT 16 @protocol FlutterTexture <NSObject> 17 - (CVPixelBufferRef _Nullable)copyPixelBuffer; 18 @end 19 20 FLUTTER_EXPORT 21 @protocol FlutterTextureRegistry <NSObject> 22 - (int64_t)registerTexture:(NSObject<FlutterTexture>*)texture; 23 - (void)textureFrameAvailable:(int64_t)textureId; 24 - (void)unregisterTexture:(int64_t)textureId; 25 @end 26 27 NS_ASSUME_NONNULL_END 28 29 #endif // FLUTTER_FLUTTERTEXTURE_H_ 30