Add Make[backend] calls for creating GrContexts
Docs-Preview: https://skia.org/?cl=26369
Bug: skia:
Change-Id: I460ee63e466f85b05918479f068a2e5ca2d70550
Reviewed-on: https://skia-review.googlesource.com/26369
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index 261206c..a9124d5 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -67,8 +67,7 @@
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 @@
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 @@
fSurface = VK_NULL_HANDLE;
}
- fContext->unref();
+ fContext.reset();
fBackendContext.reset(nullptr);
}