summaryrefslogtreecommitdiff
path: root/src/egl/main/eglsurface.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-24 20:32:34 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-24 20:38:16 +0800
commitecb3b3102a3022e31cf9d75ae099eddbe298517f (patch)
tree70d5476f2d46c8444b74625bedcd588e2e765ae6 /src/egl/main/eglsurface.c
parent7abf42626fe8552cf898652134f3767e591614ab (diff)
egl: Make surfaces and contexts resources.
Turn _EGLSurface and _EGLContext into _EGLResource so that they can be managed uniformly.
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r--src/egl/main/eglsurface.c70
1 files changed, 0 insertions, 70 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index 5e9a3417a6..940a1b760c 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -511,73 +511,3 @@ _eglCreatePbufferFromClientBuffer(_EGLDriver *drv, _EGLDisplay *dpy,
}
#endif /* EGL_VERSION_1_2 */
-
-
-/**
- * Link a surface to a display and return the handle of the link.
- * The handle can be passed to client directly.
- */
-EGLSurface
-_eglLinkSurface(_EGLSurface *surf, _EGLDisplay *dpy)
-{
- surf->Display = dpy;
- surf->Next = dpy->SurfaceList;
- dpy->SurfaceList = surf;
- return (EGLSurface) surf;
-}
-
-
-/**
- * Unlink a linked surface from its display.
- * Accessing an unlinked surface should generate EGL_BAD_SURFACE error.
- */
-void
-_eglUnlinkSurface(_EGLSurface *surf)
-{
- _EGLSurface *prev;
-
- prev = surf->Display->SurfaceList;
- if (prev != surf) {
- while (prev) {
- if (prev->Next == surf)
- break;
- prev = prev->Next;
- }
- assert(prev);
- prev->Next = surf->Next;
- }
- else {
- prev = NULL;
- surf->Display->SurfaceList = surf->Next;
- }
-
- surf->Next = NULL;
- surf->Display = NULL;
-}
-
-
-#ifndef _EGL_SKIP_HANDLE_CHECK
-
-
-/**
- * Return EGL_TRUE if the given handle is a valid handle to a surface.
- */
-EGLBoolean
-_eglCheckSurfaceHandle(EGLSurface surf, _EGLDisplay *dpy)
-{
- _EGLSurface *cur = NULL;
-
- if (dpy)
- cur = dpy->SurfaceList;
- while (cur) {
- if (cur == (_EGLSurface *) surf) {
- assert(cur->Display == dpy);
- break;
- }
- cur = cur->Next;
- }
- return (cur != NULL);
-}
-
-
-#endif /* !_EGL_SKIP_HANDLE_CHECK */