Add metal config to tools
Bug: skia:
Change-Id: I84dbd56c17d4856496af4491f340ec560e29c8a6
Reviewed-on: https://skia-review.googlesource.com/23200
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Jim Van Verth <jvanverth@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/tests/TestConfigParsing.cpp b/tests/TestConfigParsing.cpp
index ca91f5b..6a2607a 100644
--- a/tests/TestConfigParsing.cpp
+++ b/tests/TestConfigParsing.cpp
@@ -118,7 +118,8 @@
"glwide",
"glnarrow",
"glnostencils",
- "mock"
+ "mock",
+ "mtl"
});
SkCommandLineConfigArray configs;
@@ -259,6 +260,7 @@
"gpu[api=gles]",
"gpu[api=gl]",
"gpu[api=vulkan]",
+ "gpu[api=metal]",
"gpu[api=mock]",
});
@@ -305,7 +307,14 @@
REPORTER_ASSERT(reporter, !configs[7]->asConfigGpu()->getUseDIText());
REPORTER_ASSERT(reporter, configs[7]->asConfigGpu()->getSamples() == 0);
#endif
+#ifdef SK_METAL
REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getContextType() ==
+ GrContextFactory::kMetal_ContextType);
+ REPORTER_ASSERT(reporter, !configs[8]->asConfigGpu()->getUseNVPR());
+ REPORTER_ASSERT(reporter, !configs[8]->asConfigGpu()->getUseDIText());
+ REPORTER_ASSERT(reporter, configs[8]->asConfigGpu()->getSamples() == 0);
+#endif
+ REPORTER_ASSERT(reporter, configs[9]->asConfigGpu()->getContextType() ==
GrContextFactory::kMock_ContextType);
#endif
}