5 #ifndef FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_SKIA_H_
6 #define FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_SKIA_H_
10 #include "flutter/fml/macros.h"
11 #include "flutter/shell/gpu/gpu_surface_metal_delegate.h"
13 #include "third_party/skia/include/gpu/ganesh/mtl/GrMtlTypes.h"
20 public GPUSurfaceMetalDelegate {
29 id<MTLDevice> device_;
30 id<MTLCommandQueue> command_queue_;
31 bool is_valid_ =
false;
34 bool IsValid()
const override;
37 void UpdateStorageSizeIfNecessary()
override;
40 std::unique_ptr<Surface> CreateGPUSurface(GrDirectContext* gr_context)
override;
43 GPUCAMetalLayerHandle GetCAMetalLayer(
const SkISize& frame_info)
const override
44 __attribute__((cf_audited_transfer));
47 bool PresentDrawable(GrMTLHandle drawable)
const override __attribute__((cf_audited_transfer));
50 bool PreparePresent(GrMTLHandle drawable)
const override;
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;
70 #endif // FLUTTER_SHELL_PLATFORM_DARWIN_IOS_IOS_SURFACE_METAL_SKIA_H_