summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-08-25 18:40:31 -0700
committerAndroid (Google) Code Review <android-gerrit@google.com>2011-08-25 18:40:31 -0700
commit3efc794f8563558b9792cc8ffa1ab9e81a0129ea (patch)
tree069a5cabdcda579f45b5cdd8ce7bbf6d94dbd8c0
parent2daf331e683d397f4968016144f4cb34188b8b98 (diff)
parentca07e34f13fd1c5df8deecc815fcb46f0a07052f (diff)
downloadframeworks_base-3efc794f8563558b9792cc8ffa1ab9e81a0129ea.zip
frameworks_base-3efc794f8563558b9792cc8ffa1ab9e81a0129ea.tar.gz
frameworks_base-3efc794f8563558b9792cc8ffa1ab9e81a0129ea.tar.bz2
Merge "fix logging of eglMakeCurrent() errors"
-rw-r--r--core/java/android/view/HardwareRenderer.java2
-rw-r--r--opengl/libs/EGL/eglApi.cpp3
2 files changed, 4 insertions, 1 deletions
diff --git a/core/java/android/view/HardwareRenderer.java b/core/java/android/view/HardwareRenderer.java
index 926d424..5b592e0 100644
--- a/core/java/android/view/HardwareRenderer.java
+++ b/core/java/android/view/HardwareRenderer.java
@@ -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;
diff --git a/opengl/libs/EGL/eglApi.cpp b/opengl/libs/EGL/eglApi.cpp
index 1f0016a..7e85230 100644
--- a/opengl/libs/EGL/eglApi.cpp
+++ b/opengl/libs/EGL/eglApi.cpp
@@ -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;
}