Add support for Mtl backend to DeferredDisplayListTest

Change-Id: Ie576bc8442e5a646c33191100be1be5f89d72290
Reviewed-on: https://skia-review.googlesource.com/c/189483
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
diff --git a/infra/bots/recipes/test.expected/Test-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal.json b/infra/bots/recipes/test.expected/Test-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal.json
index 2c8e2a3..4a01331 100644
--- a/infra/bots/recipes/test.expected/Test-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal.json
+++ b/infra/bots/recipes/test.expected/Test-Mac-Clang-MacBookPro11.5-GPU-RadeonHD8870M-x86_64-Debug-All-Metal.json
@@ -487,8 +487,6 @@
       ".SRW",
       "--match",
       "~^ClearOp$",
-      "~^DDLSurfaceCharacterizationTest$",
-      "~^DDLNonTextureabilityTest$",
       "~^DDLOperatorEqTest$",
       "~^DeferredProxyTest$",
       "~^GPUMemorySize$",
diff --git a/infra/bots/recipes/test.py b/infra/bots/recipes/test.py
index 4ee18f0..2d816aa 100644
--- a/infra/bots/recipes/test.py
+++ b/infra/bots/recipes/test.py
@@ -756,8 +756,6 @@
   if 'Metal' in bot:
     # skia:8243
     match.append('~^ClearOp$')
-    match.append('~^DDLSurfaceCharacterizationTest$')
-    match.append('~^DDLNonTextureabilityTest$')
     match.append('~^DDLOperatorEqTest$')
     match.append('~^DeferredProxyTest$')
     match.append('~^GPUMemorySize$')
diff --git a/src/gpu/vk/GrVkCaps.cpp b/src/gpu/vk/GrVkCaps.cpp
index a720e72..1123325 100644
--- a/src/gpu/vk/GrVkCaps.cpp
+++ b/src/gpu/vk/GrVkCaps.cpp
@@ -714,7 +714,7 @@
     return true;
 }
 
-GrPixelConfig validate_image_info(VkFormat format, SkColorType ct, bool hasYcbcrConversion) {
+static GrPixelConfig validate_image_info(VkFormat format, SkColorType ct, bool hasYcbcrConversion) {
     if (format == VK_FORMAT_UNDEFINED) {
         // If the format is undefined then it is only valid as an external image which requires that
         // we have a valid VkYcbcrConversion.
diff --git a/tests/DeferredDisplayListTest.cpp b/tests/DeferredDisplayListTest.cpp
index 9347748..c8f0728 100644
--- a/tests/DeferredDisplayListTest.cpp
+++ b/tests/DeferredDisplayListTest.cpp
@@ -54,6 +54,10 @@
     const GrCaps* caps = context->priv().caps();
 
     switch (context->backend()) {
+#ifdef SK_METAL
+    case GrBackendApi::kMetal:
+        return caps->getBackendFormatFromColorType(ct);
+#endif
     case GrBackendApi::kOpenGL: {
         const GrGLCaps* glCaps = static_cast<const GrGLCaps*>(caps);
         GrGLStandard standard = glCaps->standard();
@@ -705,7 +709,6 @@
         GrBackendTexture backend;
         sk_sp<SkSurface> s = params.make(context, &backend);
         if (!s) {
-            params.cleanUpBackEnd(context, backend);
             continue;
         }