diff options
author | Mathias Agopian <mathias@google.com> | 2010-09-21 15:43:59 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2010-09-21 15:43:59 -0700 |
commit | f65630a4b84fdc8cad670dcc61225e55d4ca4ca1 (patch) | |
tree | 6b8f8ce2153f1896060c8d77964c7300faf0b2fb /opengl/libs/EGL/egl.cpp | |
parent | d45cb72ac0d7d57829ffc9223decb89a5fc42ce2 (diff) | |
download | frameworks_base-f65630a4b84fdc8cad670dcc61225e55d4ca4ca1.zip frameworks_base-f65630a4b84fdc8cad670dcc61225e55d4ca4ca1.tar.gz frameworks_base-f65630a4b84fdc8cad670dcc61225e55d4ca4ca1.tar.bz2 |
fix small bug in EGL error management
make sure to clear our EGL implementation's error when returning
an error from an underlying implementation
Change-Id: Ibce4726cef1f900e4c7f16002345d7a07f8cdf41
Diffstat (limited to 'opengl/libs/EGL/egl.cpp')
-rw-r--r-- | opengl/libs/EGL/egl.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index df21358..105ebb4 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -1344,16 +1344,18 @@ EGLBoolean eglWaitNative(EGLint engine) EGLint eglGetError(void) { EGLint result = EGL_SUCCESS; + EGLint err; for (int i=0 ; i<IMPL_NUM_IMPLEMENTATIONS ; i++) { - EGLint err = EGL_SUCCESS; + err = EGL_SUCCESS; egl_connection_t* const cnx = &gEGLImpl[i]; if (cnx->dso) err = cnx->egl.eglGetError(); if (err!=EGL_SUCCESS && result==EGL_SUCCESS) result = err; } + err = getError(); if (result == EGL_SUCCESS) - result = getError(); + result = err; return result; } |