Index: src/gpu/gl/GrGLCaps.cpp |
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp |
index 9b12ce69c50b89ad0d66be2e6bfb15736a3ab960..ebfbf6a065ad3f79641040dc81a3a5925cc301e7 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: |