diff options
author | Greg Daniel <egdaniel@google.com> | 2017-12-08 11:44:27 -0500 |
---|---|---|
committer | Greg Daniel <egdaniel@google.com> | 2017-12-11 09:39:16 -0500 |
commit | 660d6eca991f15de77c02a7e259ed709338a0972 (patch) | |
tree | d1b8b44a39f028c49394aa4dfd109a1a9dffb957 /libs/hwui/renderthread/VulkanManager.cpp | |
parent | 23627fbff5f13629e997a00b006a1ebdc423e735 (diff) |
Update GrContext creation calls to use sk_sp
Test: manual testing
Change-Id: I68d8706ffa7bc7c6622ea0b8c45d7297a131f6bf
Diffstat (limited to 'libs/hwui/renderthread/VulkanManager.cpp')
-rw-r--r-- | libs/hwui/renderthread/VulkanManager.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libs/hwui/renderthread/VulkanManager.cpp b/libs/hwui/renderthread/VulkanManager.cpp index a693e68afd66..9d246ffc9a4a 100644 --- a/libs/hwui/renderthread/VulkanManager.cpp +++ b/libs/hwui/renderthread/VulkanManager.cpp @@ -58,6 +58,7 @@ void VulkanManager::initialize() { mBackendContext.reset(GrVkBackendContext::Create(vkGetInstanceProcAddr, vkGetDeviceProcAddr, &mPresentQueueIndex, canPresent)); + LOG_ALWAYS_FATAL_IF(!mBackendContext.get()); // Get all the addresses of needed vulkan functions VkInstance instance = mBackendContext->fInstance; @@ -110,8 +111,9 @@ void VulkanManager::initialize() { GrContextOptions options; options.fDisableDistanceFieldPaths = true; mRenderThread.cacheManager().configureContext(&options); - mRenderThread.setGrContext( - GrContext::Create(kVulkan_GrBackend, (GrBackendContext)mBackendContext.get(), options)); + sk_sp<GrContext> grContext(GrContext::MakeVulkan(mBackendContext, options)); + LOG_ALWAYS_FATAL_IF(!grContext.get()); + mRenderThread.setGrContext(grContext); DeviceInfo::initialize(mRenderThread.getGrContext()->caps()->maxRenderTargetSize()); if (Properties::enablePartialUpdates && Properties::useBufferAge) { |