egl: Move fallback routines to eglfallbacks.c.
authorChia-I Wu <olv@lunarg.com>
Fri, 22 Oct 2010 10:11:04 +0000 (18:11 +0800)
committerChia-I Wu <olv@lunarg.com>
Fri, 22 Oct 2010 10:38:30 +0000 (18:38 +0800)
We do not want them to be all over the places.

17 files changed:
src/egl/main/Makefile
src/egl/main/SConscript
src/egl/main/eglcontext.c
src/egl/main/eglcontext.h
src/egl/main/egldriver.c
src/egl/main/egldriver.h
src/egl/main/eglfallbacks.c [new file with mode: 0644]
src/egl/main/eglimage.c
src/egl/main/eglimage.h
src/egl/main/eglmisc.c
src/egl/main/eglmisc.h
src/egl/main/eglscreen.c
src/egl/main/eglscreen.h
src/egl/main/eglsurface.c
src/egl/main/eglsurface.h
src/egl/main/eglsync.c
src/egl/main/eglsync.h

index 19085a31f188d507a1d36b29f58a37456877fedd..b4ca20c094a502cf73a64ddcbba3117c70292534 100644 (file)
@@ -36,6 +36,7 @@ SOURCES = \
        eglcurrent.c \
        egldisplay.c \
        egldriver.c \
+       eglfallbacks.c \
        eglglobals.c \
        eglimage.c \
        egllog.c \
index 45d40e265021c88821b9444ea02a4ba6eaa146a5..8ade85b35722dfc2e8f906d1a53b5937d9acd8f9 100644 (file)
@@ -28,6 +28,7 @@ if env['platform'] != 'winddk':
                'eglcurrent.c',
                'egldisplay.c',
                'egldriver.c',
+               'eglfallbacks.c',
                'eglglobals.c',
                'eglimage.c',
                'egllog.c',
index ec35be9d3a862fb86041a22b641981fec5aea543..113e4e48fb35b3c237b05d108c6663abfd778b34 100644 (file)
@@ -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;
-}
index cfe92dd9f5c4c37234169810c1a5c02c93113f4f..148f160cae0603238d163bf731bbeacb2f14e773 100644 (file)
@@ -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.
  *
index a4ff6911be6095b4dd40fc0962931f3234ae8172..2359253ff137a0350fead125cba3a76370fa25af 100644 (file)
@@ -9,18 +9,10 @@
 #include <stdlib.h>
 
 #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.
  *
index c618feb6b02d91cbea3a200815969243e4197792..1ca7c6cd9368e2a12129d570f907020e894f0228 100644 (file)
@@ -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 (file)
index 0000000..7c93adb
--- /dev/null
@@ -0,0 +1,99 @@
+#include <string.h>
+#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
+}
index 8244ef3b5184673abdebf08e98d10d9bff7ecf39..af4a29fb0e2463c74a6bcc0688030984ba353550 100644 (file)
@@ -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 */
index e457bf4ef69618fa2ded6b630a70b610a9e0425e..7cd92c112540b62d14d990210dcbdde5787432ee 100644 (file)
@@ -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.
index eb3dde1fb485ad355809db98e83093eaec31b3e9..bbb96a908e490cd88e9a36bb772c7ddb5e42c055 100644 (file)
@@ -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;
-}
index 5e6a2d41df6bafbe3d85901538fc6c8312827147..a753307a14b79b4a311f1d81ad4bc207e3842291 100644 (file)
@@ -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 */
index 9e39335cc7a2c1a0eaa5ebed815e31c7dffb6cfb..2ae403494e2a60c13052ba700a6b54debcf4ca72 100644 (file)
@@ -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)
index 3db20478ad63c85cf7018badd095587aa5a9b76a..e564793e511273fa89403f8a418184218ca139ad 100644 (file)
@@ -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);
 
index ec51dd6ba224ffd57ac2a3ca45b1bd3b8b956ff9..74f10230eaada4f9c35965cf860818f275d1146e 100644 (file)
@@ -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 */
index 8f520dcdf650f606d0cdf54d0879be2772df0159..729499e80a31da1bdb27cdc415749a3fc44ad495 100644 (file)
@@ -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.
  *
index b6c62d0087dac2001f45deea5b8851d85545bdaf..b9cd99a332cece80a46bd8581dd85a7599b7204a 100644 (file)
@@ -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)
index 25c467175e97bcd7020ec1b609648f6e78bb2e8c..052d0166813b449088787eb9d72c7d21f037ea7d 100644 (file)
@@ -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);