 |
Flutter Impeller
|
|
Go to the documentation of this file.
11 : context_(
std::move(context)),
12 render_target_(target),
13 transients_buffer_() {
14 auto strong_context =
context_.lock();
15 FML_DCHECK(strong_context);
20 auto strong_context =
context_.lock();
48 VALIDATION_LOG <<
"Attempted to add an invalid command to the render pass.";
52 if (command.scissor.has_value()) {
54 if (!target_rect.Contains(command.scissor.value())) {
55 VALIDATION_LOG <<
"Cannot apply a scissor that lies outside the bounds "
56 "of the render target.";
61 if (command.vertex_count == 0u) {
67 if (command.instance_count == 0u) {
73 commands_.emplace_back(std::move(command));
An object used to specify work to the GPU along with references to resources the GPU will used when d...
const RenderTarget & GetRenderTarget() const
RenderPass(std::weak_ptr< const Context > context, const RenderTarget &target)
bool EncodeCommands() const
Encode the recorded commands to the underlying command buffer.
ISize GetRenderTargetSize() const
std::string SPrintF(const char *format,...)
virtual bool OnEncodeCommands(const Context &context) const =0
const RenderTarget render_target_
std::vector< Command > commands_
ISize GetRenderTargetSize() const
void SetLabel(std::string label)
virtual void OnSetLabel(std::string label)=0
const std::weak_ptr< const Context > & GetContext() const
bool AddCommand(Command &&command)
Record a command for subsequent encoding to the underlying command buffer. No work is encoded into th...
const std::weak_ptr< const Context > context_
HostBuffer & GetTransientsBuffer()
std::shared_ptr< HostBuffer > transients_buffer_