From 18457cb263e3e062e12314e7b3d5c81a7f2ba048 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Fri, 17 Jul 2009 11:48:27 -0600 Subject: 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 --- src/egl/main/eglsurface.h | 14 +++++--------- 1 file changed, 5 insertions(+), 9 deletions(-) (limited to 'src/egl/main/eglsurface.h') diff --git a/src/egl/main/eglsurface.h b/src/egl/main/eglsurface.h index 3b54221bd32..dc536690910 100644 --- a/src/egl/main/eglsurface.h +++ b/src/egl/main/eglsurface.h @@ -10,7 +10,11 @@ */ struct _egl_surface { - EGLSurface Handle; /* The public/opaque handle which names this object */ + /* Managed by EGLDisplay for linking */ + _EGLDisplay *Display; + _EGLSurface *Next; + EGLSurface Handle; + _EGLConfig *Config; /* May need reference counting here */ @@ -52,14 +56,6 @@ extern void _eglRemoveSurface(_EGLSurface *surf); -extern EGLSurface -_eglGetSurfaceHandle(_EGLSurface *surface); - - -extern _EGLSurface * -_eglLookupSurface(EGLSurface surf); - - extern EGLBoolean _eglSwapBuffers(_EGLDriver *drv, EGLDisplay dpy, EGLSurface draw); -- cgit v1.2.3