summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndy Ross <andy.ross@windriver.com>2013-01-15 15:05:38 -0800
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-12-25 17:07:31 +0100
commitef728192eedd40c5c146fbcbd62d9324f2ddeb50 (patch)
treef9fee11bd5fa3314ec9cbaef9d5dfd7d9b286f2e
parentec07befb341fad3f746ea79ee18daaf95fcded4c (diff)
downloadframeworks_base-ef728192eedd40c5c146fbcbd62d9324f2ddeb50.tar.gz
frameworks_base-ef728192eedd40c5c146fbcbd62d9324f2ddeb50.tar.bz2
frameworks_base-ef728192eedd40c5c146fbcbd62d9324f2ddeb50.zip
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>
-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 359a7a97aa8..7e3439cb9c5 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;
}
}