6 #include "flutter/impeller/entity/mtl/entity_shaders.h"
12 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch)
13 : IOSContext(MsaaSampleCount::kFour),
14 darwin_context_metal_impeller_(fml::scoped_nsobject<FlutterDarwinContextMetalImpeller>{
15 [[FlutterDarwinContextMetalImpeller alloc] init:is_gpu_disabled_sync_switch]}) {}
21 return fml::scoped_nsobject<FlutterDarwinContextMetalSkia>{};
37 sk_sp<GrDirectContext> IOSContextMetalImpeller::CreateResourceContext() {
42 std::shared_ptr<impeller::Context> IOSContextMetalImpeller::GetImpellerContext()
const {
43 return darwin_context_metal_impeller_.get().context;
47 std::unique_ptr<GLContextResult> IOSContextMetalImpeller::MakeCurrent() {
49 return std::make_unique<GLContextDefaultResult>(
true);
53 std::unique_ptr<Texture> IOSContextMetalImpeller::CreateExternalTexture(
55 fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
56 return std::make_unique<IOSExternalTextureMetal>(
57 fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{
58 [[darwin_context_metal_impeller_ createExternalTextureWithIdentifier:
texture_id
59 texture:texture] retain]});