Implement alternate method for determining recycle-ability of allocated GrSurfaces (take 2)

With the upcoming removal of pendingIO refs the GrResourceAllocator needs a new means of determining when a backing GrSurface can be recycled and when it needs to be left assigned to a GrSurfaceProxy.

Change-Id: I2327b0f15ceb639b400a55a9c53359a4b43288c6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/210041
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/ops/GrCopySurfaceOp.cpp b/src/gpu/ops/GrCopySurfaceOp.cpp
index f2a5257..af20b65 100644
--- a/src/gpu/ops/GrCopySurfaceOp.cpp
+++ b/src/gpu/ops/GrCopySurfaceOp.cpp
@@ -83,7 +83,7 @@
 
     GrOpMemoryPool* pool = context->priv().opMemoryPool();
 
-    return pool->allocate<GrCopySurfaceOp>(dstProxy, srcProxy, clippedSrcRect, clippedDstPoint);
+    return pool->allocate<GrCopySurfaceOp>(srcProxy, clippedSrcRect, clippedDstPoint);
 }
 
 void GrCopySurfaceOp::onExecute(GrOpFlushState* state, const SkRect& chainBounds) {
diff --git a/src/gpu/ops/GrCopySurfaceOp.h b/src/gpu/ops/GrCopySurfaceOp.h
index eeaa237..dd87bc7 100644
--- a/src/gpu/ops/GrCopySurfaceOp.h
+++ b/src/gpu/ops/GrCopySurfaceOp.h
@@ -43,8 +43,7 @@
 private:
     friend class GrOpMemoryPool; // for ctor
 
-    GrCopySurfaceOp(GrSurfaceProxy* dst, GrSurfaceProxy* src,
-                    const SkIRect& srcRect, const SkIPoint& dstPoint)
+    GrCopySurfaceOp(GrSurfaceProxy* src, const SkIRect& srcRect, const SkIPoint& dstPoint)
             : INHERITED(ClassID())
             , fSrc(src)
             , fSrcRect(srcRect)
diff --git a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
index 4826b3e..e2b14c9 100644
--- a/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
+++ b/src/gpu/ops/GrSimpleMeshDrawOpHelper.cpp
@@ -93,6 +93,13 @@
             *geometryColor = overrideColor;
         }
     } else {
+        if (clip) {
+            for (int i = 0; i < clip->numClipCoverageFragmentProcessors(); ++i) {
+                const GrFragmentProcessor* clipFP = clip->clipCoverageFragmentProcessor(i);
+                clipFP->markPendingExecution();
+            }
+        }
+
         analysis = GrProcessorSet::EmptySetAnalysis();
     }
     fUsesLocalCoords = analysis.usesLocalCoords();