diff options
author | 2016-12-01 09:02:03 -0800 | |
---|---|---|
committer | 2016-12-01 09:02:03 -0800 | |
commit | 9db12d2341f3f8722c8b90b11dd4cce138a8a64e (patch) | |
tree | 946c356960dcd2ec444a32ce0ee8570407d81dcf /tools/gpu/GrContextFactory.cpp | |
parent | 9afd371a8a66f992f98eb2a3fc75ae64bddc730b (diff) |
Two (related) changes here:
1) Our older iOS devices failed our sRGB tests, due to precision issues
with alpha. At this point, we only test on iPadMini 4, and that appears
not to have any problems.
2) iOS devices still don't have the sRGB texture decode extension. But,
some clients have no interest in mixing legacy/color-correct rendering,
and would like to use sRGB on these devices. This GrContextOptions flag
enables sRGB support in those cases.
Adjust the test code to produce sRGB capable contexts on these devices,
but only for configs that have a color space. (See comment).
BUG=skia:4148
Review-Url: https://codereview.chromium.org/2539993002
Diffstat (limited to 'tools/gpu/GrContextFactory.cpp')
-rw-r--r-- | tools/gpu/GrContextFactory.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index ffc5295ab2..8d9bd41245 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -198,6 +198,8 @@ ContextInfo GrContextFactory::getContextInfo(ContextType type, ContextOptions op if (ContextOptions::kUseInstanced & options) { grOptions.fEnableInstancedRendering = true; } + grOptions.fRequireDecodeDisableForSRGB = + SkToBool(ContextOptions::kRequireSRGBDecodeDisableSupport & options); grCtx.reset(GrContext::Create(backend, backendContext, grOptions)); if (!grCtx.get()) { return ContextInfo(); |