From 25328509c90dc205b9561b5265e478af2873438b Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 22 Oct 2010 18:11:04 +0800 Subject: egl: Move fallback routines to eglfallbacks.c. We do not want them to be all over the places. --- src/egl/main/Makefile | 1 + src/egl/main/SConscript | 1 + src/egl/main/eglcontext.c | 48 ------------------ src/egl/main/eglcontext.h | 16 ------ src/egl/main/egldriver.c | 79 ----------------------------- src/egl/main/egldriver.h | 1 + src/egl/main/eglfallbacks.c | 99 +++++++++++++++++++++++++++++++++++++ src/egl/main/eglimage.c | 18 ------- src/egl/main/eglimage.h | 9 ---- src/egl/main/eglmisc.c | 29 ----------- src/egl/main/eglmisc.h | 8 --- src/egl/main/eglscreen.c | 44 ----------------- src/egl/main/eglscreen.h | 8 --- src/egl/main/eglsurface.c | 118 -------------------------------------------- src/egl/main/eglsurface.h | 38 -------------- src/egl/main/eglsync.c | 31 ------------ src/egl/main/eglsync.h | 19 ------- 17 files changed, 102 insertions(+), 465 deletions(-) create mode 100644 src/egl/main/eglfallbacks.c diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 19085a31f1..b4ca20c094 100644 --- a/src/egl/main/Makefile +++ b/src/egl/main/Makefile @@ -36,6 +36,7 @@ SOURCES = \ eglcurrent.c \ egldisplay.c \ egldriver.c \ + eglfallbacks.c \ eglglobals.c \ eglimage.c \ egllog.c \ diff --git a/src/egl/main/SConscript b/src/egl/main/SConscript index 45d40e2650..8ade85b357 100644 --- a/src/egl/main/SConscript +++ b/src/egl/main/SConscript @@ -28,6 +28,7 @@ if env['platform'] != 'winddk': 'eglcurrent.c', 'egldisplay.c', 'egldriver.c', + 'eglfallbacks.c', 'eglglobals.c', 'eglimage.c', 'egllog.c', diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index ec35be9d3a..113e4e48fb 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -129,29 +129,6 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *conf, } -/** - * Just a placeholder/demo function. Real driver will never use this! - */ -_EGLContext * -_eglCreateContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, - _EGLContext *share_list, const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLBoolean -_eglDestroyContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx) -{ - if (!_eglIsContextBound(ctx)) - free(ctx); - return EGL_TRUE; -} - - #ifdef EGL_VERSION_1_2 static EGLint _eglQueryContextRenderBuffer(_EGLContext *ctx) @@ -375,28 +352,3 @@ _eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read) return EGL_TRUE; } - - -/** - * Just a placeholder/demo function. Drivers should override this. - */ -EGLBoolean -_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, - _EGLSurface *read, _EGLContext *ctx) -{ - return EGL_FALSE; -} - - -/** - * This is defined by the EGL_MESA_copy_context extension. - */ -EGLBoolean -_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, - EGLContext dest, EGLint mask) -{ - /* This function will always have to be overridden/implemented in the - * device driver. If the driver is based on Mesa, use _mesa_copy_context(). - */ - return EGL_FALSE; -} diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h index cfe92dd9f5..148f160cae 100644 --- a/src/egl/main/eglcontext.h +++ b/src/egl/main/eglcontext.h @@ -34,14 +34,6 @@ _eglInitContext(_EGLContext *ctx, _EGLDisplay *dpy, _EGLConfig *config, const EGLint *attrib_list); -extern _EGLContext * -_eglCreateContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, _EGLContext *share_list, const EGLint *attrib_list); - - -extern EGLBoolean -_eglDestroyContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx); - - extern EGLBoolean _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint attribute, EGLint *value); @@ -50,14 +42,6 @@ PUBLIC EGLBoolean _eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read); -extern EGLBoolean -_eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx); - - -extern EGLBoolean -_eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source, EGLContext dest, EGLint mask); - - /** * Return true if the context is bound to a thread. * diff --git a/src/egl/main/egldriver.c b/src/egl/main/egldriver.c index a4ff6911be..2359253ff1 100644 --- a/src/egl/main/egldriver.c +++ b/src/egl/main/egldriver.c @@ -9,18 +9,10 @@ #include #include "eglstring.h" -#include "eglconfig.h" -#include "eglcontext.h" #include "egldefines.h" #include "egldisplay.h" #include "egldriver.h" #include "egllog.h" -#include "eglmisc.h" -#include "eglmode.h" -#include "eglscreen.h" -#include "eglsurface.h" -#include "eglimage.h" -#include "eglsync.h" #include "eglmutex.h" #if defined(_EGL_OS_UNIX) @@ -662,77 +654,6 @@ _eglUnloadDrivers(void) } -/** - * Plug all the available fallback routines into the given driver's - * dispatch table. - */ -void -_eglInitDriverFallbacks(_EGLDriver *drv) -{ - /* If a pointer is set to NULL, then the device driver _really_ has - * to implement it. - */ - drv->API.Initialize = NULL; - drv->API.Terminate = NULL; - - drv->API.GetConfigs = _eglGetConfigs; - drv->API.ChooseConfig = _eglChooseConfig; - drv->API.GetConfigAttrib = _eglGetConfigAttrib; - - drv->API.CreateContext = _eglCreateContext; - drv->API.DestroyContext = _eglDestroyContext; - drv->API.MakeCurrent = _eglMakeCurrent; - drv->API.QueryContext = _eglQueryContext; - - drv->API.CreateWindowSurface = _eglCreateWindowSurface; - drv->API.CreatePixmapSurface = _eglCreatePixmapSurface; - drv->API.CreatePbufferSurface = _eglCreatePbufferSurface; - drv->API.DestroySurface = _eglDestroySurface; - drv->API.QuerySurface = _eglQuerySurface; - drv->API.SurfaceAttrib = _eglSurfaceAttrib; - drv->API.BindTexImage = _eglBindTexImage; - drv->API.ReleaseTexImage = _eglReleaseTexImage; - drv->API.SwapInterval = _eglSwapInterval; - drv->API.SwapBuffers = _eglSwapBuffers; - drv->API.CopyBuffers = _eglCopyBuffers; - - drv->API.QueryString = _eglQueryString; - drv->API.WaitClient = _eglWaitClient; - drv->API.WaitNative = _eglWaitNative; - -#ifdef EGL_MESA_screen_surface - drv->API.ChooseModeMESA = _eglChooseModeMESA; - drv->API.GetModesMESA = _eglGetModesMESA; - drv->API.GetModeAttribMESA = _eglGetModeAttribMESA; - drv->API.GetScreensMESA = _eglGetScreensMESA; - drv->API.CreateScreenSurfaceMESA = _eglCreateScreenSurfaceMESA; - drv->API.ShowScreenSurfaceMESA = _eglShowScreenSurfaceMESA; - drv->API.ScreenPositionMESA = _eglScreenPositionMESA; - drv->API.QueryScreenMESA = _eglQueryScreenMESA; - drv->API.QueryScreenSurfaceMESA = _eglQueryScreenSurfaceMESA; - drv->API.QueryScreenModeMESA = _eglQueryScreenModeMESA; - drv->API.QueryModeStringMESA = _eglQueryModeStringMESA; -#endif /* EGL_MESA_screen_surface */ - -#ifdef EGL_VERSION_1_2 - drv->API.CreatePbufferFromClientBuffer = _eglCreatePbufferFromClientBuffer; -#endif /* EGL_VERSION_1_2 */ - -#ifdef EGL_KHR_image_base - drv->API.CreateImageKHR = _eglCreateImageKHR; - drv->API.DestroyImageKHR = _eglDestroyImageKHR; -#endif /* EGL_KHR_image_base */ - -#ifdef EGL_KHR_reusable_sync - drv->API.CreateSyncKHR = _eglCreateSyncKHR; - drv->API.DestroySyncKHR = _eglDestroySyncKHR; - drv->API.ClientWaitSyncKHR = _eglClientWaitSyncKHR; - drv->API.SignalSyncKHR = _eglSignalSyncKHR; - drv->API.GetSyncAttribKHR = _eglGetSyncAttribKHR; -#endif /* EGL_KHR_reusable_sync */ -} - - /** * Invoke a callback function on each EGL search path. * diff --git a/src/egl/main/egldriver.h b/src/egl/main/egldriver.h index c618feb6b0..1ca7c6cd93 100644 --- a/src/egl/main/egldriver.h +++ b/src/egl/main/egldriver.h @@ -80,6 +80,7 @@ extern void _eglUnloadDrivers(void); +/* defined in eglfallbacks.c */ PUBLIC void _eglInitDriverFallbacks(_EGLDriver *drv); diff --git a/src/egl/main/eglfallbacks.c b/src/egl/main/eglfallbacks.c new file mode 100644 index 0000000000..7c93adb76a --- /dev/null +++ b/src/egl/main/eglfallbacks.c @@ -0,0 +1,99 @@ +#include +#include "egltypedefs.h" +#include "egldriver.h" +#include "eglconfig.h" +#include "eglcontext.h" +#include "eglsurface.h" +#include "eglmisc.h" +#include "eglscreen.h" +#include "eglmode.h" +#include "eglsync.h" + + +static EGLBoolean +_eglReturnFalse(void) +{ + return EGL_FALSE; +} + + +/** + * Plug all the available fallback routines into the given driver's + * dispatch table. + */ +void +_eglInitDriverFallbacks(_EGLDriver *drv) +{ + memset(&drv->API, 0, sizeof(drv->API)); + + /* the driver has to implement these */ + drv->API.Initialize = NULL; + drv->API.Terminate = NULL; + + drv->API.GetConfigs = _eglGetConfigs; + drv->API.ChooseConfig = _eglChooseConfig; + drv->API.GetConfigAttrib = _eglGetConfigAttrib; + + drv->API.CreateContext = (CreateContext_t) _eglReturnFalse; + drv->API.DestroyContext = (DestroyContext_t) _eglReturnFalse; + drv->API.MakeCurrent = (MakeCurrent_t) _eglReturnFalse; + drv->API.QueryContext = _eglQueryContext; + + drv->API.CreateWindowSurface = (CreateWindowSurface_t) _eglReturnFalse; + drv->API.CreatePixmapSurface = (CreatePixmapSurface_t) _eglReturnFalse; + drv->API.CreatePbufferSurface = (CreatePbufferSurface_t) _eglReturnFalse; + drv->API.CreatePbufferFromClientBuffer = + (CreatePbufferFromClientBuffer_t) _eglReturnFalse; + drv->API.DestroySurface = (DestroySurface_t) _eglReturnFalse; + drv->API.QuerySurface = _eglQuerySurface; + drv->API.SurfaceAttrib = _eglSurfaceAttrib; + + drv->API.BindTexImage = (BindTexImage_t) _eglReturnFalse; + drv->API.ReleaseTexImage = (ReleaseTexImage_t) _eglReturnFalse; + drv->API.CopyBuffers = (CopyBuffers_t) _eglReturnFalse; + drv->API.SwapBuffers = (SwapBuffers_t) _eglReturnFalse; + drv->API.SwapInterval = _eglSwapInterval; + + drv->API.WaitClient = (WaitClient_t) _eglReturnFalse; + drv->API.WaitNative = (WaitNative_t) _eglReturnFalse; + drv->API.GetProcAddress = (GetProcAddress_t) _eglReturnFalse; + drv->API.QueryString = _eglQueryString; + +#ifdef EGL_MESA_screen_surface + drv->API.CopyContextMESA = (CopyContextMESA_t) _eglReturnFalse; + drv->API.CreateScreenSurfaceMESA = + (CreateScreenSurfaceMESA_t) _eglReturnFalse; + drv->API.ShowScreenSurfaceMESA = (ShowScreenSurfaceMESA_t) _eglReturnFalse; + drv->API.ChooseModeMESA = _eglChooseModeMESA; + drv->API.GetModesMESA = _eglGetModesMESA; + drv->API.GetModeAttribMESA = _eglGetModeAttribMESA; + drv->API.GetScreensMESA = _eglGetScreensMESA; + drv->API.ScreenPositionMESA = _eglScreenPositionMESA; + drv->API.QueryScreenMESA = _eglQueryScreenMESA; + drv->API.QueryScreenSurfaceMESA = _eglQueryScreenSurfaceMESA; + drv->API.QueryScreenModeMESA = _eglQueryScreenModeMESA; + drv->API.QueryModeStringMESA = _eglQueryModeStringMESA; +#endif /* EGL_MESA_screen_surface */ + +#ifdef EGL_KHR_image_base + drv->API.CreateImageKHR = NULL; + drv->API.DestroyImageKHR = NULL; +#endif /* EGL_KHR_image_base */ + +#ifdef EGL_KHR_reusable_sync + drv->API.CreateSyncKHR = NULL; + drv->API.DestroySyncKHR = NULL; + drv->API.ClientWaitSyncKHR = NULL; + drv->API.SignalSyncKHR = NULL; + drv->API.GetSyncAttribKHR = _eglGetSyncAttribKHR; +#endif /* EGL_KHR_reusable_sync */ + +#ifdef EGL_MESA_drm_image + drv->API.CreateDRMImageMESA = NULL; + drv->API.ExportDRMImageMESA = NULL; +#endif + +#ifdef EGL_NOK_swap_region + drv->API.SwapBuffersRegionNOK = NULL; +#endif +} diff --git a/src/egl/main/eglimage.c b/src/egl/main/eglimage.c index 8244ef3b51..af4a29fb0e 100644 --- a/src/egl/main/eglimage.c +++ b/src/egl/main/eglimage.c @@ -88,22 +88,4 @@ _eglInitImage(_EGLImage *img, _EGLDisplay *dpy) } -_EGLImage * -_eglCreateImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, - EGLenum target, EGLClientBuffer buffer, - const EGLint *attr_list) -{ - /* driver should override this function */ - return NULL; -} - - -EGLBoolean -_eglDestroyImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image) -{ - /* driver should override this function */ - return EGL_FALSE; -} - - #endif /* EGL_KHR_image_base */ diff --git a/src/egl/main/eglimage.h b/src/egl/main/eglimage.h index e457bf4ef6..7cd92c1125 100644 --- a/src/egl/main/eglimage.h +++ b/src/egl/main/eglimage.h @@ -42,15 +42,6 @@ PUBLIC EGLBoolean _eglInitImage(_EGLImage *img, _EGLDisplay *dpy); -extern _EGLImage * -_eglCreateImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, - EGLenum target, EGLClientBuffer buffer, const EGLint *attr_list); - - -extern EGLBoolean -_eglDestroyImageKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLImage *image); - - /** * Link an image to a display and return the handle of the link. * The handle can be passed to client directly. diff --git a/src/egl/main/eglmisc.c b/src/egl/main/eglmisc.c index eb3dde1fb4..bbb96a908e 100644 --- a/src/egl/main/eglmisc.c +++ b/src/egl/main/eglmisc.c @@ -158,32 +158,3 @@ _eglQueryString(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name) return NULL; } } - - -EGLBoolean -_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx) -{ - /* just a placeholder */ - (void) drv; - (void) dpy; - (void) ctx; - return EGL_TRUE; -} - - -EGLBoolean -_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine) -{ - /* just a placeholder */ - (void) drv; - (void) dpy; - switch (engine) { - case EGL_CORE_NATIVE_ENGINE: - break; - default: - _eglError(EGL_BAD_PARAMETER, "eglWaitNative(engine)"); - return EGL_FALSE; - } - - return EGL_TRUE; -} diff --git a/src/egl/main/eglmisc.h b/src/egl/main/eglmisc.h index 5e6a2d41df..a753307a14 100644 --- a/src/egl/main/eglmisc.h +++ b/src/egl/main/eglmisc.h @@ -37,12 +37,4 @@ extern const char * _eglQueryString(_EGLDriver *drv, _EGLDisplay *dpy, EGLint name); -extern EGLBoolean -_eglWaitClient(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx); - - -extern EGLBoolean -_eglWaitNative(_EGLDriver *drv, _EGLDisplay *dpy, EGLint engine); - - #endif /* EGLMISC_INCLUDED */ diff --git a/src/egl/main/eglscreen.c b/src/egl/main/eglscreen.c index 9e39335cc7..2ae403494e 100644 --- a/src/egl/main/eglscreen.c +++ b/src/egl/main/eglscreen.c @@ -122,50 +122,6 @@ _eglGetScreensMESA(_EGLDriver *drv, _EGLDisplay *display, EGLScreenMESA *screens } -/** - * Drivers should do a proper implementation. - */ -_EGLSurface * -_eglCreateScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, - const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Show the given surface on the named screen. - * If surface is EGL_NO_SURFACE, disable the screen's output. - * - * This is just a placeholder function; drivers will always override - * this with code that _really_ shows the surface. - */ -EGLBoolean -_eglShowScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, - _EGLScreen *scrn, _EGLSurface *surf, - _EGLMode *mode) -{ - if (!surf) { - scrn->CurrentSurface = NULL; - } - else { - if (surf->Type != EGL_SCREEN_BIT_MESA) { - _eglError(EGL_BAD_SURFACE, "eglShowSurfaceMESA"); - return EGL_FALSE; - } - if (surf->Width < mode->Width || surf->Height < mode->Height) { - _eglError(EGL_BAD_SURFACE, - "eglShowSurfaceMESA(surface smaller than screen size)"); - return EGL_FALSE; - } - - scrn->CurrentSurface = surf; - scrn->CurrentMode = mode; - } - return EGL_TRUE; -} - - /** * Set a screen's current display mode. * Note: mode = EGL_NO_MODE is valid (turns off the screen) diff --git a/src/egl/main/eglscreen.h b/src/egl/main/eglscreen.h index 3db20478ad..e564793e51 100644 --- a/src/egl/main/eglscreen.h +++ b/src/egl/main/eglscreen.h @@ -48,14 +48,6 @@ extern EGLBoolean _eglGetScreensMESA(_EGLDriver *drv, _EGLDisplay *dpy, EGLScreenMESA *screens, EGLint max_screens, EGLint *num_screens); -extern _EGLSurface * -_eglCreateScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, const EGLint *attrib_list); - - -extern EGLBoolean -_eglShowScreenSurfaceMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, _EGLSurface *surf, _EGLMode *m); - - extern EGLBoolean _eglScreenModeMESA(_EGLDriver *drv, _EGLDisplay *dpy, _EGLScreen *scrn, _EGLMode *m); diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c index ec51dd6ba2..74f10230ea 100644 --- a/src/egl/main/eglsurface.c +++ b/src/egl/main/eglsurface.c @@ -303,24 +303,6 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type, } -EGLBoolean -_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) -{ - /* Drivers have to do the actual buffer swap. */ - return EGL_TRUE; -} - - -EGLBoolean -_eglCopyBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, - EGLNativePixmapType target) -{ - /* copy surface to native pixmap */ - /* All implementation burdon for this is in the device driver */ - return EGL_FALSE; -} - - EGLBoolean _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, EGLint attribute, EGLint *value) @@ -388,51 +370,6 @@ _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, } -/** - * Drivers should do a proper implementation. - */ -_EGLSurface * -_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, - EGLNativeWindowType window, const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Drivers should do a proper implementation. - */ -_EGLSurface * -_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, - EGLNativePixmapType pixmap, const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Drivers should do a proper implementation. - */ -_EGLSurface * -_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, - const EGLint *attrib_list) -{ - return NULL; -} - - -/** - * Default fallback routine - drivers should usually override this. - */ -EGLBoolean -_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf) -{ - if (!_eglIsSurfaceBound(surf)) - free(surf); - return EGL_TRUE; -} - - /** * Default fallback routine - drivers might override this. */ @@ -536,40 +473,6 @@ _eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, } -EGLBoolean -_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surface, - EGLint buffer) -{ - /* Just do basic error checking and return success/fail. - * Drivers must implement the real stuff. - */ - - if (surface->Type != EGL_PBUFFER_BIT) { - _eglError(EGL_BAD_SURFACE, "eglBindTexImage"); - return EGL_FALSE; - } - - if (surface->TextureFormat == EGL_NO_TEXTURE) { - _eglError(EGL_BAD_MATCH, "eglBindTexImage"); - return EGL_FALSE; - } - - if (buffer != EGL_BACK_BUFFER) { - _eglError(EGL_BAD_PARAMETER, "eglReleaseTexImage"); - return EGL_FALSE; - } - - if (!surface->BoundToTexture) { - _eglError(EGL_BAD_SURFACE, "eglReleaseTexImage"); - return EGL_FALSE; - } - - surface->BoundToTexture = EGL_FALSE; - - return EGL_TRUE; -} - - EGLBoolean _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval) @@ -577,24 +480,3 @@ _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, _eglClampSwapInterval(surf, interval); return EGL_TRUE; } - - -#ifdef EGL_VERSION_1_2 - -/** - * Example function - drivers should do a proper implementation. - */ -_EGLSurface * -_eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy, - EGLenum buftype, EGLClientBuffer buffer, - _EGLConfig *conf, const EGLint *attrib_list) -{ - if (buftype != EGL_OPENVG_IMAGE) { - _eglError(EGL_BAD_PARAMETER, "eglCreatePbufferFromClientBuffer"); - return NULL; - } - - return NULL; -} - -#endif /* EGL_VERSION_1_2 */ diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index 8f520dcdf6..729499e80a 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -51,34 +51,10 @@ _eglInitSurface(_EGLSurface *surf, _EGLDisplay *dpy, EGLint type, _EGLConfig *config, const EGLint *attrib_list); -extern EGLBoolean -_eglSwapBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf); - - -extern EGLBoolean -_eglCopyBuffers(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLNativePixmapType target); - - extern EGLBoolean _eglQuerySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint attribute, EGLint *value); -extern _EGLSurface * -_eglCreateWindowSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, EGLNativeWindowType window, const EGLint *attrib_list); - - -extern _EGLSurface * -_eglCreatePixmapSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, EGLNativePixmapType pixmap, const EGLint *attrib_list); - - -extern _EGLSurface * -_eglCreatePbufferSurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLConfig *conf, const EGLint *attrib_list); - - -extern EGLBoolean -_eglDestroySurface(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf); - - extern EGLBoolean _eglSurfaceAttrib(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint attribute, EGLint value); @@ -87,24 +63,10 @@ PUBLIC extern EGLBoolean _eglBindTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint buffer); -extern EGLBoolean -_eglReleaseTexImage(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint buffer); - - extern EGLBoolean _eglSwapInterval(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *surf, EGLint interval); -#ifdef EGL_VERSION_1_2 - -extern _EGLSurface * -_eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy, - EGLenum buftype, EGLClientBuffer buffer, - _EGLConfig *conf, const EGLint *attrib_list); - -#endif /* EGL_VERSION_1_2 */ - - /** * Return true if there is a context bound to the surface. * diff --git a/src/egl/main/eglsync.c b/src/egl/main/eglsync.c index b6c62d0087..b9cd99a332 100644 --- a/src/egl/main/eglsync.c +++ b/src/egl/main/eglsync.c @@ -66,37 +66,6 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type, } -_EGLSync * -_eglCreateSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, - EGLenum type, const EGLint *attrib_list) -{ - return NULL; -} - - -EGLBoolean -_eglDestroySyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync) -{ - return EGL_TRUE; -} - - -EGLint -_eglClientWaitSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - EGLint flags, EGLTimeKHR timeout) -{ - return EGL_FALSE; -} - - -EGLBoolean -_eglSignalSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - EGLenum mode) -{ - return EGL_FALSE; -} - - EGLBoolean _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint attribute, EGLint *value) diff --git a/src/egl/main/eglsync.h b/src/egl/main/eglsync.h index 25c467175e..052d016681 100644 --- a/src/egl/main/eglsync.h +++ b/src/egl/main/eglsync.h @@ -28,25 +28,6 @@ _eglInitSync(_EGLSync *sync, _EGLDisplay *dpy, EGLenum type, const EGLint *attrib_list); -extern _EGLSync * -_eglCreateSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, - EGLenum type, const EGLint *attrib_list); - - -extern EGLBoolean -_eglDestroySyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync); - - -extern EGLint -_eglClientWaitSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - EGLint flags, EGLTimeKHR timeout); - - -extern EGLBoolean -_eglSignalSyncKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, - EGLenum mode); - - extern EGLBoolean _eglGetSyncAttribKHR(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSync *sync, EGLint attribute, EGLint *value); -- cgit v1.2.3