Revert "Merge GrOpList and GrRTOpList and rename to GrOpsTask."

This reverts commit 2a5954140b49d18e5161a30a4ae2c7ac28bc1993.

Reason for revert: breaking everything

Original change's description:
> Merge GrOpList and GrRTOpList and rename to GrOpsTask.
> 
> Change-Id: I8f4f2218a30fd0541a8f79f7bb9850f9500cd243
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236343
> Commit-Queue: Greg Daniel <egdaniel@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>

TBR=egdaniel@google.com,bsalomon@google.com,robertphillips@google.com

Change-Id: I27840ea0343e8e6b388556afb7bd2e76386d611d
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/236349
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
diff --git a/src/gpu/ccpr/GrCCClipPath.h b/src/gpu/ccpr/GrCCClipPath.h
index 32e5ae4..1494d2c6 100644
--- a/src/gpu/ccpr/GrCCClipPath.h
+++ b/src/gpu/ccpr/GrCCClipPath.h
@@ -19,7 +19,7 @@
 
 /**
  * These are keyed by SkPath generation ID, and store which device-space paths are accessed and
- * where by clip FPs in a given opsTask. A single GrCCClipPath can be referenced by multiple FPs. At
+ * where by clip FPs in a given opList. A single GrCCClipPath can be referenced by multiple FPs. At
  * flush time their coverage count masks are packed into atlas(es) alongside normal DrawPathOps.
  */
 class GrCCClipPath {
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.cpp b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
index 4ad6cd9..0a6433c 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.cpp
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.cpp
@@ -111,7 +111,7 @@
     // If the path is clipped, CCPR will only draw the visible portion. This helps improve batching,
     // since it eliminates the need for scissor when drawing to the main canvas.
     // FIXME: We should parse the path right here. It will provide a tighter bounding box for us to
-    // give the opsTask, as well as enabling threaded parsing when using DDL.
+    // give the opList, as well as enabling threaded parsing when using DDL.
     SkRect clippedDrawBounds;
     if (!clippedDrawBounds.intersect(conservativeDevBounds, SkRect::Make(maskDevIBounds))) {
         clippedDrawBounds.setEmpty();
@@ -122,9 +122,9 @@
 }
 
 GrCCDrawPathsOp::~GrCCDrawPathsOp() {
-    if (fOwningPerOpsTaskPaths) {
+    if (fOwningPerOpListPaths) {
         // Remove the list's dangling pointer to this Op before deleting it.
-        fOwningPerOpsTaskPaths->fDrawOps.remove(this);
+        fOwningPerOpListPaths->fDrawOps.remove(this);
     }
 }
 
@@ -195,10 +195,9 @@
 
 GrOp::CombineResult GrCCDrawPathsOp::onCombineIfPossible(GrOp* op, const GrCaps&) {
     GrCCDrawPathsOp* that = op->cast<GrCCDrawPathsOp>();
-    SkASSERT(fOwningPerOpsTaskPaths);
+    SkASSERT(fOwningPerOpListPaths);
     SkASSERT(fNumDraws);
-    SkASSERT(!that->fOwningPerOpsTaskPaths ||
-             that->fOwningPerOpsTaskPaths == fOwningPerOpsTaskPaths);
+    SkASSERT(!that->fOwningPerOpListPaths || that->fOwningPerOpListPaths == fOwningPerOpListPaths);
     SkASSERT(that->fNumDraws);
 
     if (fProcessors != that->fProcessors ||
@@ -206,18 +205,18 @@
         return CombineResult::kCannotCombine;
     }
 
-    fDraws.append(std::move(that->fDraws), &fOwningPerOpsTaskPaths->fAllocator);
+    fDraws.append(std::move(that->fDraws), &fOwningPerOpListPaths->fAllocator);
 
     SkDEBUGCODE(fNumDraws += that->fNumDraws);
     SkDEBUGCODE(that->fNumDraws = 0);
     return CombineResult::kMerged;
 }
 
-void GrCCDrawPathsOp::addToOwningPerOpsTaskPaths(sk_sp<GrCCPerOpsTaskPaths> owningPerOpsTaskPaths) {
+void GrCCDrawPathsOp::addToOwningPerOpListPaths(sk_sp<GrCCPerOpListPaths> owningPerOpListPaths) {
     SkASSERT(1 == fNumDraws);
-    SkASSERT(!fOwningPerOpsTaskPaths);
-    fOwningPerOpsTaskPaths = std::move(owningPerOpsTaskPaths);
-    fOwningPerOpsTaskPaths->fDrawOps.addToTail(this);
+    SkASSERT(!fOwningPerOpListPaths);
+    fOwningPerOpListPaths = std::move(owningPerOpListPaths);
+    fOwningPerOpListPaths->fDrawOps.addToTail(this);
 }
 
 void GrCCDrawPathsOp::accountForOwnPaths(GrCCPathCache* pathCache,
@@ -415,9 +414,9 @@
 }
 
 void GrCCDrawPathsOp::onExecute(GrOpFlushState* flushState, const SkRect& chainBounds) {
-    SkASSERT(fOwningPerOpsTaskPaths);
+    SkASSERT(fOwningPerOpListPaths);
 
-    const GrCCPerFlushResources* resources = fOwningPerOpsTaskPaths->fFlushResources.get();
+    const GrCCPerFlushResources* resources = fOwningPerOpListPaths->fFlushResources.get();
     if (!resources) {
         return;  // Setup failed.
     }
diff --git a/src/gpu/ccpr/GrCCDrawPathsOp.h b/src/gpu/ccpr/GrCCDrawPathsOp.h
index d0c4777..1499c28 100644
--- a/src/gpu/ccpr/GrCCDrawPathsOp.h
+++ b/src/gpu/ccpr/GrCCDrawPathsOp.h
@@ -17,7 +17,7 @@
 class GrCCAtlas;
 class GrCCPerFlushResources;
 struct GrCCPerFlushResourceSpecs;
-struct GrCCPerOpsTaskPaths;
+struct GrCCPerOpListPaths;
 class GrOnFlushResourceProvider;
 class GrRecordingContext;
 
@@ -46,7 +46,7 @@
     }
     void onPrepare(GrOpFlushState*) override {}
 
-    void addToOwningPerOpsTaskPaths(sk_sp<GrCCPerOpsTaskPaths> owningPerOpsTaskPaths);
+    void addToOwningPerOpListPaths(sk_sp<GrCCPerOpListPaths> owningPerOpListPaths);
 
     // Makes decisions about how to draw each path (cached, copied, rendered, etc.), and
     // increments/fills out the corresponding GrCCPerFlushResourceSpecs.
@@ -125,9 +125,9 @@
         friend class GrCCSTLList<SingleDraw>;  // To access fNext.
     };
 
-    // Declare fOwningPerOpsTaskPaths first, before fDraws. The draws use memory allocated by
-    // fOwningPerOpsTaskPaths, so it must not be unreffed until after fDraws is destroyed.
-    sk_sp<GrCCPerOpsTaskPaths> fOwningPerOpsTaskPaths;
+    // Declare fOwningPerOpListPaths first, before fDraws. The draws use memory allocated by
+    // fOwningPerOpListPaths, so it must not be unreffed until after fDraws is destroyed.
+    sk_sp<GrCCPerOpListPaths> fOwningPerOpListPaths;
 
     GrCCSTLList<SingleDraw> fDraws;
     SkDEBUGCODE(int fNumDraws = 1);
diff --git a/src/gpu/ccpr/GrCCPerFlushResources.h b/src/gpu/ccpr/GrCCPerFlushResources.h
index f2504e6..59122fe 100644
--- a/src/gpu/ccpr/GrCCPerFlushResources.h
+++ b/src/gpu/ccpr/GrCCPerFlushResources.h
@@ -62,8 +62,8 @@
 
 /**
  * This class wraps all the GPU resources that CCPR builds at flush time. It is allocated in CCPR's
- * preFlush() method, and referenced by all the GrCCPerOpsTaskPaths objects that are being flushed.
- * It is deleted in postFlush() once all the flushing GrCCPerOpsTaskPaths objects are deleted.
+ * preFlush() method, and referenced by all the GrCCPerOpListPaths objects that are being flushed.
+ * It is deleted in postFlush() once all the flushing GrCCPerOpListPaths objects are deleted.
  */
 class GrCCPerFlushResources : public GrNonAtomicRef<GrCCPerFlushResources> {
 public:
diff --git a/src/gpu/ccpr/GrCCPerOpsTaskPaths.h b/src/gpu/ccpr/GrCCPerOpListPaths.h
similarity index 78%
rename from src/gpu/ccpr/GrCCPerOpsTaskPaths.h
rename to src/gpu/ccpr/GrCCPerOpListPaths.h
index ff8a224..e0dd115 100644
--- a/src/gpu/ccpr/GrCCPerOpsTaskPaths.h
+++ b/src/gpu/ccpr/GrCCPerOpListPaths.h
@@ -5,8 +5,8 @@
  * found in the LICENSE file.
  */
 
-#ifndef GrCCPerOpsTaskPaths_DEFINED
-#define GrCCPerOpsTaskPaths_DEFINED
+#ifndef GrCCPerOpListPaths_DEFINED
+#define GrCCPerOpListPaths_DEFINED
 
 #include "include/core/SkRefCnt.h"
 #include "src/core/SkArenaAlloc.h"
@@ -19,10 +19,10 @@
 class GrCCPerFlushResources;
 
 /**
- * Tracks all the CCPR paths in a given opsTask that will be drawn when it flushes.
+ * Tracks all the CCPR paths in a given opList that will be drawn when it flushes.
  */
 // DDL TODO: given the usage pattern in DDL mode, this could probably be non-atomic refcounting.
-struct GrCCPerOpsTaskPaths : public SkRefCnt {
+struct GrCCPerOpListPaths : public SkRefCnt {
     SkTInternalLList<GrCCDrawPathsOp> fDrawOps;  // This class does not own these ops.
     std::map<uint32_t, GrCCClipPath> fClipPaths;
     SkSTArenaAlloc<10 * 1024> fAllocator{10 * 1024 * 2};
diff --git a/src/gpu/ccpr/GrCCSTLList.h b/src/gpu/ccpr/GrCCSTLList.h
index 29f26b9..eb75863 100644
--- a/src/gpu/ccpr/GrCCSTLList.h
+++ b/src/gpu/ccpr/GrCCSTLList.h
@@ -14,8 +14,8 @@
 
 /**
  * A singly-linked list whose head element is a local class member. This is required by
- * GrCCDrawPathsOp because the owning opsTask is unknown at the time of creation, so we can't use
- * its associated allocator to create the first element.
+ * GrCCDrawPathsOp because the owning opList is unknown at the time of creation, so we can't use its
+ * associated allocator to create the first element.
  */
 template<typename T> class GrCCSTLList : SkNoncopyable {
 public:
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
index 4798b6f..a9e080b 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
@@ -71,11 +71,11 @@
     }
 }
 
-GrCCPerOpsTaskPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opsTaskID) {
-    auto it = fPendingPaths.find(opsTaskID);
+GrCCPerOpListPaths* GrCoverageCountingPathRenderer::lookupPendingPaths(uint32_t opListID) {
+    auto it = fPendingPaths.find(opListID);
     if (fPendingPaths.end() == it) {
-        sk_sp<GrCCPerOpsTaskPaths> paths = sk_make_sp<GrCCPerOpsTaskPaths>();
-        it = fPendingPaths.insert(std::make_pair(opsTaskID, std::move(paths))).first;
+        sk_sp<GrCCPerOpListPaths> paths = sk_make_sp<GrCCPerOpListPaths>();
+        it = fPendingPaths.insert(std::make_pair(opListID, std::move(paths))).first;
     }
     return it->second.get();
 }
@@ -182,17 +182,16 @@
 void GrCoverageCountingPathRenderer::recordOp(std::unique_ptr<GrCCDrawPathsOp> op,
                                               const DrawPathArgs& args) {
     if (op) {
-        auto addToOwningPerOpsTaskPaths = [this](GrOp* op, uint32_t opsTaskID) {
-            op->cast<GrCCDrawPathsOp>()->addToOwningPerOpsTaskPaths(
-                    sk_ref_sp(this->lookupPendingPaths(opsTaskID)));
+        auto addToOwningPerOpListPaths = [this](GrOp* op, uint32_t opListID) {
+            op->cast<GrCCDrawPathsOp>()->addToOwningPerOpListPaths(
+                    sk_ref_sp(this->lookupPendingPaths(opListID)));
         };
-        args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op),
-                                             addToOwningPerOpsTaskPaths);
+        args.fRenderTargetContext->addDrawOp(*args.fClip, std::move(op), addToOwningPerOpListPaths);
     }
 }
 
 std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor(
-        uint32_t opsTaskID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
+        uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
         const GrCaps& caps) {
     SkASSERT(!fFlushing);
 
@@ -203,7 +202,7 @@
         key = (key << 1) | (uint32_t)GrFillRuleForSkPath(deviceSpacePath);
     }
     GrCCClipPath& clipPath =
-            this->lookupPendingPaths(opsTaskID)->fClipPaths[key];
+            this->lookupPendingPaths(opListID)->fClipPaths[key];
     if (!clipPath.isInitialized()) {
         // This ClipPath was just created during lookup. Initialize it.
         const SkRect& pathDevBounds = deviceSpacePath.getBounds();
@@ -229,8 +228,8 @@
 
 void GrCoverageCountingPathRenderer::preFlush(
         GrOnFlushResourceProvider* onFlushRP,
-        const uint32_t* opsTaskIDs,
-        int numOpsTaskIDs,
+        const uint32_t* opListIDs,
+        int numOpListIDs,
         SkTArray<std::unique_ptr<GrRenderTargetContext>>* out) {
     using DoCopiesToA8Coverage = GrCCDrawPathsOp::DoCopiesToA8Coverage;
     SkASSERT(!fFlushing);
@@ -252,13 +251,13 @@
     specs.fRenderedAtlasSpecs.fMaxPreferredTextureSize = maxPreferredRTSize;
     specs.fRenderedAtlasSpecs.fMinTextureSize = SkTMin(512, maxPreferredRTSize);
 
-    // Move the per-opsTask paths that are about to be flushed from fPendingPaths to fFlushingPaths,
+    // Move the per-opList paths that are about to be flushed from fPendingPaths to fFlushingPaths,
     // and count them up so we can preallocate buffers.
-    fFlushingPaths.reserve(numOpsTaskIDs);
-    for (int i = 0; i < numOpsTaskIDs; ++i) {
-        auto iter = fPendingPaths.find(opsTaskIDs[i]);
+    fFlushingPaths.reserve(numOpListIDs);
+    for (int i = 0; i < numOpListIDs; ++i) {
+        auto iter = fPendingPaths.find(opListIDs[i]);
         if (fPendingPaths.end() == iter) {
-            continue;  // No paths on this opsTask.
+            continue;  // No paths on this opList.
         }
 
         fFlushingPaths.push_back(std::move(iter->second));
@@ -319,8 +318,8 @@
     }
 }
 
-void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opsTaskIDs,
-                                               int numOpsTaskIDs) {
+void GrCoverageCountingPathRenderer::postFlush(GrDeferredUploadToken, const uint32_t* opListIDs,
+                                               int numOpListIDs) {
     SkASSERT(fFlushing);
 
     if (!fFlushingPaths.empty()) {
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
index 4a7ca18..0450918 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer.h
@@ -10,10 +10,10 @@
 
 #include <map>
 #include "src/gpu/GrOnFlushResourceProvider.h"
-#include "src/gpu/GrOpsTask.h"
 #include "src/gpu/GrPathRenderer.h"
+#include "src/gpu/GrRenderTargetOpList.h"
 #include "src/gpu/ccpr/GrCCPerFlushResources.h"
-#include "src/gpu/ccpr/GrCCPerOpsTaskPaths.h"
+#include "src/gpu/ccpr/GrCCPerOpListPaths.h"
 
 class GrCCDrawPathsOp;
 class GrCCPathCache;
@@ -41,16 +41,16 @@
 
     CoverageType coverageType() const { return fCoverageType; }
 
-    using PendingPathsMap = std::map<uint32_t, sk_sp<GrCCPerOpsTaskPaths>>;
+    using PendingPathsMap = std::map<uint32_t, sk_sp<GrCCPerOpListPaths>>;
 
-    // In DDL mode, Ganesh needs to be able to move the pending GrCCPerOpsTaskPaths to the DDL
-    // object (detachPendingPaths) and then return them upon replay (mergePendingPaths).
+    // In DDL mode, Ganesh needs to be able to move the pending GrCCPerOpListPaths to the DDL object
+    // (detachPendingPaths) and then return them upon replay (mergePendingPaths).
     PendingPathsMap detachPendingPaths() { return std::move(fPendingPaths); }
 
     void mergePendingPaths(const PendingPathsMap& paths) {
 #ifdef SK_DEBUG
-        // Ensure there are no duplicate opsTask IDs between the incoming path map and ours.
-        // This should always be true since opsTask IDs are globally unique and these are coming
+        // Ensure there are no duplicate opList IDs between the incoming path map and ours.
+        // This should always be true since opList IDs are globally unique and these are coming
         // from different DDL recordings.
         for (const auto& it : paths) {
             SkASSERT(!fPendingPaths.count(it.first));
@@ -65,9 +65,9 @@
             const GrCaps&);
 
     // GrOnFlushCallbackObject overrides.
-    void preFlush(GrOnFlushResourceProvider*, const uint32_t* opsTaskIDs, int numOpsTaskIDs,
+    void preFlush(GrOnFlushResourceProvider*, const uint32_t* opListIDs, int numOpListIDs,
                   SkTArray<std::unique_ptr<GrRenderTargetContext>>* out) override;
-    void postFlush(GrDeferredUploadToken, const uint32_t* opsTaskIDs, int numOpsTaskIDs) override;
+    void postFlush(GrDeferredUploadToken, const uint32_t* opListIDs, int numOpListIDs) override;
 
     void purgeCacheEntriesOlderThan(GrProxyProvider*, const GrStdSteadyClock::time_point&);
 
@@ -94,19 +94,19 @@
     CanDrawPath onCanDrawPath(const CanDrawPathArgs&) const override;
     bool onDrawPath(const DrawPathArgs&) override;
 
-    GrCCPerOpsTaskPaths* lookupPendingPaths(uint32_t opsTaskID);
+    GrCCPerOpListPaths* lookupPendingPaths(uint32_t opListID);
     void recordOp(std::unique_ptr<GrCCDrawPathsOp>, const DrawPathArgs&);
 
     const CoverageType fCoverageType;
 
-    // fPendingPaths holds the GrCCPerOpsTaskPaths objects that have already been created, but not
-    // flushed, and those that are still being created. All GrCCPerOpsTaskPaths objects will first
+    // fPendingPaths holds the GrCCPerOpListPaths objects that have already been created, but not
+    // flushed, and those that are still being created. All GrCCPerOpListPaths objects will first
     // reside in fPendingPaths, then be moved to fFlushingPaths during preFlush().
     PendingPathsMap fPendingPaths;
 
-    // fFlushingPaths holds the GrCCPerOpsTaskPaths objects that are currently being flushed.
+    // fFlushingPaths holds the GrCCPerOpListPaths objects that are currently being flushed.
     // (It will only contain elements when fFlushing is true.)
-    SkSTArray<4, sk_sp<GrCCPerOpsTaskPaths>> fFlushingPaths;
+    SkSTArray<4, sk_sp<GrCCPerOpListPaths>> fFlushingPaths;
 
     std::unique_ptr<GrCCPathCache> fPathCache;
 
diff --git a/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp b/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp
index 1b2a55e..0b61e4b 100644
--- a/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp
+++ b/src/gpu/ccpr/GrCoverageCountingPathRenderer_none.cpp
@@ -17,7 +17,7 @@
 }
 
 std::unique_ptr<GrFragmentProcessor> GrCoverageCountingPathRenderer::makeClipProcessor(
-        uint32_t opsTaskID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
+        uint32_t opListID, const SkPath& deviceSpacePath, const SkIRect& accessRect,
         const GrCaps& caps) {
     return nullptr;
 }