24 target->detachAppliedClip(),
26 target->renderPassBarriers(),
31 bool willBeUpgradedToAA,
32 int combinedQuadCount) {
56 std::move(appliedClip), dstProxyView, renderPassXferBarriers,
70 int verticesPerRepetition,
int indicesPerRepetition,
71 int repeatCount,
int maxRepetitions) {
72 this->
init(target, primitiveType, vertexStride, std::move(indexBuffer), verticesPerRepetition,
73 indicesPerRepetition, repeatCount, maxRepetitions);
78 int verticesPerRepetition,
int indicesPerRepetition,
79 int repeatCount,
int maxRepetitions) {
86 int vertexCount = verticesPerRepetition * repeatCount;
87 fVertices =
target->makeVertexSpace(vertexStride, vertexCount, &vertexBuffer, &firstVertex);
89 SkDebugf(
"Vertices could not be allocated for patterned rendering.");
93 fMesh =
target->allocMesh();
94 fPrimitiveType = primitiveType;
97 static_cast<int>(indexBuffer->
size() / (
sizeof(uint16_t) * indicesPerRepetition)));
99 maxRepetitions, std::move(vertexBuffer), verticesPerRepetition,
105 target->recordDraw(gp, fMesh, 1, fPrimitiveType);
112 target->recordDraw(gp, fMesh, 1, primProcProxies, fPrimitiveType);
122 SkDebugf(
"Could not get quad index buffer.");
void SK_SPI SkDebugf(const char format[],...) SK_PRINTF_LIKE(1
static SkPath clip(const SkPath &path, const SkHalfPlane &plane)
static GrAppliedClip Disabled()
const GrCaps * caps() const
virtual size_t size() const =0
void recordDraw(GrMeshDrawTarget *, const GrGeometryProcessor *) const
void init(GrMeshDrawTarget *, GrPrimitiveType, size_t vertexStride, sk_sp< const GrBuffer > indexBuffer, int verticesPerRepetition, int indicesPerRepetition, int repeatCount, int maxRepetitions)
virtual GrProgramInfo * programInfo()=0
void createProgramInfo(const GrCaps *caps, SkArenaAlloc *arena, const GrSurfaceProxyView &writeView, bool usesMSAASurface, GrAppliedClip &&appliedClip, const GrDstProxyView &dstProxyView, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
GrMeshDrawOp(uint32_t classID)
virtual void onPrePrepareDraws(GrRecordingContext *, const GrSurfaceProxyView &writeView, GrAppliedClip *, const GrDstProxyView &, GrXferBarrierFlags renderPassXferBarriers, GrLoadOp colorLoadOp)
virtual void onPrepareDraws(GrMeshDrawTarget *)=0
static bool CombinedQuadCountWillOverflow(GrAAType aaType, bool willBeUpgradedToAA, int combinedQuadCount)
virtual const GrCaps & caps() const =0
void recordProgramInfo(const GrProgramInfo *programInfo)
SkArenaAlloc * recordTimeAllocator()
GrRecordingContextPriv priv()
static int NumIndicesPerNonAAQuad()
static int MaxNumNonAAQuads()
static int MaxNumAAQuads()
static int NumVertsPerNonAAQuad()
GrRenderTargetProxy * asRenderTargetProxy() const
void setIndexedPatterned(sk_sp< const GrBuffer > indexBuffer, int indexCount, int patternRepeatCount, int maxPatternRepetitionsInIndexBuffer, sk_sp< const GrBuffer > vertexBuffer, int patternVertexCount, int baseVertex)