From: Chia-I Wu Date: Fri, 22 Oct 2010 10:11:04 +0000 (+0800) Subject: egl: Move fallback routines to eglfallbacks.c. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=25328509c90dc205b9561b5265e478af2873438b;p=mesa.git egl: Move fallback routines to eglfallbacks.c. We do not want them to be all over the places. --- diff --git a/src/egl/main/Makefile b/src/egl/main/Makefile index 19085a31f18..b4ca20c094a 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 45d40e26502..8ade85b3572 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 ec35be9d3a8..113e4e48fb3 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 cfe92dd9f5c..148f160cae0 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 a4ff6911be6..2359253ff13 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 c618feb6b02..1ca7c6cd936 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 00000000000..7c93adb76aa --- /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 8244ef3b518..af4a29fb0e2 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 e457bf4ef69..7cd92c11254 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 eb3dde1fb48..bbb96a908e4 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 5e6a2d41df6..a753307a14b 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 9e39335cc7a..2ae403494e2 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 3db20478ad6..e564793e511 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 ec51dd6ba22..74f10230eaa 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 8f520dcdf65..729499e80a3 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 b6c62d0087d..b9cd99a332c 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 25c467175e9..052d0166813 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);