diff options
author | 2016-05-05 11:52:53 -0700 | |
---|---|---|
committer | 2016-05-05 11:52:53 -0700 | |
commit | 35b784d48f59be3a3ee28d9d73e03c7f8835d2f9 (patch) | |
tree | c7d583ff9b4d8313ba8c5be2fd688f57ad72b52a /src/gpu/gl/GrGLCaps.cpp | |
parent | c34323549d6cf87691a6db2dd4999e8beaf082fe (diff) |
Bring back sRGB-write-control as a caps bit.
We're not going to support this on Vulkan (yet), but want to still
have it as an option for GL. (The fallback alternative for our YUV use
case involves injecting expensive fragment shader code, which we'd like
to avoid).
BUG=skia:
GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1955603003
Review-Url: https://codereview.chromium.org/1955603003
Diffstat (limited to 'src/gpu/gl/GrGLCaps.cpp')
-rw-r--r-- | src/gpu/gl/GrGLCaps.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp index 9b12ce69c5..ebfbf6a065 100644 --- a/src/gpu/gl/GrGLCaps.cpp +++ b/src/gpu/gl/GrGLCaps.cpp @@ -1457,8 +1457,7 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa fConfigTable[kBGRA_8888_GrPixelConfig].fSwizzle = GrSwizzle::RGBA(); // We only enable srgb support if both textures and FBOs support srgb, - // *and* we can disable sRGB decode-on-read, to support "legacy" mode, - // *and* we can disable sRGB encode-on-write. + // *and* we can disable sRGB decode-on-read, to support "legacy" mode. if (kGL_GrGLStandard == standard) { if (ctxInfo.version() >= GR_GL_VER(3,0)) { fSRGBSupport = true; @@ -1469,13 +1468,14 @@ void GrGLCaps::initConfigTable(const GrGLContextInfo& ctxInfo, const GrGLInterfa } } // All the above srgb extensions support toggling srgb writes + fSRGBWriteControl = true; } else { // See https://bug.skia.org/4148 for PowerVR issue. fSRGBSupport = kPowerVRRogue_GrGLRenderer != ctxInfo.renderer() && (ctxInfo.version() >= GR_GL_VER(3,0) || ctxInfo.hasExtension("GL_EXT_sRGB")); // ES through 3.1 requires EXT_srgb_write_control to support toggling // sRGB writing for destinations. - fSRGBSupport = fSRGBSupport && ctxInfo.hasExtension("GL_EXT_sRGB_write_control"); + fSRGBWriteControl = ctxInfo.hasExtension("GL_EXT_sRGB_write_control"); } if (!ctxInfo.hasExtension("GL_EXT_texture_sRGB_decode")) { // To support "legacy" L32 mode, we require the ability to turn off sRGB decode: |