From a56800a05dbca124907f5dda7c819c367d6327a9 Mon Sep 17 00:00:00 2001 From: brianosman Date: Mon, 23 May 2016 10:11:07 -0700 Subject: [PATCH] Add vksrgb config to dm (Vulkan sRGB). Fix help formatting of vk. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2005863002 Review-Url: https://codereview.chromium.org/2005863002 --- tools/flags/SkCommonFlagsConfig.cpp | 6 ++++-- tools/gpu/GrContextFactory.cpp | 3 +-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp index a0d1c77dd9..1c7920eb55 100644 --- a/tools/flags/SkCommonFlagsConfig.cpp +++ b/tools/flags/SkCommonFlagsConfig.cpp @@ -45,7 +45,7 @@ static const char configHelp[] = " hwui" #endif #ifdef SK_VULKAN - " vk" + " vk vksrgb" #endif " or use extended form 'backend(option=value,...)'.\n"; @@ -124,7 +124,8 @@ static const char configExtendedHelp[] = "\tmesa \t= gpu(api=mesa)\n" #endif #ifdef SK_VULKAN - "\vk \t= gpu(api=vulkan)\n" + "\tvk \t= gpu(api=vulkan)\n" + "\tvksrgb \t= gpu(api=vulkan,color=srgb)\n" #endif #endif ; @@ -170,6 +171,7 @@ static const struct { #endif #ifdef SK_VULKAN , { "vk", "gpu", "api=vulkan" } + , { "vksrgb", "gpu", "api=vulkan,color=srgb" } #endif #else diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 1b2a08ceab..151bfd95b3 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -163,8 +163,7 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op #ifdef SK_VULKAN case kVulkan_GrBackend: SkASSERT(kVulkan_ContextType == type); - if ((kEnableNVPR_ContextOptions & options) || - (kRequireSRGBSupport_ContextOptions & options)) { + if (kEnableNVPR_ContextOptions & options) { return ContextInfo(); } testCtx.reset(CreatePlatformVkTestContext());