5 #ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_
6 #define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_
8 #include <Metal/Metal.h>
10 #include "flutter/fml/macros.h"
25 id<MTLCommandBuffer> buffer_ = nil;
26 id<MTLComputeCommandEncoder> encoder_ = nil;
29 bool is_valid_ =
false;
30 bool has_label_ =
false;
33 id<MTLCommandBuffer> buffer);
36 bool IsValid()
const override;
39 fml::Status Compute(
const ISize& grid_size)
override;
42 void SetCommandLabel(std::string_view label)
override;
45 void OnSetLabel(
const std::string& label)
override;
63 std::shared_ptr<const Texture> texture,
64 const std::unique_ptr<const Sampler>& sampler)
override;
67 bool EncodeCommands()
const override;
70 void AddBufferMemoryBarrier()
override;
73 void AddTextureMemoryBarrier()
override;
82 #endif // FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_COMPUTE_PASS_MTL_H_