Elevate the target list of Ganesh tasks to base class

A follow up CL will use the availability of this information - the full
list of targets of a GrRenderTask – to enable faster storage of the
lastRenderTask association for a given surface proxy in a given drawing
manager.

Bug: skia:10320
Change-Id: I3eb3276b483a7f09481774896a024172b73a4c84
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/296729
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Adlai Holler <adlai@google.com>
diff --git a/src/gpu/GrWaitRenderTask.cpp b/src/gpu/GrWaitRenderTask.cpp
index d7b2a7c..4b3855b 100644
--- a/src/gpu/GrWaitRenderTask.cpp
+++ b/src/gpu/GrWaitRenderTask.cpp
@@ -14,8 +14,10 @@
 void GrWaitRenderTask::gatherProxyIntervals(GrResourceAllocator* alloc) const {
     // This renderTask doesn't have "normal" ops. In this case we still need to add an interval (so
     // fEndOfOpsTaskOpIndices will remain in sync), so we create a fake op# to capture the fact that
-    // we manipulate fTargetView's proxy.
-    alloc->addInterval(fTargetView.proxy(), alloc->curOp(), alloc->curOp(),
+    // we manipulate our target's proxy.
+    SkASSERT(0 == this->numTargets());
+    auto fakeOp = alloc->curOp();
+    alloc->addInterval(fWaitedOn.proxy(), fakeOp, fakeOp,
                        GrResourceAllocator::ActualUse::kYes);
     alloc->incOps();
 }