Flutter Engine
 
Loading...
Searching...
No Matches
FlutterDarwinContextMetalImpeller.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_GRAPHICS_FLUTTERDARWINCONTEXTMETALIMPELLER_H_
6#define FLUTTER_SHELL_PLATFORM_DARWIN_GRAPHICS_FLUTTERDARWINCONTEXTMETALIMPELLER_H_
7
8#import <CoreVideo/CVMetalTextureCache.h>
9#import <Foundation/Foundation.h>
10#import <Metal/Metal.h>
11
17
19
20/**
21 * Provides skia GrContexts that are shared between iOS and macOS embeddings.
22 */
24
25/**
26 * Initializes a FlutterDarwinContextMetalImpeller.
27 */
28- (instancetype)init:(const impeller::Flags&)flags
29 gpuDisabledSyncSwitch:
30 (const std::shared_ptr<const fml::SyncSwitch>&)is_gpu_disabled_sync_switch;
31
32/**
33 * Creates an external texture with the specified ID and contents.
34 */
36 createExternalTextureWithIdentifier:(int64_t)textureID
37 texture:(NSObject<FlutterTexture>*)texture;
38
39/**
40 * Impeller context.
41 */
42@property(nonatomic, readonly) std::shared_ptr<impeller::ContextMTL> context;
43
44/*
45 * Texture cache for external textures.
46 */
47@property(nonatomic, readonly) fml::CFRef<CVMetalTextureCacheRef> textureCache;
48
49@end
50
52
53#endif // FLUTTER_SHELL_PLATFORM_DARWIN_GRAPHICS_FLUTTERDARWINCONTEXTMETALIMPELLER_H_
#define NS_ASSUME_NONNULL_BEGIN
#define NS_ASSUME_NONNULL_END
fml::CFRef< CVMetalTextureCacheRef > textureCache
std::shared_ptr< impeller::ContextMTL > context
Definition ref_ptr.h:261