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)
committerChih-Wei Huang <cwhuang@linux.org.tw>
Wed, 25 Sep 2013 02:48:26 +0000 (10:48 +0800)
commit087b0df61491c20863c90f3c89d45b3d180a3428
tree450a6b478a33af0b1369459d418af5dbaa48021f
parent7516e2ff90fc6d43ae816bc5ec949c858d75ce76
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