Don't use drawVertices for blur masks

Total DMSAA Multisample Render Passes: 190 -> 110

Bug: skia:11396
Change-Id: I721de497f497c40e854d219829e853765e2dc778
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/404856
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
Chris Dalton 2021-05-05 11:26:26 -06:00 committed by Skia Commit-Bot
parent 7987bbdabf
commit 8a42dc1e67

View File

@ -676,18 +676,8 @@ bool SkBlurMaskFilterImpl::directFilterMaskGPU(GrRecordingContext* context,
if (!this->ignoreXform()) {
SkRect srcProxyRect = srcRRect.rect();
srcProxyRect.outset(3.0f*fSigma, 3.0f*fSigma);
SkVertices::Builder builder(SkVertices::kTriangles_VertexMode, 4, 6, 0);
srcProxyRect.toQuad(builder.positions());
static const uint16_t fullIndices[6] = { 0, 1, 2, 0, 2, 3 };
memcpy(builder.indices(), fullIndices, sizeof(fullIndices));
sk_sp<SkVertices> vertices = builder.detach();
paint.setCoverageFragmentProcessor(std::move(fp));
SkSimpleMatrixProvider matrixProvider(viewMatrix);
surfaceDrawContext->drawVertices(clip, std::move(paint), matrixProvider,
std::move(vertices));
surfaceDrawContext->drawRect(clip, std::move(paint), GrAA::kNo, viewMatrix, srcProxyRect);
} else {
SkMatrix inverse;
if (!viewMatrix.invert(&inverse)) {