From 61d3b08138d1820a2c9bb14764e83f6d3761207d Mon Sep 17 00:00:00 2001 From: brianosman Date: Wed, 30 Mar 2016 11:19:36 -0700 Subject: Enable gpusrgb config on bots. Don't run the config if we can't get a context with srgb support. Includes a unit test for that logic. BUG=skia: GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1846603002 Review URL: https://codereview.chromium.org/1846603002 --- dm/DM.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'dm') diff --git a/dm/DM.cpp b/dm/DM.cpp index 34f8a961e3..d93cd2977e 100644 --- a/dm/DM.cpp +++ b/dm/DM.cpp @@ -819,6 +819,11 @@ static Sink* create_sink(const SkCommandLineConfig* config) { contextOptions = static_cast( contextOptions | GrContextFactory::kEnableNVPR_GLContextOptions); } + if (kSRGB_SkColorProfileType == gpuConfig->getProfileType() || + kRGBA_F16_SkColorType == gpuConfig->getColorType()) { + contextOptions = static_cast( + contextOptions | GrContextFactory::kRequireSRGBSupport_GLContextOptions); + } GrContextFactory testFactory; if (!testFactory.get(contextType, contextOptions)) { info("WARNING: can not create GPU context for config '%s'. " -- cgit v1.2.3