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>
Tue, 22 Dec 2015 04:13:50 +0000 (12:13 +0800)
commit5030e7341506c7f194046a712f25b9d434965c6b
treebe9410470033aeabe1aa3d8360760462f49fb56a
parent0a017e126e0c070d528472e57e1ab272c2a76670
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