9 #include "flutter/common/graphics/persistent_cache.h"
10 #include "flutter/fml/logging.h"
11 #import "flutter/shell/platform/darwin/graphics/FlutterDarwinContextMetalSkia.h"
13 #include "third_party/skia/include/gpu/ganesh/GrContextOptions.h"
20 darwin_context_metal_ = [[FlutterDarwinContextMetalSkia alloc] initWithDefaultMTLDevice];
26 return darwin_context_metal_;
34 return darwin_context_metal_.mainContext;
38 return darwin_context_metal_.resourceContext;
42 sk_sp<GrDirectContext> IOSContextMetalSkia::CreateResourceContext() {
43 return darwin_context_metal_.resourceContext;
47 std::unique_ptr<GLContextResult> IOSContextMetalSkia::MakeCurrent() {
49 return std::make_unique<GLContextDefaultResult>(
true);
53 std::unique_ptr<Texture> IOSContextMetalSkia::CreateExternalTexture(
55 NSObject<FlutterTexture>* texture) {
56 return std::make_unique<IOSExternalTextureMetal>(
57 [darwin_context_metal_ createExternalTextureWithIdentifier:
texture_id texture:texture]);