Index: src/gpu/gl/GrGpuGL.cpp |
diff --git a/src/gpu/gl/GrGpuGL.cpp b/src/gpu/gl/GrGpuGL.cpp |
index c899eba311f2b8485aaf3a290c0948534b35b1af..6d0613c56345353c29179a83c1998d1e02215ff2 100644 |
--- a/src/gpu/gl/GrGpuGL.cpp |
+++ b/src/gpu/gl/GrGpuGL.cpp |
@@ -2242,16 +2242,19 @@ bool GrGpuGL::configToGLFormats(GrPixelConfig config, |
break; |
case kAlpha_half_GrPixelConfig: |
- 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; |
+ if (this->glStandard() == kGL_GrGLStandard) { |
+ if (this->glCaps().textureRedSupport()) { |
+ *internalFormat = GR_GL_R16F; |
+ *externalFormat = GR_GL_RED; |
+ } else { |
+ *internalFormat = GR_GL_ALPHA16F; |
+ *externalFormat = GR_GL_ALPHA; |
+ } |
+ *externalType = GR_GL_HALF_FLOAT; |
} else { |
- *internalFormat = GR_GL_ALPHA16F; |
+ *internalFormat = GR_GL_ALPHA; |
*externalFormat = GR_GL_ALPHA; |
- *externalType = (kGLES_GrGLStandard == this->glStandard()) ? GR_GL_HALF_FLOAT |
- : GR_GL_HALF_FLOAT_OES; |
+ *externalType = GR_GL_HALF_FLOAT_OES; |
} |
break; |