mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 13:58:04 +02:00
egl: added eglDestroySurface function
This commit is contained in:
parent
64d0eb111d
commit
52676207e3
1 changed files with 23 additions and 0 deletions
|
|
@ -454,6 +454,28 @@ xlib_eglCreateWindowSurface(_EGLDriver *drv, EGLDisplay dpy, EGLConfig config,
|
|||
}
|
||||
|
||||
|
||||
static EGLBoolean
|
||||
xlib_eglDestroySurface(_EGLDriver *drv, EGLDisplay dpy, EGLSurface surface)
|
||||
{
|
||||
struct xlib_egl_surface *surf = lookup_surface(surface);
|
||||
if (surf) {
|
||||
_eglHashRemove(_eglGlobal.Surfaces, (EGLuint) surface);
|
||||
if (surf->Base.IsBound) {
|
||||
surf->Base.DeletePending = EGL_TRUE;
|
||||
}
|
||||
else {
|
||||
st_unreference_framebuffer(&surf->Framebuffer);
|
||||
free(surf);
|
||||
}
|
||||
return EGL_TRUE;
|
||||
}
|
||||
else {
|
||||
_eglError(EGL_BAD_SURFACE, "eglDestroySurface");
|
||||
return EGL_FALSE;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static EGLBoolean
|
||||
xlib_eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
|
||||
{
|
||||
|
|
@ -499,6 +521,7 @@ _eglMain(_EGLDisplay *dpy, const char *args)
|
|||
xdrv->Base.API.CreateContext = xlib_eglCreateContext;
|
||||
xdrv->Base.API.DestroyContext = xlib_eglDestroyContext;
|
||||
xdrv->Base.API.CreateWindowSurface = xlib_eglCreateWindowSurface;
|
||||
xdrv->Base.API.DestroySurface = xlib_eglDestroySurface;
|
||||
xdrv->Base.API.MakeCurrent = xlib_eglMakeCurrent;
|
||||
xdrv->Base.API.SwapBuffers = xlib_eglSwapBuffers;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue