diff options
author | Greg Daniel <egdaniel@google.com> | 2017-12-13 10:20:04 -0500 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-12-13 15:46:12 +0000 |
commit | 81b8059d8b8c87aed19f773a4cc59f4528122d67 (patch) | |
tree | 496e34e60bf5d28ac7f30a27aa6a5fc42cae041c /tools/sk_app | |
parent | c25db637532cd10dde7855d868c0d033e96f61f2 (diff) |
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 <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tools/sk_app')
-rw-r--r-- | tools/sk_app/VulkanWindowContext.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
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; } |