diff options
author | Mathias Agopian <mathias@google.com> | 2012-06-13 15:21:21 -0700 |
---|---|---|
committer | Mathias Agopian <mathias@google.com> | 2012-06-13 15:21:21 -0700 |
commit | fe98127eaaf82686ba750001e2b771abece44e97 (patch) | |
tree | 4ed9a2dee3e03874322b47af02ad9110c2db6d9b /opengl | |
parent | 04d7eaf138678ef591076ff02b896f93394bcfaf (diff) | |
download | frameworks_native-fe98127eaaf82686ba750001e2b771abece44e97.zip frameworks_native-fe98127eaaf82686ba750001e2b771abece44e97.tar.gz frameworks_native-fe98127eaaf82686ba750001e2b771abece44e97.tar.bz2 |
don't error out when eglTerminate()ing an already terminated display
so says the EGL specification, section 3.2
Change-Id: Ice60530f8f6e47b4e14e06d2ab8eba799a7688a6
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/EGL/egl_display.cpp | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/opengl/libs/EGL/egl_display.cpp b/opengl/libs/EGL/egl_display.cpp index a46aa38..80072ab 100644 --- a/opengl/libs/EGL/egl_display.cpp +++ b/opengl/libs/EGL/egl_display.cpp @@ -263,7 +263,13 @@ EGLBoolean egl_display_t::terminate() { Mutex::Autolock _l(lock); if (refs == 0) { - return setError(EGL_NOT_INITIALIZED, EGL_FALSE); + /* + * From the EGL spec (3.2): + * "Termination of a display that has already been terminated, + * (...), is allowed, but the only effect of such a call is + * to return EGL_TRUE (...) + */ + return EGL_TRUE; } // this is specific to Android, display termination is ref-counted. |