From e77a32fcaed30815d0f95e0d05432e8637ab0f3e Mon Sep 17 00:00:00 2001 From: Emil Velikov Date: Thu, 11 Jun 2015 12:33:55 +0100 Subject: [PATCH] egl/haiku: minor surface management cleanups Drop the stub/unused function haiku_create_surface() and add some basic implementation for destroy_surface() Cc: Alexander von Gluck IV Acked-by: Brian Paul Signed-off-by: Emil Velikov --- src/egl/drivers/haiku/egl_haiku.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/egl/drivers/haiku/egl_haiku.cpp b/src/egl/drivers/haiku/egl_haiku.cpp index 2933acc95cc..154b3af7e07 100644 --- a/src/egl/drivers/haiku/egl_haiku.cpp +++ b/src/egl/drivers/haiku/egl_haiku.cpp @@ -76,17 +76,6 @@ struct haiku_egl_surface }; -/** - * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface(). - */ -static _EGLSurface * -haiku_create_surface(_EGLDriver *drv, _EGLDisplay *disp, EGLint type, - _EGLConfig *conf, void *native_surface, const EGLint *attrib_list) -{ - return NULL; -} - - /** * Called via eglCreateWindowSurface(), drv->API.CreateWindowSurface(). */ @@ -147,6 +136,10 @@ haiku_create_pbuffer_surface(_EGLDriver *drv, _EGLDisplay *disp, static EGLBoolean haiku_destroy_surface(_EGLDriver *drv, _EGLDisplay *disp, _EGLSurface *surf) { + if (_eglPutSurface(surf)) { + // XXX: detach haiku_egl_surface::gl from the native window and destroy it + free(surf); + } return EGL_TRUE; } -- 2.30.2