Add code path that avoids large indexBuffer draws
The bulkrect_1000_random_uniqueimages_batch on a Nexus 6P/Adreno 430
w/o this CL
curr/maxrss loops min median mean max stddev samples config
304/304 MB 1 151ms 159ms 158ms 163ms 3% ▆█▇▄▆▆▁▂█▅ gles
w/ this CL
curr/maxrss loops min median mean max stddev samples config
286/286 MB 1 18.1ms 18.1ms 18.1ms 18.1ms 0% ▂▄▅▃▅▅▃▄▁█ gles
Change-Id: I0f6d690b953444ec7a3176cb27c8a253caa55f5d
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/255986
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/ops/GrFillRectOp.cpp b/src/gpu/ops/GrFillRectOp.cpp
index e213283..0b35528 100644
--- a/src/gpu/ops/GrFillRectOp.cpp
+++ b/src/gpu/ops/GrFillRectOp.cpp
@@ -238,9 +238,9 @@
// Configure the mesh for the vertex data
GrMesh* mesh = target->allocMeshes(1);
- GrQuadPerEdgeAA::ConfigureMesh(mesh, vertexSpec, 0, fQuads.count(), totalNumVertices,
- std::move(vertexBuffer), std::move(indexBuffer),
- vertexOffsetInBuffer);
+ GrQuadPerEdgeAA::ConfigureMesh(target->caps(), mesh, vertexSpec, 0, fQuads.count(),
+ totalNumVertices, std::move(vertexBuffer),
+ std::move(indexBuffer), vertexOffsetInBuffer);
target->recordDraw(gp, mesh, 1, vertexSpec.primitiveType());
}