| Flutter macOS Embedder |

FlutterRenderer.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/darwin/macos/framework/Headers/FlutterEngine.h"
8 #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextureRegistrar.h"
9 #import "flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h"
10 #import "flutter/shell/platform/embedder/embedder.h"
11
12 /**
13 * Rendering backend agnostic FlutterRendererConfig provider to be used by the embedder API.
14 */
15 @interface FlutterRenderer
16 : FlutterTextureRegistrar <FlutterTextureRegistry, FlutterTextureRegistrarDelegate>
17
18 /**
19 * Interface to the system GPU. Used to issue all the rendering commands.
20 */
21 @property(nonatomic, readonly, nonnull) id<MTLDevice> device;
22
23 /**
24 * Used to get the command buffers for the MTLDevice to render to.
25 */
26 @property(nonatomic, readonly, nonnull) id<MTLCommandQueue> commandQueue;
27
28 /**
29 * Intializes the renderer with the given FlutterEngine.
30 */
31 - (nullable instancetype)initWithFlutterEngine:(nonnull FlutterEngine*)flutterEngine;
32
33 /**
34 * Creates a FlutterRendererConfig that renders using the appropriate backend.
35 */
36 - (FlutterRendererConfig)createRendererConfig;
37
38 /**
39 * Populates the texture registry with the provided metalTexture.
40 */
41 - (BOOL)populateTextureWithIdentifier:(int64_t)textureID
42 metalTexture:(nonnull FlutterMetalExternalTexture*)metalTexture;
43
44 @end
FlutterEngine
Definition: FlutterEngine.h:30
FlutterRenderer::device
FlutterTextureRegistrarDelegate id< MTLDevice > device
Definition: FlutterRenderer.h:21
FlutterTextureRegistrar
Definition: FlutterTextureRegistrar.h:25
FlutterEngine.h
FlutterRenderer::commandQueue
id< MTLCommandQueue > commandQueue
Definition: FlutterRenderer.h:26
FlutterTextureRegistrar.h
FlutterRenderer
Definition: FlutterRenderer.h:15
-[FlutterRenderer createRendererConfig]
FlutterRendererConfig createRendererConfig()
Definition: FlutterRenderer.mm:62
FlutterView.h