• R/O
  • HTTP
  • SSH
  • HTTPS

提交

標籤
無標籤

Frequently used words (click to add to your profile)

javac++androidlinuxc#windowsobjective-ccocoa誰得qtpythonphprubygameguibathyscaphec計画中(planning stage)翻訳omegatframeworktwitterdomtestvb.netdirectxゲームエンジンbtronarduinopreviewer

frameworks/base


Commit MetaInfo

修訂5030e7341506c7f194046a712f25b9d434965c6b (tree)
時間2015-12-22 13:13:50
作者Andy Ross <andy.ross@wind...>
CommiterChih-Wei Huang

Log Message

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>

Change Summary

差異

--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -939,7 +939,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
939939 int a = findConfigAttrib(egl, display, config,
940940 EGL10.EGL_ALPHA_SIZE, 0);
941941 if ((r == mRedSize) && (g == mGreenSize)
942- && (b == mBlueSize) && (a == mAlphaSize)) {
942+ && (b == mBlueSize) && (a >= mAlphaSize)) {
943943 return config;
944944 }
945945 }