| Flutter macOS Embedder |

FlutterSurface.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 <Cocoa/Cocoa.h>
6
7 #import "flutter/shell/platform/embedder/embedder.h"
8
9 /**
10 * Opaque surface type.
11 * Can be represented as FlutterMetalTexture to cross the embedder API boundary.
12 */
13 @interface FlutterSurface : NSObject
14
15 - (FlutterMetalTexture)asFlutterMetalTexture;
16
17 + (nullable FlutterSurface*)fromFlutterMetalTexture:(nonnull const FlutterMetalTexture*)texture;
18
19 @end
20
21 /**
22 * Internal FlutterSurface interface used by FlutterSurfaceManager.
23 * Wraps an IOSurface framebuffer and metadata related to the surface.
24 */
25 @interface FlutterSurface (Private)
26
27 - (nonnull instancetype)initWithSize:(CGSize)size device:(nonnull id<MTLDevice>)device;
28
29 @property(readonly, nonatomic, nonnull) IOSurfaceRef ioSurface;
30 @property(readonly, nonatomic) CGSize size;
31 @property(readonly, nonatomic) int64_t textureId;
32
33 @end
-[FlutterSurface asFlutterMetalTexture]
FlutterMetalTexture asFlutterMetalTexture()
Definition: FlutterSurface.mm:45
FlutterSurface
Definition: FlutterSurface.h:13
FlutterSurface(Private)
Definition: FlutterSurface.h:25