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
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp
index 7784ca6..77a5f11 100644
--- a/opengl/libs/EGL/egl_display.cpp
+++ b/opengl/libs/EGL/egl_display.cpp
@@ -171,6 +171,7 @@
} else {
ALOGW("eglInitialize(%p) failed (%s)", idpy,
egl_tls_t::egl_strerror(cnx->egl.eglGetError()));
+ return EGL_FALSE;
}
}