fix logging of eglMakeCurrent() errors

Change-Id: Ie22cabff822a8fb3186f082491234b9503b431c3
This commit is contained in:
Mathias Agopian
2011-08-25 18:38:24 -07:00
parent cf2317ef13
commit ca07e34f13
2 changed files with 4 additions and 1 deletions

View File

@ -810,9 +810,9 @@ public abstract class HardwareRenderer {
if (!mEglContext.equals(sEgl.eglGetCurrentContext()) ||
!mEglSurface.equals(sEgl.eglGetCurrentSurface(EGL_DRAW))) {
if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
fallback(true);
Log.e(LOG_TAG, "eglMakeCurrent failed " +
GLUtils.getEGLErrorString(sEgl.eglGetError()));
fallback(true);
return SURFACE_STATE_ERROR;
} else {
return SURFACE_STATE_UPDATED;

View File

@ -675,6 +675,9 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
setGLHooksThreadSpecific(&gHooksNoContext);
egl_tls_t::setContext(EGL_NO_CONTEXT);
}
} else {
// this will LOGE the error
result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);
}
return result;
}