From 98ff0597bd9e57ba133d54f8f09841f96955cba1 Mon Sep 17 00:00:00 2001 From: Jamie Gennis Date: Mon, 10 Sep 2012 14:49:42 -0700 Subject: [PATCH] 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 --- libs/gui/SurfaceTexture.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/libs/gui/SurfaceTexture.cpp b/libs/gui/SurfaceTexture.cpp index e21b65d6a..36a2af7dc 100644 --- a/libs/gui/SurfaceTexture.cpp +++ b/libs/gui/SurfaceTexture.cpp @@ -478,6 +478,7 @@ status_t SurfaceTexture::syncForReleaseLocked(EGLDisplay dpy) { } glFlush(); int fenceFd = eglDupNativeFenceFDANDROID(dpy, sync); + eglDestroySyncKHR(dpy, sync); if (fenceFd == EGL_NO_NATIVE_FENCE_FD_ANDROID) { ST_LOGE("syncForReleaseLocked: error dup'ing native fence " "fd: %#x", eglGetError());