aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp21
1 files changed, 9 insertions, 12 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index 5134314fef..0a5c2fe7b7 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -759,20 +759,17 @@ void GrGLCaps::initGLSL(const GrGLContextInfo& ctxInfo, const GrGLInterface* gli
}
if (ctxInfo.hasExtension("GL_OES_EGL_image_external")) {
- if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
- shaderCaps->fExternalTextureSupport = true;
- } else if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
- ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
+ // We should check that we're using ES2 shading language, or have the ESSL3 extension,
+ // but we found at least one device that breaks that rule. So, we enable support via the
+ // ES2 extension if the ES2 extension is missing. This could fail if a device only supports
+ // external images in ES2, but that seems unlikely? (skbug.com/7713)
+ shaderCaps->fExternalTextureSupport = true;
+ if (ctxInfo.hasExtension("GL_OES_EGL_image_external_essl3") ||
+ ctxInfo.hasExtension("OES_EGL_image_external_essl3")) {
// At least one driver has been found that has this extension without the "GL_" prefix.
- shaderCaps->fExternalTextureSupport = true;
- }
- }
-
- if (shaderCaps->fExternalTextureSupport) {
- if (ctxInfo.glslGeneration() == k110_GrGLSLGeneration) {
- shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external";
- } else {
shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external_essl3";
+ } else {
+ shaderCaps->fExternalTextureExtensionString = "GL_OES_EGL_image_external";
}
}