From 6baa2c8d022e5dd1e305e7da2925c1e6f9370f35 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Thu, 28 Jan 2010 16:57:49 +0800 Subject: egl: Migrate drivers to use _eglBindContext. _eglMakeCurrent is a big hammer that is not easy to use. Migrate drivers to use _eglBindContext and un-export _eglMakeCurrent. --- src/egl/main/eglcontext.c | 23 ++--------------------- 1 file changed, 2 insertions(+), 21 deletions(-) (limited to 'src/egl/main/eglcontext.c') diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index 60d2efd44b..4496f76ece 100644 --- a/src/egl/main/eglcontext.c +++ b/src/egl/main/eglcontext.c @@ -310,32 +310,13 @@ _eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read) /** - * Drivers will typically call this to do the error checking and - * update the various flags. - * Then, the driver will do its device-dependent Make-Current stuff. + * Just a placeholder/demo function. Drivers should override this. */ EGLBoolean _eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx) { - if (!_eglBindContext(&ctx, &draw, &read)) - return EGL_FALSE; - - /* nothing we can do if the display is uninitialized */ - if (dpy->Initialized) { - /* avoid double destroy */ - if (read && read == draw) - read = NULL; - - if (ctx && !_eglIsContextLinked(ctx)) - drv->API.DestroyContext(drv, dpy, ctx); - if (draw && !_eglIsSurfaceLinked(draw)) - drv->API.DestroySurface(drv, dpy, draw); - if (read && !_eglIsSurfaceLinked(read)) - drv->API.DestroySurface(drv, dpy, read); - } - - return EGL_TRUE; + return EGL_FALSE; } -- cgit v1.2.3