#include <blit_pass_gles.h>
|
| ~BlitPassGLES () override |
|
virtual | ~BlitPass () |
|
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.
|
|
|
bool | IsValid () const override |
|
void | OnSetLabel (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 | OnCopyTextureToTextureCommand (std::shared_ptr< Texture > source, std::shared_ptr< Texture > destination, IRect source_region, IPoint destination_origin, 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 | OnCopyBufferToTextureCommand (BufferView source, std::shared_ptr< Texture > destination, IPoint destination_origin, std::string label) override |
|
bool | OnGenerateMipmapCommand (std::shared_ptr< Texture > texture, std::string label) override |
|
Definition at line 18 of file blit_pass_gles.h.
◆ ~BlitPassGLES()
impeller::BlitPassGLES::~BlitPassGLES |
( |
| ) |
|
|
overridedefault |
◆ EncodeCommands()
bool impeller::BlitPassGLES::EncodeCommands |
( |
const std::shared_ptr< Allocator > & |
transients_allocator | ) |
const |
|
overrideprivatevirtual |
Encode the recorded commands to the underlying command buffer.
- Parameters
-
transients_allocator | The transients allocator. |
- Returns
- If the commands were encoded to the underlying command buffer.
Implements impeller::BlitPass.
Definition at line 74 of file blit_pass_gles.cc.
75 {
77 return false;
78 }
79 if (commands_.empty()) {
80 return true;
81 }
82
83 std::shared_ptr<const BlitPassGLES> shared_this = shared_from_this();
84 return reactor_->AddOperation([transients_allocator,
85 blit_pass = std::move(shared_this),
86 label = label_](const auto& reactor) {
88 blit_pass->commands_, label);
89 FML_CHECK(
result) <<
"Must be able to encode GL commands without error.";
90 });
91}
bool IsValid() const override
#define FML_CHECK(condition)
bool EncodeCommandsInReactor(const std::shared_ptr< Allocator > &transients_allocator, const ReactorGLES &reactor, const std::vector< std::unique_ptr< BlitEncodeGLES > > &commands, const std::string &label)
◆ IsValid()
bool impeller::BlitPassGLES::IsValid |
( |
| ) |
const |
|
overrideprivatevirtual |
◆ OnCopyBufferToTextureCommand()
bool impeller::BlitPassGLES::OnCopyBufferToTextureCommand |
( |
BufferView |
source, |
|
|
std::shared_ptr< Texture > |
destination, |
|
|
IPoint |
destination_origin, |
|
|
std::string |
label |
|
) |
| |
|
inlineoverrideprivatevirtual |
◆ OnCopyTextureToBufferCommand()
bool impeller::BlitPassGLES::OnCopyTextureToBufferCommand |
( |
std::shared_ptr< Texture > |
source, |
|
|
std::shared_ptr< DeviceBuffer > |
destination, |
|
|
IRect |
source_region, |
|
|
size_t |
destination_offset, |
|
|
std::string |
label |
|
) |
| |
|
overrideprivatevirtual |
Implements impeller::BlitPass.
Definition at line 112 of file blit_pass_gles.cc.
117 {
118 auto command = std::make_unique<BlitCopyTextureToBufferCommandGLES>();
121 command->destination = std::move(destination);
122 command->source_region = source_region;
123 command->destination_offset = destination_offset;
124
125 commands_.emplace_back(std::move(command));
126 return true;
127}
◆ OnCopyTextureToTextureCommand()
bool impeller::BlitPassGLES::OnCopyTextureToTextureCommand |
( |
std::shared_ptr< Texture > |
source, |
|
|
std::shared_ptr< Texture > |
destination, |
|
|
IRect |
source_region, |
|
|
IPoint |
destination_origin, |
|
|
std::string |
label |
|
) |
| |
|
overrideprivatevirtual |
Implements impeller::BlitPass.
Definition at line 94 of file blit_pass_gles.cc.
99 {
100 auto command = std::make_unique<BlitCopyTextureToTextureCommandGLES>();
103 command->destination = std::move(destination);
104 command->source_region = source_region;
105 command->destination_origin = destination_origin;
106
107 commands_.emplace_back(std::move(command));
108 return true;
109}
◆ OnGenerateMipmapCommand()
bool impeller::BlitPassGLES::OnGenerateMipmapCommand |
( |
std::shared_ptr< Texture > |
texture, |
|
|
std::string |
label |
|
) |
| |
|
overrideprivatevirtual |
Implements impeller::BlitPass.
Definition at line 130 of file blit_pass_gles.cc.
131 {
132 auto command = std::make_unique<BlitGenerateMipmapCommandGLES>();
135
136 commands_.emplace_back(std::move(command));
137 return true;
138}
◆ OnSetLabel()
void impeller::BlitPassGLES::OnSetLabel |
( |
std::string |
label | ) |
|
|
overrideprivatevirtual |
◆ CommandBufferGLES
The documentation for this class was generated from the following files: