diff options
Diffstat (limited to 'src/egl/main/eglcurrent.h')
-rw-r--r-- | src/egl/main/eglcurrent.h | 41 |
1 files changed, 4 insertions, 37 deletions
diff --git a/src/egl/main/eglcurrent.h b/src/egl/main/eglcurrent.h index 3f8a0b28e38..b922435e31f 100644 --- a/src/egl/main/eglcurrent.h +++ b/src/egl/main/eglcurrent.h @@ -46,20 +46,14 @@ extern "C" { EGL_OPENGL_BIT) -#define _EGL_API_FIRST_API EGL_OPENGL_ES_API -#define _EGL_API_LAST_API EGL_OPENGL_API -#define _EGL_API_NUM_APIS (_EGL_API_LAST_API - _EGL_API_FIRST_API + 1) - - /** * Per-thread info */ struct _egl_thread_info { EGLint LastError; - _EGLContext *CurrentContexts[_EGL_API_NUM_APIS]; - /* use index for fast access to current context */ - EGLint CurrentAPIIndex; + _EGLContext *CurrentContext; + EGLenum CurrentAPI; }; @@ -71,36 +65,13 @@ _eglIsApiValid(EGLenum api) { #ifdef ANDROID /* OpenGL is not a valid/supported API on Android */ - return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API && - api != EGL_OPENGL_API; + return api == EGL_OPENGL_ES_API; #else - return api >= _EGL_API_FIRST_API && api <= _EGL_API_LAST_API; + return (api == EGL_OPENGL_ES_API || api == EGL_OPENGL_API); #endif } -/** - * Convert a client API enum to an index, for use by thread info. - * The client API enum is assumed to be valid. - */ -static inline EGLint -_eglConvertApiToIndex(EGLenum api) -{ - return api - _EGL_API_FIRST_API; -} - - -/** - * Convert an index, used by thread info, to a client API enum. - * The index is assumed to be valid. - */ -static inline EGLenum -_eglConvertApiFromIndex(EGLint idx) -{ - return _EGL_API_FIRST_API + idx; -} - - extern _EGLThreadInfo * _eglGetCurrentThread(void); @@ -114,10 +85,6 @@ _eglIsCurrentThreadDummy(void); extern _EGLContext * -_eglGetAPIContext(EGLenum api); - - -extern _EGLContext * _eglGetCurrentContext(void); |