summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Hall <jessehall@google.com>2014-04-21 19:49:40 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-04-21 19:49:40 +0000
commit4660c9e064ebaec9ebb260c2853a8dab868ccdc2 (patch)
tree15b4e93fb44462164ce13c22b016adece9c80507
parent95c950825f02e937711fbcbff63f614a91cb1443 (diff)
parent43cea7eadbcb3930887eadfa3f278e1a666449d0 (diff)
downloadframeworks_base-4660c9e064ebaec9ebb260c2853a8dab868ccdc2.zip
frameworks_base-4660c9e064ebaec9ebb260c2853a8dab868ccdc2.tar.gz
frameworks_base-4660c9e064ebaec9ebb260c2853a8dab868ccdc2.tar.bz2
am 43cea7ea: am 650a8860: am fc3c6a0e: Merge "EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested."
* commit '43cea7eadbcb3930887eadfa3f278e1a666449d0': EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested.
-rw-r--r--opengl/java/android/opengl/GLSurfaceView.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/opengl/java/android/opengl/GLSurfaceView.java b/opengl/java/android/opengl/GLSurfaceView.java
index a9322b9..1406f6b 100644
--- a/opengl/java/android/opengl/GLSurfaceView.java
+++ b/opengl/java/android/opengl/GLSurfaceView.java
@@ -878,7 +878,7 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
protected int[] mConfigSpec;
private int[] filterConfigSpec(int[] configSpec) {
- if (mEGLContextClientVersion != 2) {
+ if (mEGLContextClientVersion != 2 && mEGLContextClientVersion != 3) {
return configSpec;
}
/* We know none of the subclasses define EGL_RENDERABLE_TYPE.
@@ -888,7 +888,11 @@ public class GLSurfaceView extends SurfaceView implements SurfaceHolder.Callback
int[] newConfigSpec = new int[len + 2];
System.arraycopy(configSpec, 0, newConfigSpec, 0, len-1);
newConfigSpec[len-1] = EGL10.EGL_RENDERABLE_TYPE;
- newConfigSpec[len] = 4; /* EGL_OPENGL_ES2_BIT */
+ if (mEGLContextClientVersion == 2) {
+ newConfigSpec[len] = EGL14.EGL_OPENGL_ES2_BIT; /* EGL_OPENGL_ES2_BIT */
+ } else {
+ newConfigSpec[len] = EGLExt.EGL_OPENGL_ES3_BIT_KHR; /* EGL_OPENGL_ES3_BIT_KHR */
+ }
newConfigSpec[len+1] = EGL10.EGL_NONE;
return newConfigSpec;
}