 |
Flutter Impeller
|
|
Go to the documentation of this file.
15 : context_(
std::move(context)), transients_buffer_(
HostBuffer::Create()) {}
20 return *transients_buffer_;
27 transients_buffer_->SetLabel(
SPrintF(
"%s Transients", label.c_str()));
36 thread_group_size_ = size;
42 <<
"Attempted to add an invalid command to the compute pass.";
46 commands_.emplace_back(std::move(command));
52 FML_DLOG(WARNING) <<
"Attempted to encode a compute pass with an empty "
53 "grid or thread group size.";
void SetGridSize(const ISize &size)
ComputePass(std::weak_ptr< const Context > context)
std::vector< ComputeCommand > commands_
HostBuffer & GetTransientsBuffer()
bool EncodeCommands() const
Encode the recorded commands to the underlying command buffer.
std::string SPrintF(const char *format,...)
const std::weak_ptr< const Context > context_
bool AddCommand(ComputeCommand command)
Record a command for subsequent encoding to the underlying command buffer. No work is encoded into th...
virtual void OnSetLabel(const std::string &label)=0
An object used to specify compute work to the GPU along with references to resources the GPU will use...
void SetLabel(const std::string &label)
void SetThreadGroupSize(const ISize &size)
constexpr bool IsEmpty() const
virtual bool OnEncodeCommands(const Context &context, const ISize &grid_size, const ISize &thread_group_size) const =0