Restore Vulkan setup code accidentally reverted in GrContextFactory.cpp
TBR=egdaniel@google.com,jvanverth@google.com
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1852553004
Review URL: https://codereview.chromium.org/1852553004
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index e5fa2c7..bae73a4 100755
--- a/tools/gpu/GrContextFactory.cpp
+++ b/tools/gpu/GrContextFactory.cpp
@@ -19,6 +19,9 @@
#if SK_MESA
#include "gl/mesa/GLTestContext_mesa.h"
#endif
+#if SK_VULKAN
+#include "vk/GrVkBackendContext.h"
+#endif
#include "gl/null/NullGLTestContext.h"
#include "gl/GrGLGpu.h"
#include "GrCaps.h"
@@ -128,14 +131,15 @@
}
glCtx->makeCurrent();
- GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get());
#ifdef SK_VULKAN
if (kEnableNVPR_GLContextOptions & options) {
return ContextInfo();
} else {
+ GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(GrVkBackendContext::Create());
grCtx.reset(GrContext::Create(kVulkan_GrBackend, p3dctx, fGlobalOptions));
}
#else
+ GrBackendContext p3dctx = reinterpret_cast<GrBackendContext>(glInterface.get());
grCtx.reset(GrContext::Create(kOpenGL_GrBackend, p3dctx, fGlobalOptions));
#endif
if (!grCtx.get()) {