aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar bsalomon <bsalomon@google.com>2016-04-11 14:21:33 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-04-11 14:21:33 -0700
commitdc0fcd41e75682a8bfd5e285d684461475226330 (patch)
treea88c9ae58427a3d3afbd3bfb9705db49cb9fa298 /src
parent849b175c029bcb5d4abb7fdadc45e8ed36f29a78 (diff)
Vulkan config in dm
Diffstat (limited to 'src')
-rw-r--r--src/gpu/vk/GrVkBackendContext.cpp6
-rw-r--r--src/gpu/vk/GrVkGpu.cpp6
2 files changed, 6 insertions, 6 deletions
diff --git a/src/gpu/vk/GrVkBackendContext.cpp b/src/gpu/vk/GrVkBackendContext.cpp
index f5cd08ca8b..d189840adb 100644
--- a/src/gpu/vk/GrVkBackendContext.cpp
+++ b/src/gpu/vk/GrVkBackendContext.cpp
@@ -109,7 +109,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
err = vkCreateInstance(&instance_create, nullptr, &inst);
if (err < 0) {
SkDebugf("vkCreateInstance failed: %d\n", err);
- SkFAIL("failing");
+ return nullptr;
}
uint32_t gpuCount;
@@ -117,7 +117,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
if (err) {
SkDebugf("vkEnumeratePhysicalDevices failed: %d\n", err);
vkDestroyInstance(inst, nullptr);
- SkFAIL("failing");
+ return nullptr;
}
SkASSERT(gpuCount > 0);
// Just returning the first physical device instead of getting the whole array.
@@ -127,7 +127,7 @@ const GrVkBackendContext* GrVkBackendContext::Create() {
if (err) {
SkDebugf("vkEnumeratePhysicalDevices failed: %d\n", err);
vkDestroyInstance(inst, nullptr);
- SkFAIL("failing");
+ return nullptr;
}
// query to get the initial queue props size
diff --git a/src/gpu/vk/GrVkGpu.cpp b/src/gpu/vk/GrVkGpu.cpp
index 428c2ff6bd..280346fda1 100644
--- a/src/gpu/vk/GrVkGpu.cpp
+++ b/src/gpu/vk/GrVkGpu.cpp
@@ -63,10 +63,10 @@ VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(
GrGpu* GrVkGpu::Create(GrBackendContext backendContext, const GrContextOptions& options,
GrContext* context) {
- SkAutoTUnref<const GrVkBackendContext> vkBackendContext(
- reinterpret_cast<const GrVkBackendContext*>(backendContext));
+ const GrVkBackendContext* vkBackendContext =
+ reinterpret_cast<const GrVkBackendContext*>(backendContext);
if (!vkBackendContext) {
- vkBackendContext.reset(GrVkBackendContext::Create());
+ vkBackendContext = GrVkBackendContext::Create();
if (!vkBackendContext) {
return nullptr;
}