8#ifndef QuadPerEdgeAA_DEFINED
9#define QuadPerEdgeAA_DEFINED
34enum class ColorType { kNone, kByte, kFloat, kLast = kFloat };
59 , fIndexBufferOption(0)
60 , fHasLocalCoords(
false)
63 , fUsesCoverageAA(
false)
64 , fCompatibleWithCoverageAsAlpha(
false)
65 , fRequiresGeometrySubset(
false) {}
79 , fColorType(static_cast<unsigned>(
colorType))
80 , fHasSubset(static_cast<unsigned>(subset))
82 , fCompatibleWithCoverageAsAlpha(coverageAsAlpha)
127 static_assert(kColorTypeCount <= 4,
"Color doesn't fit in 2 bits");
130 unsigned fDeviceQuadType : 2;
131 unsigned fLocalQuadType : 2;
132 unsigned fIndexBufferOption : 2;
133 unsigned fHasLocalCoords : 1;
134 unsigned fColorType : 2;
135 unsigned fHasSubset : 1;
136 unsigned fUsesCoverageAA : 1;
137 unsigned fCompatibleWithCoverageAsAlpha : 1;
140 unsigned fRequiresGeometrySubset : 1;
207 int quadCount,
int maxVerts,
int absVertBufferOffset);
@ kYes
Do pre-clip the geometry before applying the (perspective) matrix.
@ kNo
Don't pre-clip the geometry before applying the (perspective) matrix.
SkDEBUGCODE(SK_SPI) SkThreadID SkGetThreadID()
static const int kTypeCount
GrQuadUtils::TessellationHelper fAAHelper
VertexWriter fVertexWriter
static SkDEBUGCODE(skgpu::BufferWriter::Mark vertexMark() const { return fVertexWriter.mark();}) private WriteQuadProc GetWriteQuadProc(const VertexSpec &spec)
void append(GrQuad *deviceQuad, GrQuad *localQuad, const SkPMColor4f &color, const SkRect &uvSubset, GrQuadAAFlags aaFlags)
Tessellator(const VertexSpec &spec, char *vertices)
int QuadLimit(IndexBufferOption option)
GrGeometryProcessor * MakeProcessor(SkArenaAlloc *arena, const VertexSpec &spec)
IndexBufferOption CalcIndexBufferOption(GrAAType aa, int numQuads)
GrGeometryProcessor * MakeTexturedProcessor(SkArenaAlloc *arena, const VertexSpec &spec, const GrShaderCaps &caps, const GrBackendFormat &backendFormat, GrSamplerState samplerState, const skgpu::Swizzle &swizzle, sk_sp< GrColorSpaceXform > textureColorSpaceXform, Saturate saturate)
ColorType MinColorType(SkPMColor4f color)
sk_sp< const GrBuffer > GetIndexBuffer(GrMeshDrawTarget *target, IndexBufferOption indexBufferOption)
void IssueDraw(const GrCaps &caps, GrOpsRenderPass *renderPass, const VertexSpec &spec, int runningQuadCount, int quadsInDraw, int maxVerts, int absVertBufferOffset)
static const int kColorTypeCount
static const int kIndexBufferOptionCount
Mark mark(size_t offset=0) const
int deviceDimensionality() const
bool hasVertexColors() const
bool hasLocalCoords() const
IndexBufferOption indexBufferOption() const
int localDimensionality() const
size_t vertexSize() const
bool usesCoverageAA() const
bool requiresGeometrySubset() const
bool needsIndexBuffer() const
VertexSpec(GrQuad::Type deviceQuadType, ColorType colorType, GrQuad::Type localQuadType, bool hasLocalCoords, Subset subset, GrAAType aa, bool coverageAsAlpha, IndexBufferOption indexBufferOption)
GrQuad::Type deviceQuadType() const
ColorType colorType() const
GrQuad::Type localQuadType() const
bool compatibleWithCoverageAsAlpha() const
int verticesPerQuad() const
CoverageMode coverageMode() const
GrPrimitiveType primitiveType() const