Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 4660c9e0 authored by Jesse Hall's avatar Jesse Hall Committed by Android Git Automerger
Browse files

am 43cea7ea: am 650a8860: am fc3c6a0e: Merge "EGL_OPENGL_ES3_BIT_KHR is set as...

am 43cea7ea: am 650a8860: am fc3c6a0e: Merge "EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested."

* commit '43cea7ea':
  EGL_OPENGL_ES3_BIT_KHR is set as ES 3 context is requested.
parents 95c95082 43cea7ea
Loading
Loading
Loading
Loading
+6 −2
Original line number Diff line number Diff line
@@ -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;
        }