summaryrefslogtreecommitdiffstats
path: root/opengl/libs
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2011-03-16 14:19:03 -0700
committerMathias Agopian <mathias@google.com>2011-03-16 14:19:03 -0700
commit36bdf14a75a7c5e50f62d8f9e1c1be0c8e8a41be (patch)
treeb312ec0ba0224287ddcd2ab8314b5508cfb8e5ea /opengl/libs
parentf38ea534a77b59be2a4ef7eae6702d2e726ded8c (diff)
downloadframeworks_native-36bdf14a75a7c5e50f62d8f9e1c1be0c8e8a41be.zip
frameworks_native-36bdf14a75a7c5e50f62d8f9e1c1be0c8e8a41be.tar.gz
frameworks_native-36bdf14a75a7c5e50f62d8f9e1c1be0c8e8a41be.tar.bz2
fix [4107131] nvidia driver call takes a very long time
We were leaking all EGLSyncKHR objects, over time the list would grow and become very slow to operate on. Bug: 4107131 Change-Id: I6c82daf49fe3189d04550781d64d57c30c95f552
Diffstat (limited to 'opengl/libs')
-rw-r--r--opengl/libs/EGL/egl.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index f4a1650..e13af1c 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -2077,14 +2077,15 @@ EGLBoolean eglDestroySyncKHR(EGLDisplay dpy, EGLSyncKHR sync)
if (!validate_display_context(dpy, ctx))
return EGL_FALSE;
+ EGLBoolean result = EGL_FALSE;
egl_context_t * const c = get_context(ctx);
-
if (c->cnx->egl.eglDestroySyncKHR) {
- return c->cnx->egl.eglDestroySyncKHR(
+ result = c->cnx->egl.eglDestroySyncKHR(
dp->disp[c->impl].dpy, syncObject->sync);
+ if (result)
+ _s.terminate();
}
-
- return EGL_FALSE;
+ return result;
}
EGLint eglClientWaitSyncKHR(EGLDisplay dpy, EGLSyncKHR sync, EGLint flags, EGLTimeKHR timeout)