OSDN Git Service

GLSurfaceView: Be less picky about EGLConfig alpha sizes
authorAndy Ross <andy.ross@windriver.com>
Tue, 15 Jan 2013 23:05:38 +0000 (15:05 -0800)
committerMauro Rossi <issor.oruam@gmail.com>
Fri, 5 Nov 2021 01:36:31 +0000 (02:36 +0100)
commit7e110cb52084b6c2c7f41a3ffba9caf69ddb1ae5
tree05b5f39ebc4cdbb4bccca9ea78c9fad74dbfd9e2
parentdeea0a8173f8c40945edad7b5fe4bf882e3c2e25
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>
opengl/java/android/opengl/GLSurfaceView.java