From afdc6b1ba9f5dba52916bd20b608f1f7c21c3160 Mon Sep 17 00:00:00 2001 From: Brian Salomon Date: Fri, 9 Mar 2018 12:02:32 -0500 Subject: Vulkan backend render targets don't allow client to specify stencil bits We already always create the stencil buffer even for wrapped RTs. Make VulkanWindowContext use SkSurface::MakeFromBackendRenderTarget. Change-Id: I5df429d347331801954ec17cb9d75e323a7af345 Reviewed-on: https://skia-review.googlesource.com/113206 Reviewed-by: Greg Daniel Commit-Queue: Brian Salomon --- tools/sk_app/VulkanWindowContext.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'tools/sk_app') diff --git a/tools/sk_app/VulkanWindowContext.cpp b/tools/sk_app/VulkanWindowContext.cpp index d7839bc189..b39c564eca 100644 --- a/tools/sk_app/VulkanWindowContext.cpp +++ b/tools/sk_app/VulkanWindowContext.cpp @@ -293,14 +293,14 @@ void VulkanWindowContext::createBuffers(VkFormat format, SkColorType colorType) info.fFormat = format; info.fLevelCount = 1; - GrBackendTexture backendTex(fWidth, fHeight, info); - - fSurfaces[i] = SkSurface::MakeFromBackendTextureAsRenderTarget(fContext.get(), backendTex, - kTopLeft_GrSurfaceOrigin, - fSampleCount, - colorType, - fDisplayParams.fColorSpace, - &fSurfaceProps); + GrBackendRenderTarget backendRT(fWidth, fHeight, fSampleCount, info); + + fSurfaces[i] = SkSurface::MakeFromBackendRenderTarget(fContext.get(), + backendRT, + kTopLeft_GrSurfaceOrigin, + colorType, + fDisplayParams.fColorSpace, + &fSurfaceProps); } // create the command pool for the command buffers -- cgit v1.2.3