From a1717970e78d897f527273278bf1346cc86a5741 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Tue, 26 Jan 2010 17:13:51 +0800 Subject: egl: Remove _eglGetCurrentSurface and _eglGetCurrentDisplay. They have little use in drivers since drivers need to work for multiple current contexts. --- src/egl/main/eglapi.c | 4 ++-- src/egl/main/eglcurrent.c | 37 ------------------------------------- src/egl/main/eglcurrent.h | 8 -------- 3 files changed, 2 insertions(+), 47 deletions(-) (limited to 'src/egl/main') diff --git a/src/egl/main/eglapi.c b/src/egl/main/eglapi.c index 2e5027a32e..492a14180a 100644 --- a/src/egl/main/eglapi.c +++ b/src/egl/main/eglapi.c @@ -629,8 +629,8 @@ eglWaitNative(EGLint engine) EGLDisplay EGLAPIENTRY eglGetCurrentDisplay(void) { - _EGLDisplay *dpy = _eglGetCurrentDisplay(); - return _eglGetDisplayHandle(dpy); + _EGLContext *ctx = _eglGetCurrentContext(); + return (ctx) ? _eglGetDisplayHandle(ctx->Resource.Display) : EGL_NO_DISPLAY; } diff --git a/src/egl/main/eglcurrent.c b/src/egl/main/eglcurrent.c index b3be2305fd..696d04e8ba 100644 --- a/src/egl/main/eglcurrent.c +++ b/src/egl/main/eglcurrent.c @@ -248,43 +248,6 @@ _eglGetCurrentContext(void) } -/** - * Return the display of the currently bound context, or NULL. - */ -_EGLDisplay * -_eglGetCurrentDisplay(void) -{ - _EGLThreadInfo *t = _eglGetCurrentThread(); - _EGLContext *ctx = t->CurrentContexts[t->CurrentAPIIndex]; - if (ctx) - return ctx->Resource.Display; - else - return NULL; -} - - -/** - * Return the read or write surface of the currently bound context, or NULL. - */ -_EGLSurface * -_eglGetCurrentSurface(EGLint readdraw) -{ - _EGLThreadInfo *t = _eglGetCurrentThread(); - _EGLContext *ctx = t->CurrentContexts[t->CurrentAPIIndex]; - if (ctx) { - switch (readdraw) { - case EGL_DRAW: - return ctx->DrawSurface; - case EGL_READ: - return ctx->ReadSurface; - default: - return NULL; - } - } - return NULL; -} - - /** * Record EGL error code. */ diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h index b8c2bda485..c169c93e94 100644 --- a/src/egl/main/eglcurrent.h +++ b/src/egl/main/eglcurrent.h @@ -80,14 +80,6 @@ PUBLIC _EGLContext * _eglGetCurrentContext(void); -PUBLIC _EGLDisplay * -_eglGetCurrentDisplay(void); - - -PUBLIC _EGLSurface * -_eglGetCurrentSurface(EGLint readdraw); - - PUBLIC EGLBoolean _eglError(EGLint errCode, const char *msg); -- cgit v1.2.3