5#ifndef FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_BLIT_PASS_MTL_H_
6#define FLUTTER_IMPELLER_RENDERER_BACKEND_METAL_BLIT_PASS_MTL_H_
8#include <Metal/Metal.h>
10#include "flutter/fml/macros.h"
24 std::vector<std::unique_ptr<BlitEncodeMTL>> commands_;
25 id<MTLCommandBuffer> buffer_ = nil;
27 bool is_valid_ =
false;
39 const std::shared_ptr<Allocator>& transients_allocator)
const override;
45 std::shared_ptr<Texture> destination,
48 std::string label)
override;
52 std::shared_ptr<DeviceBuffer> destination,
54 size_t destination_offset,
55 std::string label)
override;
58 std::shared_ptr<Texture> destination,
60 std::string label)
override;
64 std::string label)
override;
bool OnCopyTextureToBufferCommand(std::shared_ptr< Texture > source, std::shared_ptr< DeviceBuffer > destination, IRect source_region, size_t destination_offset, std::string label) override
bool OnGenerateMipmapCommand(std::shared_ptr< Texture > texture, std::string label) override
void OnSetLabel(std::string label) override
bool OnCopyBufferToTextureCommand(BufferView source, std::shared_ptr< Texture > destination, IPoint destination_origin, std::string label) override
bool OnCopyTextureToTextureCommand(std::shared_ptr< Texture > source, std::shared_ptr< Texture > destination, IRect source_region, IPoint destination_origin, std::string label) override
bool EncodeCommands(const std::shared_ptr< Allocator > &transients_allocator) const override
Encode the recorded commands to the underlying command buffer.
bool IsValid() const override
Blit passes encode blit into the underlying command buffer.
static const uint8_t buffer[]