SurfaceTexture: eglDestroySync after duping its fd

This change adds a call to eglDestroySync after we've dup'd the fd for the
Android fence that the EGLSyncKHR object wraps.

Change-Id: I4fa6ece863260793630d70bb9a69d6284d05d99e
This commit is contained in:
Jamie Gennis 2012-09-10 14:49:42 -07:00
parent 61e04b92bd
commit 98ff0597bd

View File

@ -478,6 +478,7 @@ status_t SurfaceTexture::syncForReleaseLocked(EGLDisplay dpy) {
} }
glFlush(); glFlush();
int fenceFd = eglDupNativeFenceFDANDROID(dpy, sync); int fenceFd = eglDupNativeFenceFDANDROID(dpy, sync);
eglDestroySyncKHR(dpy, sync);
if (fenceFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) { if (fenceFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) {
ST_LOGE("syncForReleaseLocked: error dup'ing native fence " ST_LOGE("syncForReleaseLocked: error dup'ing native fence "
"fd: %#x", eglGetError()); "fd: %#x", eglGetError());