diff options
| author | Mathias Agopian <mathias@google.com> | 2010-09-23 13:24:11 -0700 |
|---|---|---|
| committer | Android Git Automerger <android-git-automerger@android.com> | 2010-09-23 13:24:11 -0700 |
| commit | 9c4d7d677097981a349c718902e29050dad3d59f (patch) | |
| tree | bbf813aa3cc58acfb30a69a457a80da220118657 /opengl | |
| parent | 1fd1129264ef4379633aa4fcd8a9ecaeeb9797f3 (diff) | |
| parent | 5c6c5c7a43d44316395f5c35ab713372124b8b4c (diff) | |
| download | frameworks_base-9c4d7d677097981a349c718902e29050dad3d59f.zip frameworks_base-9c4d7d677097981a349c718902e29050dad3d59f.tar.gz frameworks_base-9c4d7d677097981a349c718902e29050dad3d59f.tar.bz2 | |
am 5c6c5c7a: fix [3028370] GL get error should return a valid error if no context is bound.
Merge commit '5c6c5c7a43d44316395f5c35ab713372124b8b4c' into gingerbread-plus-aosp
* commit '5c6c5c7a43d44316395f5c35ab713372124b8b4c':
fix [3028370] GL get error should return a valid error if no context is bound.
Diffstat (limited to 'opengl')
| -rw-r--r-- | opengl/libs/EGL/egl.cpp | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp index 105ebb4..0437263 100644 --- a/opengl/libs/EGL/egl.cpp +++ b/opengl/libs/EGL/egl.cpp @@ -437,6 +437,12 @@ static void gl_no_context() { } } +// Always return GL_INVALID_OPERATION from glGetError() when called from +// a thread without a bound context. +static GLenum gl_no_context_glGetError() { + return GL_INVALID_OPERATION; +} + static void early_egl_init(void) { #if !USE_FAST_TLS_KEY @@ -447,6 +453,9 @@ static void early_egl_init(void) (uint32_t*)(void*)&gHooksNoContext, addr, sizeof(gHooksNoContext)); + + gHooksNoContext.gl.glGetError = gl_no_context_glGetError; + setGlThreadSpecific(&gHooksNoContext); } |
