• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
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_VerticesRenderStep_DEFINED
9 #define skgpu_graphite_render_VerticesRenderStep_DEFINED
10 
11 #include "include/core/SkVertices.h"
12 #include "src/gpu/graphite/Renderer.h"
13 
14 namespace skgpu::graphite {
15 
16 class VerticesRenderStep final : public RenderStep {
17 public:
18     explicit VerticesRenderStep(PrimitiveType, bool hasColor, bool hasTexCoords);
19 
20     ~VerticesRenderStep() override;
21 
22     std::string vertexSkSL() const override;
23     void writeVertices(DrawWriter* writer, const DrawParams& params, int ssboIndex) const override;
24     void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override;
25     const char* fragmentColorSkSL() const override;
26 
27 private:
28     const bool fHasColor;
29     const bool fHasTexCoords;
30 };
31 
32 }  // namespace skgpu::graphite
33 
34 #endif // skgpu_graphite_render_VerticesRenderStep_DEFINED
35