diff options
Diffstat (limited to 'src/egl/main')
-rw-r--r-- | src/egl/main/eglcontext.c | 23 | ||||
-rw-r--r-- | src/egl/main/eglcontext.h | 2 |
2 files changed, 3 insertions, 22 deletions
diff --git a/src/egl/main/eglcontext.c b/src/egl/main/eglcontext.c index 60d2efd44b9..4496f76eceb 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; } diff --git a/src/egl/main/eglcontext.h b/src/egl/main/eglcontext.h index 84d8deed51c..4811e3bb7ad 100644 --- a/src/egl/main/eglcontext.h +++ b/src/egl/main/eglcontext.h @@ -51,7 +51,7 @@ PUBLIC EGLBoolean _eglBindContext(_EGLContext **ctx, _EGLSurface **draw, _EGLSurface **read); -PUBLIC EGLBoolean +extern EGLBoolean _eglMakeCurrent(_EGLDriver *drv, _EGLDisplay *dpy, _EGLSurface *draw, _EGLSurface *read, _EGLContext *ctx); |