summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorAndy Ross <andy.ross@windriver.com>2013-01-15 15:05:38 -0800
committerWolfgang Wiedmeyer <wolfgit@wiedmeyer.de>2016-06-22 17:37:31 +0200
commite4ed04895627da35dbe200071171ef271dc87d59 (patch)
tree7b79479d796fd6d13019b0a42caeabb4d6160c48 /opengl
parent24abb423c30dd3fa815154664bd59eb011f7c0e9 (diff)
downloadframeworks_base-e4ed04895627da35dbe200071171ef271dc87d59.zip
frameworks_base-e4ed04895627da35dbe200071171ef271dc87d59.tar.gz
frameworks_base-e4ed04895627da35dbe200071171ef271dc87d59.tar.bz2
GLSurfaceView: Be less picky about EGLConfig alpha sizes
EGLChooseConfig returns a "best match" set of visuals meeting or exceeding the required r/g/b/a component depths. But GLSurfaceView oddly requires that the returned visual be an exact match. Add to that that the (rarely used outside of CTS) default request specifies zero alpha bits and that not all drivers expose a zero-alpha EGLConfig, and the default configuration will fail needlessly. It's not incorrect to have alpha bits you didn't request: the only way to produce divergent behavior is for a fragment shader to write out explicit alpha values (into the channel it didn't want to begin with!) with values other than 1.0 and then rely on them being ignored and treated as 1.0. For: AXIA-1448 Change-Id: I2f64995d7b9de1ae082aa47822af525390102083 Signed-off-by: Andy Ross <andy.ross@windriver.com>
Diffstat (limited to 'opengl')
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index 359a7a9..7e3439c 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -940,7 +940,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
int a = findConfigAttrib(egl, display, config,
EGL10.EGL_ALPHA_SIZE, 0);
if ((r == mRedSize) && (g == mGreenSize)
- && (b == mBlueSize) && (a == mAlphaSize)) {
+ && (b == mBlueSize) && (a >= mAlphaSize)) {
return config;
}
}