summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcontext.h
diff options
context:
space:
mode:
authorChia-I Wu <olv@lunarg.com>2010-10-23 12:52:26 +0800
committerChia-I Wu <olv@lunarg.com>2010-10-23 15:26:28 +0800
commitd19afc57fe49816f3f3290410e0124d326577be2 (patch)
tree8d90c500c91f8c2e703a05259c85406d4261c3ed /src/egl/main/eglcontext.h
parentdc4f845c37a8446de19036e24fd397a0aa864c02 (diff)
egl: Use reference counting to replace IsLinked or IsBound.
Remove all _egl<Res>IsLinked and _egl<Res>IsBound. Update _eglBindContext and drivers to do reference counting.
Diffstat (limited to 'src/egl/main/eglcontext.h')
-rw-r--r--src/egl/main/eglcontext.h31
1 files changed, 3 insertions, 28 deletions
diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h
index 9c1e2184c6..8cd0df1731 100644
--- a/src/egl/main/eglcontext.h
+++ b/src/egl/main/eglcontext.h
@@ -39,7 +39,9 @@ _eglQueryContext(_EGLDriver *drv, _EGLDisplay *dpy, _EGLContext *ctx, EGLint att
PUBLIC EGLBoolean
-_eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read);
+_eglBindContext(_EGLContext *ctx, _EGLSurface *draw, _EGLSurface *read,
+ _EGLContext **old_ctx,
+ _EGLSurface **old_draw, _EGLSurface **old_read);
/**
@@ -65,19 +67,6 @@ _eglPutContext(_EGLContext *ctx)
/**
- * Return true if the context is bound to a thread.
- *
- * The binding is considered a reference to the context. Drivers should not
- * destroy a context when it is bound.
- */
-static INLINE EGLBoolean
-_eglIsContextBound(_EGLContext *ctx)
-{
- return (ctx->Binding != NULL);
-}
-
-
-/**
* Link a context to its display and return the handle of the link.
* The handle can be passed to client directly.
*/
@@ -126,18 +115,4 @@ _eglGetContextHandle(_EGLContext *ctx)
}
-/**
- * Return true if the context is linked to a display.
- *
- * The link is considered a reference to the context (the display is owning the
- * context). Drivers should not destroy a context when it is linked.
- */
-static INLINE EGLBoolean
-_eglIsContextLinked(_EGLContext *ctx)
-{
- _EGLResource *res = (_EGLResource *) ctx;
- return (res && _eglIsResourceLinked(res));
-}
-
-
#endif /* EGLCONTEXT_INCLUDED */