Revert "Change UnrefDDLTask to just be the DDLTask"

This CL reverts the following 3 CLs due to coupled perf and memory regressions:

88e8bb2 https://skia-review.googlesource.com/c/skia/+/333576 (Fix UMR (valgrind) bug in GrDrawingManager)
cca1976 https://skia-review.googlesource.com/c/skia/+/333463 (Remove the bulk add-renderTasks entry point from the drawing manager)
02dd0ed https://skia-review.googlesource.com/c/skia/+/332600 (Change UnrefDDLTask to just be the DDLTask)

Bug: 1147659, 1147634, 1147650, skia:10936
Change-Id: I937d656c4126eac954a9d7930a4034488d6ef5df
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/334061
Reviewed-by: Adlai Holler <adlai@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrRenderTask.cpp b/src/gpu/GrRenderTask.cpp
index 460454a..2a0e915 100644
--- a/src/gpu/GrRenderTask.cpp
+++ b/src/gpu/GrRenderTask.cpp
@@ -257,16 +257,19 @@
 }
 
 bool GrRenderTask::isInstantiated() const {
-    for (const GrSurfaceProxyView& target : fTargets) {
-        GrSurfaceProxy* proxy = target.proxy();
-        if (!proxy->isInstantiated()) {
-            return false;
-        }
+    // Some renderTasks (e.g. GrTransferFromRenderTask) don't have any targets.
+    if (0 == this->numTargets()) {
+        return true;
+    }
+    GrSurfaceProxy* proxy = this->target(0).proxy();
 
-        GrSurface* surface = proxy->peekSurface();
-        if (surface->wasDestroyed()) {
-            return false;
-        }
+    if (!proxy->isInstantiated()) {
+        return false;
+    }
+
+    GrSurface* surface = proxy->peekSurface();
+    if (surface->wasDestroyed()) {
+        return false;
     }
 
     return true;
@@ -288,9 +291,10 @@
 
     if (!fTargets.empty()) {
         SkDebugf("Targets: \n");
-        for (const GrSurfaceProxyView& target : fTargets) {
-            GrSurfaceProxy* proxy = target.proxy();
-            SkDebugf("proxyID: %d - surfaceID: %d\n",
+        for (int i = 0; i < fTargets.count(); ++i) {
+            GrSurfaceProxy* proxy = fTargets[i].proxy();
+            SkDebugf("[%d]: proxyID: %d - surfaceID: %d\n",
+                     i,
                      proxy ? proxy->uniqueID().asUInt() : -1,
                      proxy && proxy->peekSurface()
                             ? proxy->peekSurface()->uniqueID().asUInt()