summaryrefslogtreecommitdiff
path: root/src/egl/main/eglcontext.c
diff options
context:
space:
mode:
authorChia-I Wu <olvaffe@gmail.com>2010-01-28 16:57:49 +0800
committerChia-I Wu <olvaffe@gmail.com>2010-01-28 17:28:48 +0800
commit6baa2c8d022e5dd1e305e7da2925c1e6f9370f35 (patch)
treec354b4fb532e992c42563bec2b63b668bf453e85 /src/egl/main/eglcontext.c
parent45ba53324341234144ca02122bf2c0b5ef58c361 (diff)
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.
Diffstat (limited to 'src/egl/main/eglcontext.c')
-rw-r--r--src/egl/main/eglcontext.c23
1 files changed, 2 insertions, 21 deletions
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;
}