egl: replace dead vfunc with an error
authorEric Engestrom <eric.engestrom@intel.com>
Sat, 22 Jun 2019 14:53:36 +0000 (15:53 +0100)
committerEric Engestrom <eric.engestrom@intel.com>
Tue, 25 Jun 2019 06:47:19 +0000 (07:47 +0100)
st/egl used to support eglCreatePbufferFromClientBuffer, but now that
it's gone, any call to it would segfault.

Let's return a nice error instead.

Signed-off-by: Eric Engestrom <eric.engestrom@intel.com>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/egl/main/eglapi.c
src/egl/main/eglapi.h

index 2831761f0ea232f102863fcacf2b8f978203ec40..cffa756365eee1caea6d4a47a227edf3860e7376 100644 (file)
@@ -1678,18 +1678,13 @@ eglCreatePbufferFromClientBuffer(EGLDisplay dpy, EGLenum buftype,
    _EGLDisplay *disp = _eglLockDisplay(dpy);
    _EGLConfig *conf = _eglLookupConfig(config, disp);
    _EGLDriver *drv;
-   _EGLSurface *surf;
-   EGLSurface ret;
 
    _EGL_FUNC_START(disp, EGL_OBJECT_DISPLAY_KHR, NULL, EGL_NO_SURFACE);
 
    _EGL_CHECK_CONFIG(disp, conf, EGL_NO_SURFACE, drv);
 
-   surf = drv->API.CreatePbufferFromClientBuffer(drv, disp, buftype, buffer,
-                                                 conf, attrib_list);
-   ret = (surf) ? _eglLinkSurface(surf) : EGL_NO_SURFACE;
-
-   RETURN_EGL_EVAL(disp, ret);
+   /* OpenVG is not supported */
+   RETURN_EGL_ERROR(disp, EGL_BAD_ALLOC, EGL_NO_SURFACE);
 }
 
 
index 445e8535b5733624df23491779ad301c3b4a55d2..968f4b277250855436351ed0e544a62a91bdcf2f 100644 (file)
@@ -108,13 +108,6 @@ struct _egl_api
    /* this function may be called from multiple threads at the same time */
    _EGLProc (*GetProcAddress)(_EGLDriver *drv, const char *procname);
 
-   _EGLSurface *(*CreatePbufferFromClientBuffer)(_EGLDriver *drv,
-                                                 _EGLDisplay *disp,
-                                                 EGLenum buftype,
-                                                 EGLClientBuffer buffer,
-                                                 _EGLConfig *config,
-                                                 const EGLint *attrib_list);
-
    _EGLImage *(*CreateImageKHR)(_EGLDriver *drv, _EGLDisplay *disp,
                                 _EGLContext *ctx, EGLenum target,
                                 EGLClientBuffer buffer,