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