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, 24 const DrawParams& params, 25 skvx::ushort2 ssboIndices) const override; 26 void writeUniformsAndTextures(const DrawParams&, PipelineDataGatherer*) const override; 27 const char* fragmentColorSkSL() const override; 28 29 private: 30 const bool fHasColor; 31 const bool fHasTexCoords; 32 }; 33 34 } // namespace skgpu::graphite 35 36 #endif // skgpu_graphite_render_VerticesRenderStep_DEFINED 37