Revise GM infrastructure to not rely on GrSurfaceDrawContext

The SDC will soon be V1-only. Remove it from the generic testing infrastructure and require each V1-specific GM to explicitly retrieve it.

Bug: skia:11837
Change-Id: I4c904b7e333333382062bde4b17a1f9f81bee6a9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/430425
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Michael Ludwig <michaelludwig@google.com>
diff --git a/gm/bitmaptiled.cpp b/gm/bitmaptiled.cpp
index 40b498d..fedc8b6 100644
--- a/gm/bitmaptiled.cpp
+++ b/gm/bitmaptiled.cpp
@@ -18,7 +18,7 @@
 
 // This test exercises Ganesh's drawing of tiled bitmaps. In particular, that the offsets and the
 // extents of the tiles don't causes gaps between tiles.
-static void draw_tile_bitmap_with_fractional_offset(GrRecordingContext* context,
+static void draw_tile_bitmap_with_fractional_offset(GrRecordingContext* rContext,
                                                     SkCanvas* canvas,
                                                     bool vertical) {
     // This should match kBmpSmallTileSize in SkGpuDevice.cpp. Note that our canvas size is tuned
@@ -30,14 +30,14 @@
     const int kBitmapLongEdge = 7 * kTileSize;
     const int kBitmapShortEdge = 1 * kTileSize;
 
-    if (auto direct = context->asDirectContext()) {
+    if (auto dContext = rContext->asDirectContext()) {
         // To trigger tiling, we also need the image to be more than 50% of the cache, so we
         // ensure the cache is sized to make that true.
         const int kBitmapArea = kBitmapLongEdge * kBitmapShortEdge;
         const size_t kBitmapBytes = kBitmapArea * sizeof(SkPMColor);
 
         const size_t newMaxResourceBytes = kBitmapBytes + (kBitmapBytes / 2);
-        direct->setResourceCacheLimit(newMaxResourceBytes);
+        dContext->setResourceCacheLimit(newMaxResourceBytes);
     }
 
     // Construct our bitmap as either very wide or very tall
@@ -66,11 +66,11 @@
 }
 
 DEF_SIMPLE_GPU_GM_BG(
-        bitmaptiled_fractional_horizontal, context, rtc, canvas, 1124, 365, SK_ColorBLACK) {
-    draw_tile_bitmap_with_fractional_offset(context, canvas, false);
+        bitmaptiled_fractional_horizontal, rContext, canvas, 1124, 365, SK_ColorBLACK) {
+    draw_tile_bitmap_with_fractional_offset(rContext, canvas, false);
 }
 
 DEF_SIMPLE_GPU_GM_BG(
-        bitmaptiled_fractional_vertical, context, rtc, canvas, 365, 1124, SK_ColorBLACK) {
-    draw_tile_bitmap_with_fractional_offset(context, canvas, true);
+        bitmaptiled_fractional_vertical, rContext, canvas, 365, 1124, SK_ColorBLACK) {
+    draw_tile_bitmap_with_fractional_offset(rContext, canvas, true);
 }