Return EGL_FALSE early when eglInitialize() fails

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
This commit is contained in:
Tom Hudson 2014-09-23 12:00:41 -04:00
parent b207e95b46
commit e11b1a733c

View 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;
}
}