summaryrefslogtreecommitdiff
path: root/src/egl/main/eglsurface.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2009-07-17 11:48:27 -0600
committerBrian Paul <brianp@vmware.com>2009-07-17 11:48:27 -0600
commit18457cb263e3e062e12314e7b3d5c81a7f2ba048 (patch)
tree179cde7595a4925111e78515be68005566aae66d /src/egl/main/eglsurface.c
parent21b635ffa8b59049a95d50d4c7b7a8ff6413b730 (diff)
egl: Add funtions to link contexts and surfaces to displays.
EGL contexts and surfaces are resources of displays. They should be managed by displays. This commit adds a bunch of functions to egldisplay.c to help establish the links between contexts/surfaces and displays. How links are established is considered opaque outside display. Functions like _eglGetSurfaceHandle or _eglLookupSurface are therefore moved to egldisplay.c, with some small modifications. The idea is also extended to display. That is, displays need to link to themselves to be looked up. This commit only adds the functions. A commit to use them should follow. Signed-off-by: Chia-I Wu <olvaffe@gmail.com>
Diffstat (limited to 'src/egl/main/eglsurface.c')
-rw-r--r--src/egl/main/eglsurface.c29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/egl/main/eglsurface.c b/src/egl/main/eglsurface.c
index 964288aac8..854f499fce 100644
--- a/src/egl/main/eglsurface.c
+++ b/src/egl/main/eglsurface.c
@@ -6,6 +6,7 @@
#include <assert.h>
#include <stdlib.h>
#include <string.h>
+#include "egldisplay.h"
#include "eglcontext.h"
#include "eglconfig.h"
#include "egldriver.h"
@@ -231,34 +232,6 @@ _eglRemoveSurface(_EGLSurface *surf)
-/**
- * Return the public handle for an internal _EGLSurface.
- * This is the inverse of _eglLookupSurface().
- */
-EGLSurface
-_eglGetSurfaceHandle(_EGLSurface *surface)
-{
- if (surface)
- return surface->Handle;
- else
- return EGL_NO_SURFACE;
-}
-
-
-/**
- * Return the private _EGLSurface which corresponds to a public EGLSurface
- * handle.
- * This is the inverse of _eglGetSurfaceHandle().
- */
-_EGLSurface *
-_eglLookupSurface(EGLSurface surf)
-{
- _EGLSurface *c = (_EGLSurface *) _eglHashLookup(_eglGlobal.Surfaces,
- (EGLuint) surf);
- return c;
-}
-
-
EGLBoolean
_eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw)
{