| Index: src/gpu/gl/GrGLGpu.cpp
|
| diff --git a/src/gpu/gl/GrGLGpu.cpp b/src/gpu/gl/GrGLGpu.cpp
|
| index 6a8d83b019fdd4d060b8773ad4ffcdd60fc2d5a8..a4e39d65a0ac287094ce51cd930cb0d5aff6619e 100644
|
| --- a/src/gpu/gl/GrGLGpu.cpp
|
| +++ b/src/gpu/gl/GrGLGpu.cpp
|
| @@ -2384,10 +2384,17 @@ bool GrGLGpu::configToGLFormats(GrPixelConfig config,
|
| case kSRGBA_8888_GrPixelConfig:
|
| *internalFormat = GR_GL_SRGB_ALPHA;
|
| *externalFormat = GR_GL_SRGB_ALPHA;
|
| - if (getSizedInternalFormat) {
|
| + if (getSizedInternalFormat || kGL_GrGLStandard == this->glStandard()) {
|
| + // desktop or ES 3.0
|
| + SkASSERT(this->glVersion() >= GR_GL_VER(3, 0));
|
| *internalFormat = GR_GL_SRGB8_ALPHA8;
|
| + *externalFormat = GR_GL_RGBA;
|
| } else {
|
| + // ES 2.0 with EXT_sRGB
|
| + SkASSERT(kGL_GrGLStandard != this->glStandard() &&
|
| + this->glVersion() < GR_GL_VER(3, 0));
|
| *internalFormat = GR_GL_SRGB_ALPHA;
|
| + *externalFormat = GR_GL_SRGB_ALPHA;
|
| }
|
| *externalType = GR_GL_UNSIGNED_BYTE;
|
| break;
|
|
|