xref: /aosp_15_r20/external/skia/src/gpu/graphite/render/MiddleOutFanRenderStep.h (revision c8dee2aa9b3f27cf6c858bd81872bdeb2c07ed17)
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_MiddleOutFanRenderStep_DEFINED
9 #define skgpu_graphite_render_MiddleOutFanRenderStep_DEFINED
10 
11 #include "src/base/SkVx.h"
12 #include "src/gpu/graphite/Renderer.h"
13 
14 #include <string>
15 
16 namespace skgpu::graphite {
17 
18 class DrawParams;
19 class DrawWriter;
20 class PipelineDataGatherer;
21 
22 class MiddleOutFanRenderStep final : public RenderStep {
23 public:
24     // TODO: If this takes DepthStencilSettings directly and a way to adjust the flags to specify
25     // that it performs shading, this RenderStep definition can be shared between the stencil and
26     // the convex rendering variants.
27     MiddleOutFanRenderStep(bool evenOdd);
28 
29     ~MiddleOutFanRenderStep() override;
30 
31     std::string vertexSkSL() const override;
32     void writeVertices(DrawWriter*, const DrawParams&, skvx::uint2 ssboIndices) const override;
33     void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override;
34 };
35 
36 }  // namespace skgpu::graphite
37 
38 #endif // skgpu_graphite_render_MiddleOutFanRenderStep_DEFINED
39