Respect max index buffer sizes in GrFillRectOp::MakeSet
This is required before we can lower the max AA quad count (again).
Bug: b/143572065 skia:9601
Change-Id: Iea5884ffff9bd62f62527fcb597dac97d33ecd76
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/254438
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/ops/GrQuadPerEdgeAA.cpp b/src/gpu/ops/GrQuadPerEdgeAA.cpp
index 86fe00f..687d3a5 100644
--- a/src/gpu/ops/GrQuadPerEdgeAA.cpp
+++ b/src/gpu/ops/GrQuadPerEdgeAA.cpp
@@ -166,6 +166,15 @@
}
}
+int QuadLimit(IndexBufferOption option) {
+ switch (option) {
+ case IndexBufferOption::kPictureFramed: return GrResourceProvider::MaxNumAAQuads();
+ case IndexBufferOption::kIndexedRects: return GrResourceProvider::MaxNumNonAAQuads();
+ case IndexBufferOption::kTriStrips: return SK_MaxS32; // not limited by an indexBuffer
+ }
+
+ SkUNREACHABLE;
+}
void ConfigureMesh(GrMesh* mesh, const VertexSpec& spec,
int runningQuadCount, int quadsInDraw, int maxVerts,