diff options
author | Greg Daniel <egdaniel@google.com> | 2017-07-13 15:34:56 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-07-14 13:57:34 +0000 |
commit | 2811aa25f1f7c5f5b31eb0cb7dabcbab90d9709d (patch) | |
tree | 111bab3158f83a86bac66edeefc4ad8d5c081483 /tools/gpu/GrContextFactory.h | |
parent | f99a1739be4e7dec67a0b7e6e008c6999b139cee (diff) |
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>
Diffstat (limited to 'tools/gpu/GrContextFactory.h')
-rw-r--r-- | tools/gpu/GrContextFactory.h | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index 215b922afe..a13aeb7ab1 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -12,7 +12,6 @@ #include "GrContextOptions.h" #include "gl/GLTestContext.h" -#include "vk/VkTestContext.h" #include "SkTArray.h" struct GrVkBackendContext; @@ -44,6 +43,7 @@ public: kNullGL_ContextType, //! Non-rendering OpenGL mock context. kDebugGL_ContextType, //! Non-rendering, state verifying OpenGL context. kVulkan_ContextType, //! Vulkan + kMetal_ContextType, //! Metal kMock_ContextType, //! Mock context that does not draw. kLastContextType = kMock_ContextType }; @@ -80,6 +80,8 @@ public: switch (type) { case kVulkan_ContextType: return kVulkan_GrBackend; + case kMetal_ContextType: + return kMetal_GrBackend; case kMock_ContextType: return kMock_GrBackend; default: @@ -113,6 +115,8 @@ public: return "Debug GL"; case kVulkan_ContextType: return "Vulkan"; + case kMetal_ContextType: + return "Metal"; case kMock_ContextType: return "Mock"; } @@ -185,13 +189,6 @@ public: return static_cast<GLTestContext*>(fTestContext); } -#ifdef SK_VULKAN - VkTestContext* vkContext() const { - SkASSERT(kVulkan_GrBackend == this->backend()); - return static_cast<VkTestContext*>(fTestContext); - } -#endif - private: ContextInfo(GrContextFactory::ContextType type, TestContext* testContext, |