diff options
author | brianosman <brianosman@google.com> | 2016-03-30 11:19:36 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-30 11:19:36 -0700 |
commit | 61d3b08138d1820a2c9bb14764e83f6d3761207d (patch) | |
tree | 5969dfb277fa95ca56d7d71868aeed14f67b3b0a /dm | |
parent | 6f70d43719d0583d486a000f66e915c10a6b83a2 (diff) |
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
Diffstat (limited to 'dm')
-rw-r--r-- | dm/DM.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
@@ -819,6 +819,11 @@ static Sink* create_sink(const SkCommandLineConfig* config) { contextOptions = static_cast<GrContextFactory::GLContextOptions>( contextOptions | GrContextFactory::kEnableNVPR_GLContextOptions); } + if (kSRGB_SkColorProfileType == gpuConfig->getProfileType() || + kRGBA_F16_SkColorType == gpuConfig->getColorType()) { + contextOptions = static_cast<GrContextFactory::GLContextOptions>( + contextOptions | GrContextFactory::kRequireSRGBSupport_GLContextOptions); + } GrContextFactory testFactory; if (!testFactory.get(contextType, contextOptions)) { info("WARNING: can not create GPU context for config '%s'. " |