OSDN Git Service

Return EGL_FALSE early when eglInitialize() fails
authorTom Hudson <tomhudson@google.com>
Tue, 23 Sep 2014 16:00:41 +0000 (12:00 -0400)
committerTom Hudson <tomhudson@google.com>
Tue, 23 Sep 2014 16:00:41 +0000 (12:00 -0400)
In the Meta-EGL shim, eglInitialize() could fail but return EGL_TRUE,
writing into the version numbers; both of these behaviors contradict
the spec.

BUG=b/17486830
R=jessehall@google.com

Change-Id: I810bdbd701e222ac09ab8660ce9dfc0c0954c3d7

opengl/libs/EGL/egl_display.cpp

index 7784ca6..77a5f11 100644 (file)
@@ -171,6 +171,7 @@ EGLBoolean egl_display_t::initialize(EGLint *major, EGLint *minor) {
         } else {
             ALOGW("eglInitialize(%p) failed (%s)", idpy,
                     egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
+            return EGL_FALSE;
         }
     }