Don't gather proxy intervals at all for NoOp ops tasks

Bug: skia:10877
Change-Id: Id2c4163e9346f4fd4f0fea2ab376d10821c49378
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/401857
Commit-Queue: Adlai Holler <adlai@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrOpsTask.cpp b/src/gpu/GrOpsTask.cpp
index 552f8a2..862f151 100644
--- a/src/gpu/GrOpsTask.cpp
+++ b/src/gpu/GrOpsTask.cpp
@@ -881,6 +881,11 @@
 }
 
 void GrOpsTask::gatherProxyIntervals(GrResourceAllocator* alloc) const {
+    SkASSERT(this->isClosed());
+    if (this->isNoOp()) {
+        return;
+    }
+
     for (int i = 0; i < fDeferredProxies.count(); ++i) {
         SkASSERT(!fDeferredProxies[i]->isInstantiated());
         // We give all the deferred proxies a write usage at the very start of flushing. This