Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(29)

Unified Diff: tools/viewer/sk_app/VulkanWindowContext.cpp

Issue 2069173002: Lots of progress switching to SkColorSpace rather than SkColorProfileType (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fix bad assert Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/viewer/sk_app/GLWindowContext.cpp ('k') | tools/viewer/sk_app/WindowContext.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/viewer/sk_app/VulkanWindowContext.cpp
diff --git a/tools/viewer/sk_app/VulkanWindowContext.cpp b/tools/viewer/sk_app/VulkanWindowContext.cpp
index 9bcf6ca25d41c0fe099c4c33e6029b3cb6c3777d..d892cd478388646d8c1444273b435607ccbdd662 100644
--- a/tools/viewer/sk_app/VulkanWindowContext.cpp
+++ b/tools/viewer/sk_app/VulkanWindowContext.cpp
@@ -173,7 +173,8 @@ bool VulkanWindowContext::createSwapchain(uint32_t width, uint32_t height,
// Pick our surface format. For now, just make sure it matches our sRGB request:
VkFormat surfaceFormat = VK_FORMAT_UNDEFINED;
VkColorSpaceKHR colorSpace = VK_COLORSPACE_SRGB_NONLINEAR_KHR;
- bool wantSRGB = kSRGB_SkColorProfileType == params.fProfileType;
+ auto srgbColorSpace = SkColorSpace::NewNamed(SkColorSpace::kSRGB_Named);
+ bool wantSRGB = srgbColorSpace == params.fColorSpace;
for (uint32_t i = 0; i < surfaceFormatCount; ++i) {
GrPixelConfig config;
if (GrVkFormatToPixelConfig(surfaceFormats[i].format, &config) &&
« no previous file with comments | « tools/viewer/sk_app/GLWindowContext.cpp ('k') | tools/viewer/sk_app/WindowContext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698