Flutter Engine
The Flutter Engine
|
Blit passes encode blit into the underlying command buffer. More...
#include <blit_pass.h>
Public Member Functions | |
virtual | ~BlitPass () |
virtual bool | IsValid () const =0 |
void | SetLabel (std::string label) |
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 the intersection of the texture coverage with respect the source region and destination origin. No work is encoded into the command buffer at this time. | |
bool | AddCopy (std::shared_ptr< Texture > source, std::shared_ptr< DeviceBuffer > destination, std::optional< IRect > source_region=std::nullopt, size_t destination_offset=0, std::string label="") |
Record a command to copy the contents of the buffer to the texture. No work is encoded into the command buffer at this time. | |
bool | AddCopy (BufferView source, std::shared_ptr< Texture > destination, IPoint destination_origin={}, std::string label="") |
Record a command to copy the contents of the buffer to the texture. No work is encoded into the command buffer at this time. | |
bool | GenerateMipmap (std::shared_ptr< Texture > texture, std::string label="") |
Record a command to generate all mip levels for a texture. No work is encoded into the command buffer at this time. | |
virtual bool | EncodeCommands (const std::shared_ptr< Allocator > &transients_allocator) const =0 |
Encode the recorded commands to the underlying command buffer. | |
Protected Member Functions | |
BlitPass () | |
virtual void | OnSetLabel (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 |
virtual bool | OnCopyTextureToBufferCommand (std::shared_ptr< Texture > source, std::shared_ptr< DeviceBuffer > destination, IRect source_region, size_t destination_offset, std::string label)=0 |
virtual bool | OnCopyBufferToTextureCommand (BufferView source, std::shared_ptr< Texture > destination, IPoint destination_origin, std::string label)=0 |
virtual bool | OnGenerateMipmapCommand (std::shared_ptr< Texture > texture, std::string label)=0 |
Blit passes encode blit into the underlying command buffer.
Blit passes can be obtained from the command buffer in which the pass is meant to encode commands into.
CommandBuffer
Definition at line 26 of file blit_pass.h.
|
virtualdefault |
|
explicitprotected |
Definition at line 15 of file blit_pass.cc.
bool impeller::BlitPass::AddCopy | ( | BufferView | source, |
std::shared_ptr< Texture > | destination, | ||
IPoint | destination_origin = {} , |
||
std::string | label = "" |
||
) |
Record a command to copy the contents of the buffer to the texture. No work is encoded into the command buffer at this time.
[in] | source | The buffer view to read for copying. |
[in] | destination | The texture to overwrite using the source contents. |
[in] | destination_offset | The offset to start writing to in the destination buffer. |
[in] | label | The optional debug label to give the command. |
Definition at line 123 of file blit_pass.cc.
bool impeller::BlitPass::AddCopy | ( | std::shared_ptr< Texture > | source, |
std::shared_ptr< DeviceBuffer > | destination, | ||
std::optional< IRect > | source_region = std::nullopt , |
||
size_t | destination_offset = 0 , |
||
std::string | label = "" |
||
) |
Record a command to copy the contents of the buffer to the texture. No work is encoded into the command buffer at this time.
[in] | source | The texture to read for copying. |
[in] | destination | The buffer to overwrite using the source contents. |
[in] | source_region | The optional region of the source texture to use for copying. If not specified, the full size of the source texture is used. |
[in] | destination_origin | The origin to start writing to in the destination texture. |
[in] | label | The optional debug label to give the command. |
Definition at line 83 of file blit_pass.cc.
bool impeller::BlitPass::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 the intersection of the texture coverage with respect the source region and destination origin. No work is encoded into the command buffer at this time.
[in] | source | The texture to read for copying. |
[in] | destination | The texture to overwrite using the source contents. |
[in] | source_region | The optional region of the source texture to use for copying. If not specified, the full size of the source texture is used. |
[in] | destination_origin | The origin to start writing to in the destination texture. |
[in] | label | The optional debug label to give the command. |
Definition at line 26 of file blit_pass.cc.
|
pure virtual |
Encode the recorded commands to the underlying command buffer.
transients_allocator | The transients allocator. |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
bool impeller::BlitPass::GenerateMipmap | ( | std::shared_ptr< Texture > | texture, |
std::string | label = "" |
||
) |
Record a command to generate all mip levels for a texture. No work is encoded into the command buffer at this time.
[in] | texture | The texture to generate mipmaps for. |
[in] | label | The optional debug label to give the command. |
Definition at line 147 of file blit_pass.cc.
|
pure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
|
protectedpure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
|
protectedpure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
|
protectedpure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
|
protectedpure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
|
protectedpure virtual |
Implemented in impeller::BlitPassGLES, impeller::BlitPassMTL, and impeller::BlitPassVK.
void impeller::BlitPass::SetLabel | ( | std::string | label | ) |
Definition at line 19 of file blit_pass.cc.