aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/gpu
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-04-01 07:42:05 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-01 07:42:05 -0700
commit7c62b47800bc145369504feb3e127a70724655d4 (patch)
tree91ea1fac410e153ff6d528e57bb6c2a5f542c4b2 /tools/gpu
parentcafbfe65a0da2af2caeeba1577c45925374b7d77 (diff)
Restore Vulkan setup code accidentally reverted in GrContextFactory.cpp
Diffstat (limited to 'tools/gpu')
-rwxr-xr-xtools/gpu/GrContextFactory.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index e5fa2c799e..bae73a4e19 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 @@ GrContextFactory::ContextInfo GrContextFactory::getContextInfo(GLContextType typ
}
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()) {