From 81b8059d8b8c87aed19f773a4cc59f4528122d67 Mon Sep 17 00:00:00 2001 From: Greg Daniel Date: Wed, 13 Dec 2017 10:20:04 -0500 Subject: Start removing uses of VkFormatToPixelConfig in vulkan backend Bug: skia: Change-Id: I2c8e86b9e8ca6a33913be347a3c65af963c5fd12 Reviewed-on: https://skia-review.googlesource.com/84341 Commit-Queue: Greg Daniel Reviewed-by: Robert Phillips --- tools/sk_app/VulkanWindowContext.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'tools/sk_app') diff --git a/tools/sk_app/VulkanWindowContext.cpp b/tools/sk_app/VulkanWindowContext.cpp index 35177494f7..711791df18 100644 --- a/tools/sk_app/VulkanWindowContext.cpp +++ b/tools/sk_app/VulkanWindowContext.cpp @@ -185,10 +185,10 @@ bool VulkanWindowContext::createSwapchain(int width, int height, auto srgbColorSpace = SkColorSpace::MakeSRGB(); bool wantSRGB = srgbColorSpace == params.fColorSpace; for (uint32_t i = 0; i < surfaceFormatCount; ++i) { - GrPixelConfig config = GrVkFormatToPixelConfig(surfaceFormats[i].format); - if (kUnknown_GrPixelConfig != config && - GrPixelConfigIsSRGB(config) == wantSRGB) { - surfaceFormat = surfaceFormats[i].format; + VkFormat localFormat = surfaceFormats[i].format; + if (GrVkFormatIsSupported(localFormat) && + GrVkFormatIsSRGB(localFormat, nullptr) == wantSRGB) { + surfaceFormat = localFormat; colorSpace = surfaceFormats[i].colorSpace; break; } -- cgit v1.2.3