| Index: src/gpu/gl/GrGpuGL.cpp
|
| diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp
|
| index c899eba311f2b8485aaf3a290c0948534b35b1af..0de41318e865193c2668c63b142049c5f374c14e 100644
|
| --- a/src/gpu/gl/GrGpuGL.cpp
|
| +++ b/src/gpu/gl/GrGpuGL.cpp
|
| @@ -2242,16 +2242,18 @@ bool GrGpuGL::configToGLFormats(GrPixelConfig config,
|
| break;
|
|
|
| case kAlpha_half_GrPixelConfig:
|
| - if (this->glCaps().textureRedSupport()) {
|
| + if (kGLES_GrGLStandard == this->glStandard() && this->glVersion() < GR_GL_VER(3, 1)) {
|
| + *internalFormat = GR_GL_ALPHA;
|
| + *externalFormat = GR_GL_ALPHA;
|
| + *externalType = GR_GL_HALF_FLOAT_OES;
|
| + } else if (this->glCaps().textureRedSupport()) {
|
| *internalFormat = GR_GL_R16F;
|
| *externalFormat = GR_GL_RED;
|
| - *externalType = (kGLES_GrGLStandard == this->glStandard()) ? GR_GL_HALF_FLOAT
|
| - : GR_GL_HALF_FLOAT_OES;
|
| + *externalType = GR_GL_HALF_FLOAT;
|
| } else {
|
| *internalFormat = GR_GL_ALPHA16F;
|
| *externalFormat = GR_GL_ALPHA;
|
| - *externalType = (kGLES_GrGLStandard == this->glStandard()) ? GR_GL_HALF_FLOAT
|
| - : GR_GL_HALF_FLOAT_OES;
|
| + *externalType = GR_GL_HALF_FLOAT;
|
| }
|
| break;
|
|
|
|
|