aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/viewer/sk_app/VulkanWindowContext.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tools/viewer/sk_app/VulkanWindowContext.cpp')
-rw-r--r--tools/viewer/sk_app/VulkanWindowContext.cpp7
1 files changed, 3 insertions, 4 deletions
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index 261206c221..a9124d5e41 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -67,8 +67,7 @@ void VulkanWindowContext::initializeContext() {
GET_DEV_PROC(AcquireNextImageKHR);
GET_DEV_PROC(QueuePresentKHR);
- fContext = GrContext::Create(kVulkan_GrBackend, (GrBackendContext) fBackendContext.get(),
- fDisplayParams.fGrContextOptions);
+ fContext = GrContext::MakeVulkan(fBackendContext.get(), fDisplayParams.fGrContextOptions);
fSurface = fCreateVkSurfaceFn(instance);
if (VK_NULL_HANDLE == fSurface) {
@@ -280,7 +279,7 @@ void VulkanWindowContext::createBuffers(VkFormat format) {
GrBackendTexture backendTex(fWidth, fHeight, info);
- fSurfaces[i] = SkSurface::MakeFromBackendTextureAsRenderTarget(fContext, backendTex,
+ fSurfaces[i] = SkSurface::MakeFromBackendTextureAsRenderTarget(fContext.get(), backendTex,
kTopLeft_GrSurfaceOrigin,
fSampleCount,
fDisplayParams.fColorSpace,
@@ -412,7 +411,7 @@ void VulkanWindowContext::destroyContext() {
fSurface = VK_NULL_HANDLE;
}
- fContext->unref();
+ fContext.reset();
fBackendContext.reset(nullptr);
}