Add ClockwiseTestOp::onPrePrepare

This is a trial balloon for the pulling forward of GrProgramInfo to DDL-record time

Bug: skia:9455
Change-Id: Icabf27fcf7169f12b0655ee23f98dafa7c770add
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/253099
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 6181995..4a1146e 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -408,7 +408,7 @@
 
     for (const auto& chain : fOpChains) {
         if (chain.shouldExecute()) {
-            chain.head()->prePrepare(context, chain.appliedClip());
+            chain.head()->prePrepare(context, &fTargetView, chain.appliedClip());
         }
     }
 }
@@ -440,6 +440,12 @@
                                           chain.dstProxyView());
 
             flushState->setOpArgs(&opArgs);
+
+            // Temporary debugging helper: for debugging prePrepare w/o going through DDLs
+            // Delete once most of the GrOps have an onPrePrepare.
+            // chain.head()->prePrepare(flushState->gpu()->getContext(), &fTargetView,
+            //                          chain.appliedClip());
+
             // GrOp::prePrepare may or may not have been called at this point
             chain.head()->prepare(flushState);
             flushState->setOpArgs(nullptr);