7 #include "flutter/impeller/entity/mtl/entity_shaders.h"
9 #include "impeller/display_list/aiks_context.h"
10 #include "impeller/typographer/backends/skia/typographer_context_skia.h"
17 const std::shared_ptr<const fml::SyncSwitch>& is_gpu_disabled_sync_switch)
18 : darwin_context_metal_impeller_(fml::scoped_nsobject<FlutterDarwinContextMetalImpeller>{
19 [[FlutterDarwinContextMetalImpeller alloc] init:is_gpu_disabled_sync_switch]}) {
20 if (darwin_context_metal_impeller_.get().context) {
21 aiks_context_ = std::make_shared<impeller::AiksContext>(
22 darwin_context_metal_impeller_.get().context, impeller::TypographerContextSkia::Make());
41 sk_sp<GrDirectContext> IOSContextMetalImpeller::CreateResourceContext() {
46 std::shared_ptr<impeller::Context> IOSContextMetalImpeller::GetImpellerContext()
const {
47 return darwin_context_metal_impeller_.get().context;
51 std::shared_ptr<impeller::AiksContext> IOSContextMetalImpeller::GetAiksContext()
const {
56 std::unique_ptr<GLContextResult> IOSContextMetalImpeller::MakeCurrent() {
58 return std::make_unique<GLContextDefaultResult>(
true);
62 std::unique_ptr<Texture> IOSContextMetalImpeller::CreateExternalTexture(
64 fml::scoped_nsobject<NSObject<FlutterTexture>> texture) {
65 return std::make_unique<IOSExternalTextureMetal>(
66 fml::scoped_nsobject<FlutterDarwinExternalTextureMetal>{[darwin_context_metal_impeller_