aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/gpu/GrDirectContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gpu/GrDirectContext.cpp')
-rw-r--r--src/gpu/GrDirectContext.cpp38
1 files changed, 1 insertions, 37 deletions
diff --git a/src/gpu/GrDirectContext.cpp b/src/gpu/GrDirectContext.cpp
index 83e2194003..3e4b8ef5fa 100644
--- a/src/gpu/GrDirectContext.cpp
+++ b/src/gpu/GrDirectContext.cpp
@@ -156,43 +156,7 @@ sk_sp<GrContext> GrContext::MakeVulkan(const GrVkBackendContext& backendContext,
const GrContextOptions& options) {
sk_sp<GrContext> context(new GrDirectContext(kVulkan_GrBackend));
- sk_sp<GrVkBackendContext> backendContextRef(new GrVkBackendContext());
- backendContextRef->fInstance = backendContext.fInstance;
- backendContextRef->fPhysicalDevice = backendContext.fPhysicalDevice;
- backendContextRef->fDevice = backendContext.fDevice;
- backendContextRef->fQueue = backendContext.fQueue;
- backendContextRef->fGraphicsQueueIndex = backendContext.fGraphicsQueueIndex;
- backendContextRef->fMinAPIVersion = backendContext.fMinAPIVersion;
- backendContextRef->fExtensions = backendContext.fExtensions;
- backendContextRef->fFeatures = backendContext.fFeatures;
- backendContextRef->fInterface = backendContext.fInterface;
- backendContextRef->fMemoryAllocator = backendContext.fMemoryAllocator;
-
- SkASSERT(!backendContext.fOwnsInstanceAndDevice);
- backendContextRef->fOwnsInstanceAndDevice = false;
-
- context->fGpu = GrVkGpu::Make(std::move(backendContextRef), options, context.get());
- if (!context->fGpu) {
- return nullptr;
- }
-
- context->fCaps = context->fGpu->refCaps();
- if (!context->init(options)) {
- return nullptr;
- }
- return context;
-}
-
-sk_sp<GrContext> GrContext::MakeVulkan(sk_sp<const GrVkBackendContext> backendContext) {
- GrContextOptions defaultOptions;
- return MakeVulkan(std::move(backendContext), defaultOptions);
-}
-
-sk_sp<GrContext> GrContext::MakeVulkan(sk_sp<const GrVkBackendContext> backendContext,
- const GrContextOptions& options) {
- sk_sp<GrContext> context(new GrDirectContext(kVulkan_GrBackend));
-
- context->fGpu = GrVkGpu::Make(std::move(backendContext), options, context.get());
+ context->fGpu = GrVkGpu::Make(backendContext, options, context.get());
if (!context->fGpu) {
return nullptr;
}