Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
recording_render_pass.h
Go to the documentation of this file.
1// Copyright 2013 The Flutter Authors. All rights reserved.
2// Use of this source code is governed by a BSD-style license that can be
3// found in the LICENSE file.
4
5#ifndef FLUTTER_IMPELLER_ENTITY_CONTENTS_TEST_RECORDING_RENDER_PASS_H_
6#define FLUTTER_IMPELLER_ENTITY_CONTENTS_TEST_RECORDING_RENDER_PASS_H_
7
9
10namespace impeller {
11
13 public:
14 explicit RecordingRenderPass(std::shared_ptr<RenderPass> delegate,
15 const std::shared_ptr<const Context>& context,
16 const RenderTarget& render_target);
17
19
20 const std::vector<Command>& GetCommands() const override { return commands_; }
21
22 // |RenderPass|
23 void SetPipeline(
24 const std::shared_ptr<Pipeline<PipelineDescriptor>>& pipeline) override;
25
26 void SetCommandLabel(std::string_view label) override;
27
28 // |RenderPass|
29 void SetStencilReference(uint32_t value) override;
30
31 // |RenderPass|
32 void SetBaseVertex(uint64_t value) override;
33
34 // |RenderPass|
35 void SetViewport(Viewport viewport) override;
36
37 // |RenderPass|
38 void SetScissor(IRect scissor) override;
39
40 // |RenderPass|
41 void SetInstanceCount(size_t count) override;
42
43 // |RenderPass|
44 bool SetVertexBuffer(VertexBuffer buffer) override;
45
46 // |RenderPass|
47 fml::Status Draw() override;
48
49 // |RenderPass|
50 bool BindResource(ShaderStage stage,
52 const ShaderUniformSlot& slot,
53 const ShaderMetadata& metadata,
54 BufferView view) override;
55
56 // |RenderPass|
57 bool BindResource(ShaderStage stage,
59 const ShaderUniformSlot& slot,
60 const std::shared_ptr<const ShaderMetadata>& metadata,
61 BufferView view) override;
62
63 // |RenderPass|
64 bool BindResource(ShaderStage stage,
66 const SampledImageSlot& slot,
67 const ShaderMetadata& metadata,
68 std::shared_ptr<const Texture> texture,
69 const std::unique_ptr<const Sampler>& sampler) override;
70
71 // |RenderPass|
72 void OnSetLabel(std::string label) override;
73
74 // |RenderPass|
75 bool OnEncodeCommands(const Context& context) const override;
76
77 bool IsValid() const override { return true; }
78
79 private:
80 Command pending_;
81 std::shared_ptr<RenderPass> delegate_;
82 std::vector<Command> commands_;
83};
84
85} // namespace impeller
86
87#endif // FLUTTER_IMPELLER_ENTITY_CONTENTS_TEST_RECORDING_RENDER_PASS_H_
int count
To do anything rendering related with Impeller, you need a context.
Definition context.h:46
Describes the fixed function and programmable aspects of rendering and compute operations performed b...
Definition pipeline.h:49
void SetStencilReference(uint32_t value) override
const std::vector< Command > & GetCommands() const override
Accessor for the current Commands.
void SetCommandLabel(std::string_view label) override
The debugging label to use for the command.
bool SetVertexBuffer(VertexBuffer buffer) override
Specify the vertex and index buffer to use for this command.
fml::Status Draw() override
Record the currently pending command.
void SetBaseVertex(uint64_t value) override
bool OnEncodeCommands(const Context &context) const override
void SetInstanceCount(size_t count) override
void SetViewport(Viewport viewport) override
void OnSetLabel(std::string label) override
bool BindResource(ShaderStage stage, DescriptorType type, const ShaderUniformSlot &slot, const ShaderMetadata &metadata, BufferView view) override
void SetPipeline(const std::shared_ptr< Pipeline< PipelineDescriptor > > &pipeline) override
The pipeline to use for this command.
void SetScissor(IRect scissor) override
Render passes encode render commands directed as one specific render target into an underlying comman...
Definition render_pass.h:33
static const uint8_t buffer[]
FlTexture * texture
An object used to specify work to the GPU along with references to resources the GPU will used when d...
Definition command.h:92
Metadata required to bind a combined texture and sampler.
Metadata required to bind a buffer.