summaryrefslogtreecommitdiffstats
path: root/src/egl/main/eglcontext.c
diff options
context:
space:
mode:
authorChia-I Wu <[email protected]>2010-01-24 20:32:34 +0800
committerChia-I Wu <[email protected]>2010-01-24 20:38:16 +0800
commitecb3b3102a3022e31cf9d75ae099eddbe298517f (patch)
tree70d5476f2d46c8444b74625bedcd588e2e765ae6 /src/egl/main/eglcontext.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/eglcontext.c')
-rw-r--r--src/egl/main/eglcontext.c69
1 files changed, 0 insertions, 69 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c
index 41960f54262..ee4b1b59f5b 100644
--- a/src/egl/main/eglcontext.c
+++ b/src/egl/main/eglcontext.c
@@ -251,72 +251,3 @@ _eglCopyContextMESA(_EGLDriver *drv, EGLDisplay dpy, EGLContext source,
*/
return EGL_FALSE;
}
-
-
-/**
- * Link a context to a display and return the handle of the link.
- * The handle can be passed to client directly.
- */
-EGLContext
-_eglLinkContext(_EGLContext *ctx, _EGLDisplay *dpy)
-{
- ctx->Display = dpy;
- ctx->Next = dpy->ContextList;
- dpy->ContextList = ctx;
- return (EGLContext) ctx;
-}
-
-
-/**
- * Unlink a linked context from its display.
- * Accessing an unlinked context should generate EGL_BAD_CONTEXT error.
- */
-void
-_eglUnlinkContext(_EGLContext *ctx)
-{
- _EGLContext *prev;
-
- prev = ctx->Display->ContextList;
- if (prev != ctx) {
- while (prev) {
- if (prev->Next == ctx)
- break;
- prev = prev->Next;
- }
- assert(prev);
- prev->Next = ctx->Next;
- }
- else {
- ctx->Display->ContextList = ctx->Next;
- }
-
- ctx->Next = NULL;
- ctx->Display = NULL;
-}
-
-
-#ifndef _EGL_SKIP_HANDLE_CHECK
-
-
-/**
- * Return EGL_TRUE if the given handle is a valid handle to a context.
- */
-EGLBoolean
-_eglCheckContextHandle(EGLContext ctx, _EGLDisplay *dpy)
-{
- _EGLContext *cur = NULL;
-
- if (dpy)
- cur = dpy->ContextList;
- while (cur) {
- if (cur == (_EGLContext *) ctx) {
- assert(cur->Display == dpy);
- break;
- }
- cur = cur->Next;
- }
- return (cur != NULL);
-}
-
-
-#endif /* !_EGL_SKIP_HANDLE_CHECK */