diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/flags/SkCommonFlagsConfig.cpp | 11 | ||||
-rw-r--r-- | tools/gpu/GrContextFactory.cpp | 2 | ||||
-rw-r--r-- | tools/gpu/GrContextFactory.h | 9 |
3 files changed, 4 insertions, 18 deletions
diff --git a/tools/flags/SkCommonFlagsConfig.cpp b/tools/flags/SkCommonFlagsConfig.cpp index 5763e4a6ca..abd8bdb78d 100644 --- a/tools/flags/SkCommonFlagsConfig.cpp +++ b/tools/flags/SkCommonFlagsConfig.cpp @@ -185,19 +185,8 @@ SkCommandLineConfigGpu::SkCommandLineConfigGpu( if (useInstanced) { fContextOptions |= ContextOptions::kUseInstanced; } - // Subtle logic: If the config has a color space attached, we're going to be rendering to sRGB, - // so we need that capability. In addition, to get the widest test coverage, we DO NOT require - // that we can disable sRGB decode. (That's for rendering sRGB sources to legacy surfaces). - // - // If the config doesn't have a color space attached, we're going to be rendering in legacy - // mode. In that case, we can't allow a context to be created that has sRGB support without - // the ability to disable sRGB decode. Otherwise, all of our sRGB source resources will be - // treated as sRGB textures, but we will be unable to prevent the decode, causing them to be - // too dark. if (fColorSpace) { fContextOptions |= ContextOptions::kRequireSRGBSupport; - } else { - fContextOptions |= ContextOptions::kRequireSRGBDecodeDisableSupport; } } static bool parse_option_int(const SkString& value, int* outInt) { diff --git a/tools/gpu/GrContextFactory.cpp b/tools/gpu/GrContextFactory.cpp index 8d9bd41245..ffc5295ab2 100644 --- a/tools/gpu/GrContextFactory.cpp +++ b/tools/gpu/GrContextFactory.cpp @@ -198,8 +198,6 @@ 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(); diff --git a/tools/gpu/GrContextFactory.h b/tools/gpu/GrContextFactory.h index a232112d75..54b6611e0f 100644 --- a/tools/gpu/GrContextFactory.h +++ b/tools/gpu/GrContextFactory.h @@ -93,11 +93,10 @@ public: * to not using GL_NV_path_rendering extension even when the driver supports it. */ enum class ContextOptions { - kNone = 0x0, - kEnableNVPR = 0x1, - kUseInstanced = 0x2, - kRequireSRGBSupport = 0x4, - kRequireSRGBDecodeDisableSupport = 0x8, + kNone = 0x0, + kEnableNVPR = 0x1, + kUseInstanced = 0x2, + kRequireSRGBSupport = 0x4, }; static ContextType NativeContextTypeForBackend(GrBackend backend) { |