5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_IMPELLER_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_IMPELLER_H_
8 #include "flutter/fml/macros.h"
9 #include "flutter/shell/gpu/gpu_surface_metal_delegate.h"
22 public GPUSurfaceMetalDelegate {
25 const std::shared_ptr<IOSContext>& context);
31 fml::scoped_nsobject<CAMetalLayer> layer_;
32 const std::shared_ptr<impeller::Context> impeller_context_;
33 std::shared_ptr<impeller::AiksContext> aiks_context_;
34 bool is_valid_ =
false;
37 bool IsValid()
const override;
40 void UpdateStorageSizeIfNecessary()
override;
43 std::unique_ptr<Surface> CreateGPUSurface(GrDirectContext* gr_context)
override;
46 GPUCAMetalLayerHandle GetCAMetalLayer(
const SkISize& frame_info)
const override
47 __attribute__((cf_audited_transfer));
50 bool PresentDrawable(GrMTLHandle drawable)
const override __attribute__((cf_audited_transfer));
53 GPUMTLTextureInfo GetMTLTexture(
const SkISize& frame_info)
const override
54 __attribute__((cf_audited_transfer));
57 bool PresentTexture(GPUMTLTextureInfo texture)
const override
58 __attribute__((cf_audited_transfer));
61 bool AllowsDrawingWhenGpuDisabled()
const override;
68 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_IMPELLER_H_