7 #include <Metal/Metal.h>
9 #include "flutter/fml/macros.h"
23 std::vector<std::unique_ptr<BlitEncodeMTL>> commands_;
24 id<MTLCommandBuffer> buffer_ = nil;
26 bool is_valid_ =
false;
31 bool IsValid()
const override;
34 void OnSetLabel(std::string label)
override;
38 const std::shared_ptr<Allocator>& transients_allocator)
const override;
40 bool EncodeCommands(id<MTLBlitCommandEncoder> pass)
const;
43 bool OnCopyTextureToTextureCommand(std::shared_ptr<Texture> source,
44 std::shared_ptr<Texture> destination,
47 std::string label)
override;
50 bool OnCopyTextureToBufferCommand(std::shared_ptr<Texture> source,
51 std::shared_ptr<DeviceBuffer> destination,
53 size_t destination_offset,
54 std::string label)
override;
56 bool OnCopyBufferToTextureCommand(
BufferView source,
57 std::shared_ptr<Texture> destination,
59 std::string label)
override;
62 bool OnGenerateMipmapCommand(std::shared_ptr<Texture> texture,
63 std::string label)
override;