aboutsummaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-06-02 11:20:37 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-06-02 16:51:49 +0000
commitbc712740bda0b78ba909894eed7aa6feeb9efe34 (patch)
tree8b92550e00ab55080747275a87895e67906a7ea2 /src
parent67af673d7adbaf6f4d81d3ccf3eaece2dd45167e (diff)
Disable single channel renderability for ANGLE ES2
Bug: 720325 Change-Id: Ib55c7a0c59a23b8dc012e04b626010de7da2921b Reviewed-on: https://skia-review.googlesource.com/18485 Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'src')
-rw-r--r--src/gpu/gl/GrGLCaps.cpp7
-rw-r--r--src/gpu/gl/GrGLUtil.cpp4
-rw-r--r--src/gpu/gl/GrGLUtil.h1
3 files changed, 10 insertions, 2 deletions
diff --git a/src/gpu/gl/GrGLCaps.cpp b/src/gpu/gl/GrGLCaps.cpp
index ba5ad6e31e..5aca304194 100644
--- a/src/gpu/gl/GrGLCaps.cpp
+++ b/src/gpu/gl/GrGLCaps.cpp
@@ -1800,10 +1800,13 @@ void GrGLCaps::initConfigTable(const GrContextOptions& contextOptions,
GR_GL_ALPHA;
fConfigTable[kAlpha_8_GrPixelConfig].fSwizzle = GrSwizzle::AAAA();
}
- if (this->textureRedSupport() ||
+ if ((this->textureRedSupport() &&
+ (ctxInfo.renderer() != kANGLE_GrGLRenderer || kGLES_GrGLStandard != standard)) ||
(kStandard_MSFBOType == this->msFBOType() && ctxInfo.renderer() != kOSMesa_GrGLRenderer)) {
+ // ES2 ANGLE seems to disallow single channel renderability (despite advertising the
+ // "GL_EXT_texture_rg" extension.
// OpenGL 3.0+ (and GL_ARB_framebuffer_object) supports ALPHA8 as renderable.
- // However, osmesa fails if it used even when GL_ARB_framebuffer_object is present.
+ // However, osmesa fails if it is used even when GL_ARB_framebuffer_object is present.
// Core profile removes ALPHA8 support, but we should have chosen R8 in that case.
fConfigTable[kAlpha_8_GrPixelConfig].fFlags |= allRenderFlags;
}
diff --git a/src/gpu/gl/GrGLUtil.cpp b/src/gpu/gl/GrGLUtil.cpp
index 41c57eb1e1..cf4615ad86 100644
--- a/src/gpu/gl/GrGLUtil.cpp
+++ b/src/gpu/gl/GrGLUtil.cpp
@@ -330,6 +330,10 @@ GrGLRenderer GrGLGetRendererFromString(const char* rendererString) {
if (0 == strncmp(rendererString, kMaliTStr, SK_ARRAY_COUNT(kMaliTStr) - 1)) {
return kMaliT_GrGLRenderer;
}
+ static const char kANGLEStr[] = "ANGLE";
+ if (0 == strncmp(rendererString, kANGLEStr, SK_ARRAY_COUNT(kANGLEStr) - 1)) {
+ return kANGLE_GrGLRenderer;
+ }
}
return kOther_GrGLRenderer;
}
diff --git a/src/gpu/gl/GrGLUtil.h b/src/gpu/gl/GrGLUtil.h
index 261a4cd22d..fc2594a3a0 100644
--- a/src/gpu/gl/GrGLUtil.h
+++ b/src/gpu/gl/GrGLUtil.h
@@ -58,6 +58,7 @@ enum GrGLRenderer {
kIntel6xxx_GrGLRenderer,
/** T-6xx, T-7xx, or T-8xx */
kMaliT_GrGLRenderer,
+ kANGLE_GrGLRenderer,
kOther_GrGLRenderer
};