Flutter Engine
The Flutter Engine
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
10#import "flutter/shell/platform/darwin/macos/framework/Headers/FlutterEngine.h"
11#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterTextureRegistrar.h"
12#import "flutter/shell/platform/darwin/macos/framework/Source/FlutterView.h"
13#import "flutter/shell/platform/embedder/embedder.h"
14
15/**
16 * Rendering backend agnostic FlutterRendererConfig provider to be used by the embedder API.
17 */
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 */
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_
VkDevice device
Definition: main.cc:53
FlutterRendererConfig createRendererConfig()
id< MTLCommandQueue > commandQueue
int BOOL
Definition: windows_types.h:37