Avoid non-indexed quad draws on PowerVR Rogue and 54x

Bug: chromium:1203652
Change-Id: Id83ac81c40eda2653e97a7c8ae9326c273f0f00b
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420537
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/src/gpu/ops/GrTextureOp.cpp b/src/gpu/ops/GrTextureOp.cpp
index c1c8a46..233add0 100644
--- a/src/gpu/ops/GrTextureOp.cpp
+++ b/src/gpu/ops/GrTextureOp.cpp
@@ -693,7 +693,7 @@
         SkArenaAlloc* arena = context->priv().recordTimeAllocator();
 
         fDesc = arena->make<Desc>();
-        this->characterize(fDesc);
+        this->characterize(fDesc, *context->priv().caps());
         fDesc->allocatePrePreparedVertices(arena);
         FillInVertices(*context->priv().caps(), this, fDesc, fDesc->fPrePreparedVertices);
 
@@ -788,7 +788,7 @@
     int numQuads() const final { return this->totNumQuads(); }
 #endif
 
-    void characterize(Desc* desc) const {
+    void characterize(Desc* desc, const GrCaps& caps) const {
         SkDEBUGCODE(this->validate();)
 
         GrQuad::Type quadType = GrQuad::Type::kAxisAligned;
@@ -829,7 +829,8 @@
         SkASSERT(!CombinedQuadCountWillOverflow(overallAAType, false, desc->fNumTotalQuads));
 
         auto indexBufferOption = GrQuadPerEdgeAA::CalcIndexBufferOption(overallAAType,
-                                                                        maxQuadsPerMesh);
+                                                                        maxQuadsPerMesh,
+                                                                        caps);
 
         desc->fVertexSpec = VertexSpec(quadType, colorType, srcQuadType, /* hasLocal */ true,
                                        subset, overallAAType, /* alpha as coverage */ true,
@@ -875,7 +876,7 @@
         if (!fDesc) {
             SkArenaAlloc* arena = target->allocator();
             fDesc = arena->make<Desc>();
-            this->characterize(fDesc);
+            this->characterize(fDesc, target->caps());
             SkASSERT(!fDesc->fPrePreparedVertices);
         }