diff options
author | Adam Jackson <[email protected]> | 2016-09-09 13:45:09 -0400 |
---|---|---|
committer | Adam Jackson <[email protected]> | 2016-09-14 11:45:58 -0400 |
commit | e2c067d256c86bbeb2e99f8d216da267e76e2d8c (patch) | |
tree | a1bb7098161f9b1bb05ee93693c27021a929420c /src | |
parent | 6e50f12b043436d066c8e9f24984e1ddc32d8ec4 (diff) |
egl: Tear down images and syncs at eglTerminate
Reviewed-by: Emil Velikov <[email protected]>
Signed-off-by: Adam Jackson <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/egl/main/egldisplay.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/egl/main/egldisplay.c b/src/egl/main/egldisplay.c index bbc306337ed..3d4eb8126fc 100644 --- a/src/egl/main/egldisplay.c +++ b/src/egl/main/egldisplay.c @@ -44,6 +44,8 @@ #include "egldriver.h" #include "eglglobals.h" #include "egllog.h" +#include "eglimage.h" +#include "eglsync.h" /* Includes for _eglNativePlatformDetectNativeDisplay */ #ifdef HAVE_MINCORE @@ -300,6 +302,26 @@ _eglReleaseDisplayResources(_EGLDriver *drv, _EGLDisplay *display) drv->API.DestroySurface(drv, display, surf); } assert(!display->ResourceLists[_EGL_RESOURCE_SURFACE]); + + list = display->ResourceLists[_EGL_RESOURCE_IMAGE]; + while (list) { + _EGLImage *image = (_EGLImage *) list; + list = list->Next; + + _eglUnlinkImage(image); + drv->API.DestroyImageKHR(drv, display, image); + } + assert(!display->ResourceLists[_EGL_RESOURCE_IMAGE]); + + list = display->ResourceLists[_EGL_RESOURCE_SYNC]; + while (list) { + _EGLSync *sync = (_EGLSync *) list; + list = list->Next; + + _eglUnlinkSync(sync); + drv->API.DestroySyncKHR(drv, display, sync); + } + assert(!display->ResourceLists[_EGL_RESOURCE_SYNC]); } |