Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(17)

Unified Diff: tools/gpu/GrContextFactory.cpp

Issue 1852553004: Restore Vulkan setup code accidentally reverted in GrContextFactory.cpp (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gpu/GrContextFactory.cpp
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp
index e5fa2c799e35e822da5d78d7590420080f333241..bae73a4e1986a725de8f8afe7007708e7eee3777 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()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698