Flutter Engine
The 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
12#include "flutter/fml/concurrent_message_loop.h"
13#include "flutter/fml/platform/darwin/cf_utils.h"
14#import "flutter/shell/platform/darwin/common/framework/Headers/FlutterTexture.h"
15#import "flutter/shell/platform/darwin/graphics/FlutterDarwinExternalTextureMetal.h"
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 std::shared_ptr<const fml::SyncSwitch>&)is_gpu_disabled_sync_switch;
29
30/**
31 * Creates an external texture with the specified ID and contents.
32 */
34 createExternalTextureWithIdentifier:(int64_t)textureID
35 texture:(NSObject<FlutterTexture>*)texture;
36
37/**
38 * Impeller context.
39 */
40@property(nonatomic, readonly) std::shared_ptr<impeller::ContextMTL> context;
41
42/*
43 * Texture cache for external textures.
44 */
45@property(nonatomic, readonly) fml::CFRef<CVMetalTextureCacheRef> textureCache;
46
47@end
48
50
51#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:256