Merge "fix logging of eglMakeCurrent() errors"
This commit is contained in:
committed by
Android (Google) Code Review
commit
3efc794f85
@@ -810,9 +810,9 @@ public abstract class HardwareRenderer {
|
|||||||
if (!mEglContext.equals(sEgl.eglGetCurrentContext()) ||
|
if (!mEglContext.equals(sEgl.eglGetCurrentContext()) ||
|
||||||
!mEglSurface.equals(sEgl.eglGetCurrentSurface(EGL_DRAW))) {
|
!mEglSurface.equals(sEgl.eglGetCurrentSurface(EGL_DRAW))) {
|
||||||
if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
|
if (!sEgl.eglMakeCurrent(sEglDisplay, mEglSurface, mEglSurface, mEglContext)) {
|
||||||
fallback(true);
|
|
||||||
Log.e(LOG_TAG, "eglMakeCurrent failed " +
|
Log.e(LOG_TAG, "eglMakeCurrent failed " +
|
||||||
GLUtils.getEGLErrorString(sEgl.eglGetError()));
|
GLUtils.getEGLErrorString(sEgl.eglGetError()));
|
||||||
|
fallback(true);
|
||||||
return SURFACE_STATE_ERROR;
|
return SURFACE_STATE_ERROR;
|
||||||
} else {
|
} else {
|
||||||
return SURFACE_STATE_UPDATED;
|
return SURFACE_STATE_UPDATED;
|
||||||
|
|||||||
@@ -675,6 +675,9 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
|
|||||||
setGLHooksThreadSpecific(&gHooksNoContext);
|
setGLHooksThreadSpecific(&gHooksNoContext);
|
||||||
egl_tls_t::setContext(EGL_NO_CONTEXT);
|
egl_tls_t::setContext(EGL_NO_CONTEXT);
|
||||||
}
|
}
|
||||||
|
} else {
|
||||||
|
// this will LOGE the error
|
||||||
|
result = setError(c->cnx->egl.eglGetError(), EGL_FALSE);
|
||||||
}
|
}
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user