5#ifndef FLUTTER_IMPELLER_RENDERER_BLIT_PASS_H_
6#define FLUTTER_IMPELLER_RENDERER_BLIT_PASS_H_
40 const std::shared_ptr<Texture>&
texture);
62 std::shared_ptr<Texture> destination,
63 std::optional<IRect> source_region = std::nullopt,
64 IPoint destination_origin = {},
65 std::string label =
"");
85 std::shared_ptr<DeviceBuffer> destination,
86 std::optional<IRect> source_region = std::nullopt,
87 size_t destination_offset = 0,
88 std::string label =
"");
118 std::shared_ptr<Texture> destination,
119 std::optional<IRect> destination_region = std::nullopt,
120 std::string label =
"",
122 bool convert_to_read =
true);
143 const std::shared_ptr<Allocator>& transients_allocator)
const = 0;
151 std::shared_ptr<Texture>
source,
152 std::shared_ptr<Texture> destination,
154 IPoint destination_origin,
155 std::string label) = 0;
158 std::shared_ptr<Texture>
source,
159 std::shared_ptr<DeviceBuffer> destination,
161 size_t destination_offset,
162 std::string label) = 0;
166 std::shared_ptr<Texture> destination,
167 IRect destination_region,
170 bool convert_to_read) = 0;
173 std::string label) = 0;
Blit passes encode blit into the underlying command buffer.
virtual bool EncodeCommands(const std::shared_ptr< Allocator > &transients_allocator) const =0
Encode the recorded commands to the underlying command buffer.
virtual bool OnCopyTextureToBufferCommand(std::shared_ptr< Texture > source, std::shared_ptr< DeviceBuffer > destination, IRect source_region, size_t destination_offset, std::string label)=0
bool AddCopy(std::shared_ptr< Texture > source, std::shared_ptr< Texture > destination, std::optional< IRect > source_region=std::nullopt, IPoint destination_origin={}, std::string label="")
Record a command to copy the contents of one texture to another texture. The blit area is limited by ...
bool GenerateMipmap(std::shared_ptr< Texture > texture, std::string label="")
Record a command to generate all mip levels for a texture.
void SetLabel(std::string label)
virtual bool OnCopyBufferToTextureCommand(BufferView source, std::shared_ptr< Texture > destination, IRect destination_region, std::string label, uint32_t slice, bool convert_to_read)=0
virtual bool ConvertTextureToShaderRead(const std::shared_ptr< Texture > &texture)
If the texture is not already in a shader read internal state, then convert it to that state.
virtual void OnSetLabel(std::string label)=0
virtual bool IsValid() const =0
virtual bool OnGenerateMipmapCommand(std::shared_ptr< Texture > texture, std::string label)=0
virtual bool OnCopyTextureToTextureCommand(std::shared_ptr< Texture > source, std::shared_ptr< Texture > destination, IRect source_region, IPoint destination_origin, std::string label)=0