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

Commit 524a6d9c authored by Romain Guy's avatar Romain Guy Committed by Android Git Automerger
Browse files

am 41dbb6fe: am 82f385a3: Merge "Add extra EGL error checking" into jb-mr1-dev

* commit '41dbb6fe':
  Add extra EGL error checking
parents 3e98a331 41dbb6fe
Loading
Loading
Loading
Loading
+14 −8
Original line number Diff line number Diff line
@@ -733,6 +733,11 @@ public abstract class HardwareRenderer {
         */
        void checkEglErrors() {
            if (isEnabled()) {
                checkEglErrorsForced();
            }
        }

        private void checkEglErrorsForced() {
            int error = sEgl.eglGetError();
            if (error != EGL_SUCCESS) {
                // something bad has happened revert to
@@ -741,7 +746,6 @@ public abstract class HardwareRenderer {
                fallback(error != EGL11.EGL_CONTEXT_LOST);
            }
        }
        }

        private void fallback(boolean fallback) {
            destroy(true);
@@ -813,6 +817,8 @@ public abstract class HardwareRenderer {
                                GLUtils.getEGLErrorString(sEgl.eglGetError()));
                    }

                    checkEglErrorsForced();

                    sEglConfig = chooseEglConfig();
                    if (sEglConfig == null) {
                        // We tried to use EGL_SWAP_BEHAVIOR_PRESERVED_BIT, try again without