6 #include "flutter/impeller/entity/mtl/entity_shaders.h"
12 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]
16 init:std::move(is_gpu_disabled_sync_switch)]}) {}
22 return fml::scoped_nsobject<FlutterDarwinContextMetalSkia>{};
38 sk_sp<GrDirectContext> IOSContextMetalImpeller::CreateResourceContext() {
43 std::shared_ptr<impeller::Context> IOSContextMetalImpeller::GetImpellerContext()
const {
44 return darwin_context_metal_impeller_.get().context;
48 std::unique_ptr<GLContextResult> IOSContextMetalImpeller::MakeCurrent() {
50 return std::make_unique<GLContextDefaultResult>(
true);
54 std::unique_ptr<Texture> IOSContextMetalImpeller::CreateExternalTexture(
56 fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
57 return std::make_unique<IOSExternalTextureMetal>(
58 fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{
59 [[darwin_context_metal_impeller_ createExternalTextureWithIdentifier:
texture_id
60 texture:texture] retain]});