summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2010-09-23 18:17:08 -0700
committerAndroid Git Automerger <android-git-automerger@android.com>2010-09-23 18:17:08 -0700
commit4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e (patch)
tree37aa85af453e7523872ffe80d81bf7505064f4e4 /opengl
parent56d6090380027efc7910537a2c2b99097ca36778 (diff)
parent524a6d8e9bb4df9cec0520ac1d9733642b13e76f (diff)
downloadframeworks_base-4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e.zip
frameworks_base-4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e.tar.gz
frameworks_base-4eb1ad5e98c7b36f7ac4ec8c3270f9763afd107e.tar.bz2
am 524a6d8e: Merge "better fix for [3028370] GL get error should return a valid error if no context is bound." into gingerbread
Merge commit '524a6d8e9bb4df9cec0520ac1d9733642b13e76f' into gingerbread-plus-aosp * commit '524a6d8e9bb4df9cec0520ac1d9733642b13e76f': better fix for [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.cpp11
-rw-r--r--opengl/libs/GLES2/gl2.cpp1
-rw-r--r--opengl/libs/GLES_CM/gl.cpp1
3 files changed, 4 insertions, 9 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 0437263..2d1a278 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -428,19 +428,14 @@ static void(*findProcAddress(const char* name,
// ----------------------------------------------------------------------------
-static void gl_no_context() {
+static int gl_no_context() {
tls_t* tls = getTLS();
if (tls->logCallWithNoContext == EGL_TRUE) {
tls->logCallWithNoContext = EGL_FALSE;
LOGE("call to OpenGL ES API with no current context "
"(logged once per thread)");
}
-}
-
-// 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;
+ return 0;
}
static void early_egl_init(void)
@@ -454,8 +449,6 @@ static void early_egl_init(void)
addr,
sizeof(gHooksNoContext));
- gHooksNoContext.gl.glGetError = gl_no_context_glGetError;
-
setGlThreadSpecific(&gHooksNoContext);
}
diff --git a/opengl/libs/GLES2/gl2.cpp b/opengl/libs/GLES2/gl2.cpp
index 924737e..18dd483 100644
--- a/opengl/libs/GLES2/gl2.cpp
+++ b/opengl/libs/GLES2/gl2.cpp
@@ -58,6 +58,7 @@ using namespace android;
"ldr r12, [r12, %[tls]] \n" \
"cmp r12, #0 \n" \
"ldrne pc, [r12, %[api]] \n" \
+ "mov r0, #0 \n" \
"bx lr \n" \
: \
: [tls] "J"(TLS_SLOT_OPENGL_API*4), \
diff --git a/opengl/libs/GLES_CM/gl.cpp b/opengl/libs/GLES_CM/gl.cpp
index d71ff76..ee29f12 100644
--- a/opengl/libs/GLES_CM/gl.cpp
+++ b/opengl/libs/GLES_CM/gl.cpp
@@ -114,6 +114,7 @@ GL_API void GL_APIENTRY glWeightPointerOESBounds(GLint size, GLenum type,
"ldr r12, [r12, %[tls]] \n" \
"cmp r12, #0 \n" \
"ldrne pc, [r12, %[api]] \n" \
+ "mov r0, #0 \n" \
"bx lr \n" \
: \
: [tls] "J"(TLS_SLOT_OPENGL_API*4), \