Flutter macOS Embedder
FlutterExternalTexture.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/graphics/FlutterDarwinContextMetalSkia.h"
8 #include "flutter/shell/platform/embedder/embedder.h"
9 
10 /**
11  * Embedding side texture wrappers for Metal external textures.
12  * Used to bridge FlutterTexture object and handle the texture copy request the
13  * Flutter engine.
14  */
15 @interface FlutterExternalTexture : NSObject
16 
17 /**
18  * Initializes a texture adapter with |texture|.
19  */
20 - (nonnull instancetype)initWithFlutterTexture:(nonnull id<FlutterTexture>)texture
21  darwinMetalContext:(nonnull FlutterDarwinContextMetalSkia*)context;
22 
23 /**
24  * Returns the ID for the FlutterExternalTexture instance.
25  */
26 - (int64_t)textureID;
27 
28 /**
29  * Accepts texture buffer copy request from the Flutter engine.
30  * When the user side marks the textureID as available, the Flutter engine will
31  * callback to this method and ask for populate the |metalTexture| object,
32  * such as the texture type and the format of the pixel buffer and the texture object.
33  */
34 - (BOOL)populateTexture:(nonnull FlutterMetalExternalTexture*)metalTexture;
35 
36 @end
FlutterExternalTexture
Definition: FlutterExternalTexture.h:15
-[FlutterExternalTexture textureID]
int64_t textureID()
Definition: FlutterExternalTexture.mm:30
FlutterTexture-p
Definition: FlutterTexture.h:21