#include "src/gpu/graphite/render/VerticesRenderStep.h"
#include "src/core/SkSLTypeShared.h"
#include "src/core/SkVertState.h"
#include "src/core/SkVerticesPriv.h"
#include "src/gpu/graphite/DrawParams.h"
#include "src/gpu/graphite/DrawTypes.h"
#include "src/gpu/graphite/DrawWriter.h"
#include "src/gpu/graphite/PipelineData.h"
#include "src/gpu/graphite/render/CommonDepthStencilSettings.h"
namespace skgpu::graphite {
namespace {
static constexpr Attribute kPositionAttr = …;
static constexpr Attribute kTexCoordAttr = …;
static constexpr Attribute kColorAttr = …;
static constexpr Attribute kSsboIndexAttr = …;
static constexpr Attribute kAttributePositionOnly[] = …;
static constexpr Attribute kAttributeColor[] = …;
static constexpr Attribute kAttributeTexCoords[] = …;
static constexpr Attribute kAttributeColorAndTexCoords[] = …;
static constexpr SkSpan<const Attribute> kAttributes[4] = {
kAttributePositionOnly,
kAttributeColor,
kAttributeTexCoords,
kAttributeColorAndTexCoords,
};
static constexpr Varying kVaryingColor[] = …;
static constexpr SkSpan<const Varying> kVaryings[2] = {
{},
kVaryingColor
};
std::string variant_name(PrimitiveType type, bool hasColor, bool hasTexCoords) { … }
}
VerticesRenderStep::VerticesRenderStep(PrimitiveType type, bool hasColor, bool hasTexCoords)
: … { … }
VerticesRenderStep::~VerticesRenderStep() { … }
std::string VerticesRenderStep::vertexSkSL() const { … }
const char* VerticesRenderStep::fragmentColorSkSL() const { … }
void VerticesRenderStep::writeVertices(DrawWriter* writer,
const DrawParams& params,
skvx::ushort2 ssboIndices) const { … }
void VerticesRenderStep::writeUniformsAndTextures(const DrawParams& params,
PipelineDataGatherer* gatherer) const { … }
}