Rename GrRTC::drawBatch to addDrawOp and local vars in GrRTC.cpp

Change-Id: Ic8b896d7779844de5f82f9f0e630508578a8f61d
Reviewed-on: https://skia-review.googlesource.com/5647
Commit-Queue: Brian Salomon <bsalomon@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
diff --git a/include/gpu/GrRenderTargetContext.h b/include/gpu/GrRenderTargetContext.h
index c957c7a..93a3282 100644
--- a/include/gpu/GrRenderTargetContext.h
+++ b/include/gpu/GrRenderTargetContext.h
@@ -399,26 +399,26 @@
     SkDEBUGCODE(void validate() const;)
 
 private:
-    friend class GrAtlasTextBlob; // for access to drawBatch
-    friend class GrStencilAndCoverTextContext; // for access to drawBatch
+    friend class GrAtlasTextBlob; // for access to addDrawOp
+    friend class GrStencilAndCoverTextContext; // for access to addDrawOp
 
     friend class GrDrawingManager; // for ctor
     friend class GrRenderTargetContextPriv;
     friend class GrTestTarget;  // for access to getOpList
-    friend class GrSWMaskHelper;                 // for access to drawBatch
+    friend class GrSWMaskHelper;                 // for access to addDrawOp
 
-    // All the path renderers currently make their own batches
-    friend class GrSoftwarePathRenderer;         // for access to drawBatch
-    friend class GrAAConvexPathRenderer;         // for access to drawBatch
-    friend class GrDashLinePathRenderer;         // for access to drawBatch
-    friend class GrAAHairLinePathRenderer;       // for access to drawBatch
-    friend class GrAALinearizingConvexPathRenderer;  // for access to drawBatch
-    friend class GrAADistanceFieldPathRenderer;  // for access to drawBatch
-    friend class GrDefaultPathRenderer;          // for access to drawBatch
-    friend class GrPLSPathRenderer;              // for access to drawBatch
-    friend class GrMSAAPathRenderer;             // for access to drawBatch
-    friend class GrStencilAndCoverPathRenderer;  // for access to drawBatch
-    friend class GrTessellatingPathRenderer;     // for access to drawBatch
+    // All the path renderers currently make their own ops
+    friend class GrSoftwarePathRenderer;         // for access to addDrawOp
+    friend class GrAAConvexPathRenderer;         // for access to addDrawOp
+    friend class GrDashLinePathRenderer;         // for access to addDrawOp
+    friend class GrAAHairLinePathRenderer;       // for access to addDrawOp
+    friend class GrAALinearizingConvexPathRenderer;  // for access to addDrawOp
+    friend class GrAADistanceFieldPathRenderer;  // for access to addDrawOp
+    friend class GrDefaultPathRenderer;          // for access to addDrawOp
+    friend class GrPLSPathRenderer;              // for access to addDrawOp
+    friend class GrMSAAPathRenderer;             // for access to addDrawOp
+    friend class GrStencilAndCoverPathRenderer;  // for access to addDrawOp
+    friend class GrTessellatingPathRenderer;     // for access to addDrawOp
 
     void internalClear(const GrFixedClip&, const GrColor, bool canIgnoreClip);
 
@@ -449,9 +449,8 @@
                           const SkPath& path,
                           const GrStyle& style);
 
-    // This entry point allows the GrTextContext-derived classes to add their batches to
-    // the GrOpList.
-    void drawBatch(const GrPipelineBuilder& pipelineBuilder, const GrClip&, GrDrawOp* batch);
+    // This entry point allows the GrTextContext-derived classes to add their ops to the GrOpList.
+    void addDrawOp(const GrPipelineBuilder&, const GrClip&, GrDrawOp*);
 
     GrRenderTargetOpList* getOpList();
 
diff --git a/src/gpu/GrRenderTargetContext.cpp b/src/gpu/GrRenderTargetContext.cpp
index 6ea4f1b..bc29a70 100644
--- a/src/gpu/GrRenderTargetContext.cpp
+++ b/src/gpu/GrRenderTargetContext.cpp
@@ -274,11 +274,11 @@
         if (!this->accessRenderTarget()) {
             return;
         }
-        sk_sp<GrOp> batch(GrClearBatch::Make(clip, color, this->accessRenderTarget()));
-        if (!batch) {
+        sk_sp<GrOp> op(GrClearBatch::Make(clip, color, this->accessRenderTarget()));
+        if (!op) {
             return;
         }
-        this->getOpList()->addOp(std::move(batch));
+        this->getOpList()->addOp(std::move(op));
     }
 }
 
@@ -420,20 +420,19 @@
         return true;
     }
 
-    sk_sp<GrDrawOp> batch;
+    sk_sp<GrDrawOp> op;
     bool useHWAA;
 
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        batch.reset(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
-                                   paint.isAntiAlias(), fInstancedPipelineInfo,
-                                   &useHWAA));
-        if (batch) {
+        op.reset(ir->recordRect(croppedRect, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+                                fInstancedPipelineInfo, &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
             if (ss) {
                 pipelineBuilder.setUserStencil(ss);
             }
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return true;
         }
     }
@@ -444,14 +443,14 @@
             SkRect devBoundRect;
             viewMatrix.mapRect(&devBoundRect, croppedRect);
 
-            batch.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect, croppedRect,
-                                                         devBoundRect));
-            if (batch) {
+            op.reset(GrRectBatchFactory::CreateAAFill(paint, viewMatrix, rect, croppedRect,
+                                                      devBoundRect));
+            if (op) {
                 GrPipelineBuilder pipelineBuilder(paint, useHWAA);
                 if (ss) {
                     pipelineBuilder.setUserStencil(ss);
                 }
-                this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+                this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
                 return true;
             }
         }
@@ -551,13 +550,13 @@
 
         bool useHWAA;
         bool snapToPixelCenters = false;
-        sk_sp<GrDrawOp> batch;
+        sk_sp<GrDrawOp> op;
 
         GrColor color = paint.getColor();
         if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
             // The stroke path needs the rect to remain axis aligned (no rotation or skew).
             if (viewMatrix.rectStaysRect()) {
-                batch.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, stroke));
+                op.reset(GrRectBatchFactory::CreateAAStroke(color, viewMatrix, rect, stroke));
             }
         } else {
             // Depending on sub-pixel coordinates and the particular GPU, we may lose a corner of
@@ -565,11 +564,11 @@
             // when MSAA is enabled because it can cause ugly artifacts.
             snapToPixelCenters = stroke.getStyle() == SkStrokeRec::kHairline_Style &&
                                  !fRenderTargetProxy->isUnifiedMultisampled();
-            batch.reset(GrRectBatchFactory::CreateNonAAStroke(color, viewMatrix, rect,
-                                                              stroke, snapToPixelCenters));
+            op.reset(GrRectBatchFactory::CreateNonAAStroke(color, viewMatrix, rect,
+                                                           stroke, snapToPixelCenters));
         }
 
-        if (batch) {
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
 
             if (snapToPixelCenters) {
@@ -577,7 +576,7 @@
                                          snapToPixelCenters);
             }
 
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -688,12 +687,12 @@
 
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        sk_sp<GrDrawOp> batch(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
-                                             croppedLocalRect, paint.isAntiAlias(),
-                                             fInstancedPipelineInfo, &useHWAA));
-        if (batch) {
+        sk_sp<GrDrawOp> op(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
+                                          croppedLocalRect, paint.isAntiAlias(),
+                                          fInstancedPipelineInfo, &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -705,12 +704,10 @@
     }
 
     if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) {
-        sk_sp<GrDrawOp> batch(GrAAFillRectBatch::CreateWithLocalRect(paint.getColor(),
-                                                                     viewMatrix,
-                                                                     croppedRect,
-                                                                     croppedLocalRect));
+        sk_sp<GrDrawOp> op(GrAAFillRectBatch::CreateWithLocalRect(paint.getColor(), viewMatrix,
+                                                                  croppedRect, croppedLocalRect));
         GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-        this->drawBatch(pipelineBuilder, clip, batch.get());
+        this->addDrawOp(pipelineBuilder, clip, op.get());
         return;
     }
 
@@ -747,12 +744,11 @@
 
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        sk_sp<GrDrawOp> batch(ir->recordRect(croppedRect, viewMatrix, paint.getColor(),
-                                             localMatrix, paint.isAntiAlias(),
-                                             fInstancedPipelineInfo, &useHWAA));
-        if (batch) {
+        sk_sp<GrDrawOp> op(ir->recordRect(croppedRect, viewMatrix, paint.getColor(), localMatrix,
+                                          paint.isAntiAlias(), fInstancedPipelineInfo, &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -764,10 +760,10 @@
     }
 
     if (view_matrix_ok_for_aa_fill_rect(viewMatrix)) {
-        sk_sp<GrDrawOp> batch(GrAAFillRectBatch::Create(paint.getColor(), viewMatrix,
-                                                        localMatrix, croppedRect));
+        sk_sp<GrDrawOp> op(GrAAFillRectBatch::Create(paint.getColor(), viewMatrix, localMatrix,
+                                                     croppedRect));
         GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-        this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+        this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
         return;
     }
 
@@ -811,13 +807,12 @@
 
     viewMatrix.mapRect(&bounds);
 
-    sk_sp<GrDrawOp> batch(new GrDrawVerticesBatch(paint.getColor(),
-                                                  primitiveType, viewMatrix, positions,
-                                                  vertexCount, indices, indexCount,
-                                                  colors, texCoords, bounds));
+    sk_sp<GrDrawOp> op(new GrDrawVerticesBatch(paint.getColor(), primitiveType, viewMatrix,
+                                               positions, vertexCount, indices, indexCount, colors,
+                                               texCoords, bounds));
 
     GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -836,11 +831,11 @@
 
     AutoCheckFlush acf(fDrawingManager);
 
-    sk_sp<GrDrawOp> batch(new GrDrawAtlasBatch(paint.getColor(), viewMatrix, spriteCount,
-                                               xform, texRect, colors));
+    sk_sp<GrDrawOp> op(new GrDrawAtlasBatch(paint.getColor(), viewMatrix, spriteCount, xform,
+                                            texRect, colors));
 
     GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
 }
 
 ///////////////////////////////////////////////////////////////////////////////
@@ -862,7 +857,7 @@
     const GrClip* clip = &origClip;
 #ifdef SK_BUILD_FOR_ANDROID_FRAMEWORK
     // The Android framework frequently clips rrects to themselves where the clip is non-aa and the
-    // draw is aa. Since our lower level clip code works from batch bounds, which are SkRects, it
+    // draw is aa. Since our lower level clip code works from op bounds, which are SkRects, it
     // doesn't detect that the clip can be ignored (modulo antialiasing). The following test
     // attempts to mitigate the stencil clip cost but will only help when the entire clip stack
     // can be ignored. We'd prefer to fix this in the framework by removing the clips calls.
@@ -880,27 +875,26 @@
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
         stroke.isFillStyle()) {
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        sk_sp<GrDrawOp> batch(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
-                                              paint.isAntiAlias(), fInstancedPipelineInfo,
-                                              &useHWAA));
-        if (batch) {
+        sk_sp<GrDrawOp> op(ir->recordRRect(rrect, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+                                           fInstancedPipelineInfo, &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op.get());
             return;
         }
     }
 
     if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
         const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
-        sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateRRectBatch(paint.getColor(),
-                                                               paint.usesDistanceVectorField(),
-                                                               viewMatrix,
-                                                               rrect,
-                                                               stroke,
-                                                               shaderCaps));
-        if (batch) {
+        sk_sp<GrDrawOp> op(GrOvalRenderer::CreateRRectBatch(paint.getColor(),
+                                                            paint.usesDistanceVectorField(),
+                                                            viewMatrix,
+                                                            rrect,
+                                                            stroke,
+                                                            shaderCaps));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op.get());
             return;
         }
     }
@@ -937,27 +931,27 @@
     //if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
     //    stroke.isFillStyle()) {
     //    InstancedRendering* ir = this->getOpList()->instancedRendering();
-    //    SkAutoTUnref<GrDrawOp> batch(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
-    //                                                 paint.isAntiAlias(), fInstancedPipelineInfo,
-    //                                                 &useHWAA));
-    //    if (batch) {
+    //    SkAutoTUnref<GrDrawOp> op(ir->recordRRect(rrect, viewMatrix, paint.getColor(),
+    //                                              paint.isAntiAlias(), fInstancedPipelineInfo,
+    //                                              &useHWAA));
+    //    if (op) {
     //        GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-    //        this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, batch);
+    //        this->getOpList()->addDrawOp(pipelineBuilder, this, *clip, op);
     //        return;
     //    }
     //}
 
     if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
         const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
-        sk_sp<GrDrawOp> batch(CreateShadowRRectBatch(paint.getColor(),
-                                                     viewMatrix,
-                                                     rrect,
-                                                     blurRadius,
-                                                     stroke,
-                                                     shaderCaps));
-        if (batch) {
+        sk_sp<GrDrawOp> op(CreateShadowRRectBatch(paint.getColor(),
+                                                  viewMatrix,
+                                                  rrect,
+                                                  blurRadius,
+                                                  stroke,
+                                                  shaderCaps));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -981,12 +975,12 @@
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport()) {
         bool useHWAA;
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        sk_sp<GrDrawOp> batch(ir->recordDRRect(origOuter, origInner, viewMatrix,
-                                               paintIn.getColor(), paintIn.isAntiAlias(),
-                                               fInstancedPipelineInfo, &useHWAA));
-        if (batch) {
+        sk_sp<GrDrawOp> op(ir->recordDRRect(origOuter, origInner, viewMatrix, paintIn.getColor(),
+                                            paintIn.isAntiAlias(), fInstancedPipelineInfo,
+                                            &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paintIn, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return true;
         }
     }
@@ -1099,9 +1093,9 @@
         return this->drawPath(clip, paint, viewMatrix, path, style);
     }
 
-    sk_sp<GrDrawOp> batch(GrRegionBatch::Create(paint.getColor(), viewMatrix, region));
+    sk_sp<GrDrawOp> op(GrRegionBatch::Create(paint.getColor(), viewMatrix, region));
     GrPipelineBuilder pipelineBuilder(paint, false);
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
 }
 
 void GrRenderTargetContext::drawOval(const GrClip& clip,
@@ -1127,26 +1121,25 @@
     if (GrCaps::InstancedSupport::kNone != fContext->caps()->instancedSupport() &&
         stroke.isFillStyle()) {
         InstancedRendering* ir = this->getOpList()->instancedRendering();
-        sk_sp<GrDrawOp> batch(ir->recordOval(oval, viewMatrix, paint.getColor(),
-                                             paint.isAntiAlias(), fInstancedPipelineInfo,
-                                             &useHWAA));
-        if (batch) {
+        sk_sp<GrDrawOp> op(ir->recordOval(oval, viewMatrix, paint.getColor(), paint.isAntiAlias(),
+                                          fInstancedPipelineInfo, &useHWAA));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
 
     if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
         const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
-        sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
-                                                              viewMatrix,
-                                                              oval,
-                                                              stroke,
-                                                              shaderCaps));
-        if (batch) {
+        sk_sp<GrDrawOp> op(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
+                                                           viewMatrix,
+                                                           oval,
+                                                           stroke,
+                                                           shaderCaps));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -1168,17 +1161,17 @@
     bool useHWAA;
     if (should_apply_coverage_aa(paint, fRenderTargetProxy.get(), &useHWAA)) {
         const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
-        sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateArcBatch(paint.getColor(),
-                                                             viewMatrix,
-                                                             oval,
-                                                             startAngle,
-                                                             sweepAngle,
-                                                             useCenter,
-                                                             style,
-                                                             shaderCaps));
-        if (batch) {
+        sk_sp<GrDrawOp> op(GrOvalRenderer::CreateArcBatch(paint.getColor(),
+                                                          viewMatrix,
+                                                          oval,
+                                                          startAngle,
+                                                          sweepAngle,
+                                                          useCenter,
+                                                          style,
+                                                          shaderCaps));
+        if (op) {
             GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+            this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
             return;
         }
     }
@@ -1203,12 +1196,11 @@
 
     AutoCheckFlush acf(fDrawingManager);
 
-    sk_sp<GrDrawOp> batch(GrNinePatch::CreateNonAA(paint.getColor(), viewMatrix,
-                                                   imageWidth, imageHeight,
-                                                   std::move(iter), dst));
+    sk_sp<GrDrawOp> op(GrNinePatch::CreateNonAA(paint.getColor(), viewMatrix, imageWidth,
+                                                imageHeight, std::move(iter), dst));
 
     GrPipelineBuilder pipelineBuilder(paint, this->mustUseHWAA(paint));
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
 }
 
 void GrRenderTargetContext::prepareForExternalIO() {
@@ -1238,14 +1230,13 @@
                                                 const GrUserStencilSettings* ss,
                                                 bool useHWAA) {
     SkASSERT(!useHWAA || this->isStencilBufferMultisampled());
-    sk_sp<GrDrawOp> batch(
-            GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, rect, localRect,
-                                                localMatrix));
+    sk_sp<GrDrawOp> op( GrRectBatchFactory::CreateNonAAFill(paint.getColor(), viewMatrix, rect,
+                                                            localRect, localMatrix));
     GrPipelineBuilder pipelineBuilder(paint, useHWAA);
     if (ss) {
         pipelineBuilder.setUserStencil(ss);
     }
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
 }
 
 bool GrRenderTargetContext::readPixels(const SkImageInfo& dstInfo, void* dstBuffer,
@@ -1368,11 +1359,11 @@
             SkRect rects[2];
 
             if (fills_as_nested_rects(viewMatrix, path, rects)) {
-                sk_sp<GrDrawOp> batch(GrRectBatchFactory::CreateAAFillNestedRects(
+                sk_sp<GrDrawOp> op(GrRectBatchFactory::CreateAAFillNestedRects(
                     paint.getColor(), viewMatrix, rects));
-                if (batch) {
+                if (op) {
                     GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-                    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+                    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
                 }
                 return;
             }
@@ -1382,14 +1373,14 @@
 
         if (isOval && !path.isInverseFillType()) {
             const GrShaderCaps* shaderCaps = fContext->caps()->shaderCaps();
-            sk_sp<GrDrawOp> batch(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
-                                                                  viewMatrix,
-                                                                  ovalRect,
-                                                                  style.strokeRec(),
-                                                                  shaderCaps));
-            if (batch) {
+            sk_sp<GrDrawOp> op(GrOvalRenderer::CreateOvalBatch(paint.getColor(),
+                                                               viewMatrix,
+                                                               ovalRect,
+                                                               style.strokeRec(),
+                                                               shaderCaps));
+            if (op) {
                 GrPipelineBuilder pipelineBuilder(paint, useHWAA);
-                this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch.get());
+                this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op.get());
                 return;
             }
         }
@@ -1555,12 +1546,12 @@
     pr->drawPath(args);
 }
 
-void GrRenderTargetContext::drawBatch(const GrPipelineBuilder& pipelineBuilder, const GrClip& clip,
-                                      GrDrawOp* batch) {
+void GrRenderTargetContext::addDrawOp(const GrPipelineBuilder& pipelineBuilder, const GrClip& clip,
+                                      GrDrawOp* op) {
     ASSERT_SINGLE_OWNER
     RETURN_IF_ABANDONED
     SkDEBUGCODE(this->validate();)
-    GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::drawBatch");
+    GR_AUDIT_TRAIL_AUTO_FRAME(fAuditTrail, "GrRenderTargetContext::addDrawOp");
 
-    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, batch);
+    this->getOpList()->addDrawOp(pipelineBuilder, this, clip, op);
 }
diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp
index 0eef23a..ec76c48 100644
--- a/src/gpu/GrSWMaskHelper.cpp
+++ b/src/gpu/GrSWMaskHelper.cpp
@@ -196,5 +196,5 @@
 
     sk_sp<GrDrawOp> batch(GrRectBatchFactory::CreateNonAAFill(paint.getColor(), SkMatrix::I(),
                                                               dstRect, nullptr, &invert));
-    renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+    renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
 }
diff --git a/src/gpu/GrSoftwarePathRenderer.cpp b/src/gpu/GrSoftwarePathRenderer.cpp
index e978ec4..8b941eb 100644
--- a/src/gpu/GrSoftwarePathRenderer.cpp
+++ b/src/gpu/GrSoftwarePathRenderer.cpp
@@ -74,7 +74,7 @@
     GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
     pipelineBuilder.setUserStencil(&userStencilSettings);
 
-    renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+    renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
 }
 
 void GrSoftwarePathRenderer::DrawAroundInvPath(GrRenderTargetContext* renderTargetContext,
diff --git a/src/gpu/batches/GrAAConvexPathRenderer.cpp b/src/gpu/batches/GrAAConvexPathRenderer.cpp
index 0107e27..7de67f6 100644
--- a/src/gpu/batches/GrAAConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAAConvexPathRenderer.cpp
@@ -1005,7 +1005,7 @@
     GrPipelineBuilder pipelineBuilder(*args.fPaint);
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     return true;
 
diff --git a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
index b06c503..8f7c679 100644
--- a/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
+++ b/src/gpu/batches/GrAADistanceFieldPathRenderer.cpp
@@ -543,7 +543,7 @@
     GrPipelineBuilder pipelineBuilder(*args.fPaint);
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     return true;
 }
diff --git a/src/gpu/batches/GrAAHairLinePathRenderer.cpp b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
index 624be6e..8ff4231 100644
--- a/src/gpu/batches/GrAAHairLinePathRenderer.cpp
+++ b/src/gpu/batches/GrAAHairLinePathRenderer.cpp
@@ -983,7 +983,7 @@
 
     GrPipelineBuilder pipelineBuilder(*args.fPaint);
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     return true;
 }
diff --git a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
index f3a76cb..f959df6 100644
--- a/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
+++ b/src/gpu/batches/GrAALinearizingConvexPathRenderer.cpp
@@ -364,7 +364,7 @@
     GrPipelineBuilder pipelineBuilder(*args.fPaint);
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     return true;
 }
diff --git a/src/gpu/batches/GrDashLinePathRenderer.cpp b/src/gpu/batches/GrDashLinePathRenderer.cpp
index b64f5de..d2a420d 100644
--- a/src/gpu/batches/GrDashLinePathRenderer.cpp
+++ b/src/gpu/batches/GrDashLinePathRenderer.cpp
@@ -51,6 +51,6 @@
     GrPipelineBuilder pipelineBuilder(*args.fPaint, useHWAA);
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
     return true;
 }
diff --git a/src/gpu/batches/GrDefaultPathRenderer.cpp b/src/gpu/batches/GrDefaultPathRenderer.cpp
index e41818d..ce51cf0 100644
--- a/src/gpu/batches/GrDefaultPathRenderer.cpp
+++ b/src/gpu/batches/GrDefaultPathRenderer.cpp
@@ -571,7 +571,7 @@
             pipelineBuilder.setDrawFace(drawFace[p]);
             pipelineBuilder.setUserStencil(passes[p]);
 
-            renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+            renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
         } else {
             sk_sp<GrDrawOp> batch(new DefaultPathBatch(paint.getColor(), path, srcSpaceTol,
                                                        newCoverage, viewMatrix, isHairline,
@@ -584,7 +584,7 @@
                 pipelineBuilder.setDisableColorXPFactory();
             }
 
-            renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+            renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
         }
     }
     return true;
diff --git a/src/gpu/batches/GrMSAAPathRenderer.cpp b/src/gpu/batches/GrMSAAPathRenderer.cpp
index 5aa8f37..6b96349 100644
--- a/src/gpu/batches/GrMSAAPathRenderer.cpp
+++ b/src/gpu/batches/GrMSAAPathRenderer.cpp
@@ -665,7 +665,7 @@
             GrPipelineBuilder pipelineBuilder(paint, renderTargetContext->mustUseHWAA(paint));
             pipelineBuilder.setUserStencil(passes[p]);
 
-            renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+            renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
         } else {
             sk_sp<MSAAPathBatch> batch(new MSAAPathBatch(paint.getColor(), path,
                                                          viewMatrix, devBounds));
@@ -679,7 +679,7 @@
                 pipelineBuilder.setDisableColorXPFactory();
             }
 
-            renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+            renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
         }
     }
     return true;
diff --git a/src/gpu/batches/GrPLSPathRenderer.cpp b/src/gpu/batches/GrPLSPathRenderer.cpp
index f233ccc..bdc1024 100644
--- a/src/gpu/batches/GrPLSPathRenderer.cpp
+++ b/src/gpu/batches/GrPLSPathRenderer.cpp
@@ -941,7 +941,7 @@
                                       args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     SkDEBUGCODE(inPLSDraw = false;)
     return true;
diff --git a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
index c12f299..97287d2 100644
--- a/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
+++ b/src/gpu/batches/GrStencilAndCoverPathRenderer.cpp
@@ -147,7 +147,7 @@
                                               !args.fRenderTargetContext->hasMixedSamples());
             pipelineBuilder.setUserStencil(&kInvertedCoverPass);
 
-            args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, coverBatch.get());
+            args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, coverBatch.get());
         }
     } else {
         static constexpr GrUserStencilSettings kCoverPass(
@@ -170,7 +170,7 @@
             pipelineBuilder.enableState(GrPipelineBuilder::kHWAntialias_Flag);
         }
 
-        args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+        args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
     }
 
     return true;
diff --git a/src/gpu/batches/GrTessellatingPathRenderer.cpp b/src/gpu/batches/GrTessellatingPathRenderer.cpp
index 6e78c11..e0327d0 100644
--- a/src/gpu/batches/GrTessellatingPathRenderer.cpp
+++ b/src/gpu/batches/GrTessellatingPathRenderer.cpp
@@ -370,7 +370,7 @@
                                       args.fRenderTargetContext->mustUseHWAA(*args.fPaint));
     pipelineBuilder.setUserStencil(args.fUserStencilSettings);
 
-    args.fRenderTargetContext->drawBatch(pipelineBuilder, *args.fClip, batch.get());
+    args.fRenderTargetContext->addDrawOp(pipelineBuilder, *args.fClip, batch.get());
 
     return true;
 }
diff --git a/src/gpu/text/GrAtlasTextBlob.cpp b/src/gpu/text/GrAtlasTextBlob.cpp
index b1e4f92..5b35f84 100644
--- a/src/gpu/text/GrAtlasTextBlob.cpp
+++ b/src/gpu/text/GrAtlasTextBlob.cpp
@@ -326,7 +326,7 @@
 
         GrPipelineBuilder pipelineBuilder(grPaint, rtc->mustUseHWAA(grPaint));
 
-        rtc->drawBatch(pipelineBuilder, clip, batch.get());
+        rtc->addDrawOp(pipelineBuilder, clip, batch.get());
     }
 }
 
diff --git a/src/gpu/text/GrStencilAndCoverTextContext.cpp b/src/gpu/text/GrStencilAndCoverTextContext.cpp
index 23fdea2..ba98784 100644
--- a/src/gpu/text/GrStencilAndCoverTextContext.cpp
+++ b/src/gpu/text/GrStencilAndCoverTextContext.cpp
@@ -644,7 +644,7 @@
         pipelineBuilder.setState(GrPipelineBuilder::kHWAntialias_Flag, grPaint.isAntiAlias());
         pipelineBuilder.setUserStencil(&kCoverPass);
 
-        renderTargetContext->drawBatch(pipelineBuilder, clip, batch.get());
+        renderTargetContext->addDrawOp(pipelineBuilder, clip, batch.get());
     }
 
     if (fFallbackTextBlob) {