From 20471894eaa441193d5ae8f2395e8244c91c55af Mon Sep 17 00:00:00 2001 From: brianosman Date: Fri, 2 Dec 2016 06:43:32 -0800 Subject: 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 Committed: https://skia.googlesource.com/skia/+/9db12d2341f3f8722c8b90b11dd4cce138a8a64e Committed: https://skia.googlesource.com/skia/+/1aeb78c5d978b35b256525b711edd942bce01444 Review-Url: https://codereview.chromium.org/2539993002 --- include/gpu/GrContextOptions.h | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'include') diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index 6a1b51b5a6..65daf72ead 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -77,6 +77,14 @@ struct GrContextOptions { * purposes. */ bool fForceSWPathMasks = false; + + /** + * If true, sRGB support will not be enabled unless sRGB decoding can be disabled (via an + * extension). If mixed use of "legacy" mode and sRGB/color-correct mode is not required, this + * can be set to false, which will significantly expand the number of devices that qualify for + * sRGB support. + */ + bool fRequireDecodeDisableForSRGB = true; }; #endif -- cgit v1.2.3