summaryrefslogtreecommitdiff
path: root/opengl/libagl/egl.cpp
diff options
context:
space:
mode:
author Colin Cross <ccross@android.com> 2014-01-25 00:38:15 +0000
committer Gerrit Code Review <noreply-gerritcodereview@google.com> 2014-01-25 00:38:16 +0000
commitaf29b77ab7dab5a1b5af27e7f7eeeb14584c101c (patch)
tree1f2766b57b911c22e08c19dd25ba79a6e85501d2 /opengl/libagl/egl.cpp
parentb6c2100458bd4dda880ec24dc7d1f39825d5243d (diff)
parent444839b842798497cfa326204285a4f2ca2362af (diff)
Merge "libGLES_android: fix 64-bit compile errors"
Diffstat (limited to 'opengl/libagl/egl.cpp')
-rw-r--r--opengl/libagl/egl.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/opengl/libagl/egl.cpp b/opengl/libagl/egl.cpp
index bbbda766b5..f925e7dc4e 100644
--- a/opengl/libagl/egl.cpp
+++ b/opengl/libagl/egl.cpp
@@ -78,20 +78,20 @@ static T setError(GLint error, T returnValue) {
pthread_key_create(&gEGLErrorKey, NULL);
pthread_mutex_unlock(&gErrorKeyMutex);
}
- pthread_setspecific(gEGLErrorKey, (void*)error);
+ pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)error);
return returnValue;
}
static GLint getError() {
if (ggl_unlikely(gEGLErrorKey == -1))
return EGL_SUCCESS;
- GLint error = (GLint)pthread_getspecific(gEGLErrorKey);
+ GLint error = (GLint)(uintptr_t)pthread_getspecific(gEGLErrorKey);
if (error == 0) {
// The TLS key has been created by another thread, but the value for
// this thread has not been initialized.
return EGL_SUCCESS;
}
- pthread_setspecific(gEGLErrorKey, (void*)EGL_SUCCESS);
+ pthread_setspecific(gEGLErrorKey, (void*)(uintptr_t)EGL_SUCCESS);
return error;
}
@@ -1201,7 +1201,7 @@ static EGLBoolean getConfigAttrib(EGLDisplay dpy, EGLConfig config,
EGLint attribute, EGLint *value)
{
size_t numConfigs = NELEM(gConfigs);
- int index = (int)config;
+ int index = (int)(uintptr_t)config;
if (uint32_t(index) >= numConfigs)
return setError(EGL_BAD_CONFIG, EGL_FALSE);
@@ -1448,7 +1448,7 @@ EGLBoolean eglGetConfigs( EGLDisplay dpy,
}
GLint i;
for (i=0 ; i<numConfigs && i<config_size ; i++) {
- *configs++ = (EGLConfig)i;
+ *configs++ = (EGLConfig)(uintptr_t)i;
}
*num_config = i;
return EGL_TRUE;
@@ -1519,7 +1519,7 @@ EGLBoolean eglChooseConfig( EGLDisplay dpy, const EGLint *attrib_list,
if (configs) {
for (int i=0 ; config_size && i<numConfigs ; i++) {
if (possibleMatch & (1<<i)) {
- *configs++ = (EGLConfig)i;
+ *configs++ = (EGLConfig)(uintptr_t)i;
config_size--;
n++;
}