Flutter Engine
FlutterExternalTextureGL.h
Go to the documentation of this file.
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 #import <Foundation/Foundation.h>
6 
7 #import "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h"
8 #import "flutter/shell/platform/embedder/embedder.h"
9 
10 /**
11  * Used to bridge FlutterTexture object and handle the texture copy request the
12  * Flutter engine.
13  */
14 @interface FlutterExternalTextureGL : NSObject
15 
16 /**
17  * Initializes a texture adapter with |texture| return a instance.
18  */
19 - (nonnull instancetype)initWithFlutterTexture:(nonnull id<FlutterTexture>)texture;
20 
21 /**
22  * Accepts texture buffer copy request from the Flutter engine.
23  * When the user side marks the textureID as available, the Flutter engine will
24  * callback to this method and ask for populate the |openGLTexture| object,
25  * such as the texture type and the format of the pixel buffer and the texture object.
26  */
27 - (BOOL)populateTexture:(nonnull FlutterOpenGLTexture*)openGLTexture;
28 
29 /**
30  * Returns the ID for the FlutterTexture instance.
31  */
32 - (int64_t)textureID;
33 
34 @end