Move more gms and tests into the V1-only pile

Making GrDrawRandomOp and test_ops V1-only drags several GMs and tests with them. All the other GMs/tests explicitly require Ops.

Bug: skia:11837
Change-Id: I45c0a1054c3b1ec43f509595c6492581d10314cf
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/425016
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/src/gpu/GrResourceCache.cpp b/src/gpu/GrResourceCache.cpp
index d9a9363..cfa0c96 100644
--- a/src/gpu/GrResourceCache.cpp
+++ b/src/gpu/GrResourceCache.cpp
@@ -883,9 +883,8 @@
 
     keys->push_back(SkString("gpu_cache_purgable_entries")); values->push_back(stats.fNumPurgeable);
 }
-#endif
-
-#endif
+#endif // GR_TEST_UTILS
+#endif // GR_CACHE_STATS
 
 #ifdef SK_DEBUG
 void GrResourceCache::validate() const {
@@ -1024,4 +1023,22 @@
     return false;
 }
 
-#endif
+#endif // SK_DEBUG
+
+#if GR_TEST_UTILS
+
+int GrResourceCache::countUniqueKeysWithTag(const char* tag) const {
+    int count = 0;
+    fUniqueHash.foreach([&](const GrGpuResource& resource){
+        if (0 == strcmp(tag, resource.getUniqueKey().tag())) {
+            ++count;
+        }
+    });
+    return count;
+}
+
+void GrResourceCache::changeTimestamp(uint32_t newTimestamp) {
+    fTimestamp = newTimestamp;
+}
+
+#endif // GR_TEST_UTILS