Flutter Engine
The Flutter Engine
TessellateWedgesRenderStep.h
Go to the documentation of this file.
1/*
2 * Copyright 2022 Google LLC
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef skgpu_graphite_render_TessellateWedgesRenderStep_DEFINED
9#define skgpu_graphite_render_TessellateWedgesRenderStep_DEFINED
10
14
15namespace skgpu::graphite {
16
17class StaticBufferManager;
18
20public:
21 // 'vertexBuffer' and 'indexBuffer' must have been returned by CreateVertexTemplate(), but they
22 // can be shared by all instances of TessellateWedgesRenderStep.
23 TessellateWedgesRenderStep(std::string_view variantName,
24 bool infinitySupport,
26 StaticBufferManager* bufferManager);
27
29
30 static std::pair<BindBufferInfo, BindBufferInfo> CreateVertexTemplate(StaticBufferManager*);
31
32 std::string vertexSkSL() const override;
33 void writeVertices(DrawWriter*, const DrawParams&, skvx::ushort2 ssboIndices) const override;
34 void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override;
35
36private:
37 // Points to the static buffers holding the fixed indexed vertex template for drawing instances.
38 BindBufferInfo fVertexBuffer;
39 BindBufferInfo fIndexBuffer;
40 bool fInfinitySupport;
41};
42
43} // namespace skgpu::graphite
44
45#endif // skgpu_graphite_render_TessellateWedgesRenderStep_DEFINED
const DepthStencilSettings & depthStencilSettings() const
Definition: Renderer.h:148
void writeVertices(DrawWriter *, const DrawParams &, skvx::ushort2 ssboIndices) const override
void writeUniformsAndTextures(const DrawParams &, PipelineDataGatherer *) const override
TessellateWedgesRenderStep(std::string_view variantName, bool infinitySupport, DepthStencilSettings depthStencilSettings, StaticBufferManager *bufferManager)
static std::pair< BindBufferInfo, BindBufferInfo > CreateVertexTemplate(StaticBufferManager *)
Definition: SkVx.h:83