summaryrefslogtreecommitdiffstats
path: root/opengl
diff options
context:
space:
mode:
authorMathias Agopian <mathias@google.com>2009-06-25 00:01:11 -0700
committerMathias Agopian <mathias@google.com>2009-06-25 00:01:11 -0700
commitaf74213546acc887b2b9e93459124cefd7f5e335 (patch)
tree2c66b8547b0c2e59a384326145e9da3367de8862 /opengl
parent5911aa9510caad7c5d1dea849f9d2c8321fa9d7b (diff)
downloadframeworks_native-af74213546acc887b2b9e93459124cefd7f5e335.zip
frameworks_native-af74213546acc887b2b9e93459124cefd7f5e335.tar.gz
frameworks_native-af74213546acc887b2b9e93459124cefd7f5e335.tar.bz2
fix [1942438] eglGetCurrentSurface() returns bogus value
Diffstat (limited to 'opengl')
-rw-r--r--opengl/libs/EGL/egl.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/opengl/libs/EGL/egl.cpp b/opengl/libs/EGL/egl.cpp
index 77648f2..fec4e5d 100644
--- a/opengl/libs/EGL/egl.cpp
+++ b/opengl/libs/EGL/egl.cpp
@@ -965,23 +965,25 @@ EGLBoolean eglMakeCurrent( EGLDisplay dpy, EGLSurface draw,
if (!validate_display_context(dpy, ctx))
return EGL_FALSE;
+ EGLSurface impl_draw = EGL_NO_SURFACE;
+ EGLSurface impl_read = EGL_NO_SURFACE;
egl_context_t * const c = get_context(ctx);
if (draw != EGL_NO_SURFACE) {
egl_surface_t const * d = get_surface(draw);
if (!d) return setError(EGL_BAD_SURFACE, EGL_FALSE);
if (d->impl != c->impl)
return setError(EGL_BAD_MATCH, EGL_FALSE);
- draw = d->surface;
+ impl_draw = d->surface;
}
if (read != EGL_NO_SURFACE) {
egl_surface_t const * r = get_surface(read);
if (!r) return setError(EGL_BAD_SURFACE, EGL_FALSE);
if (r->impl != c->impl)
return setError(EGL_BAD_MATCH, EGL_FALSE);
- read = r->surface;
+ impl_read = r->surface;
}
EGLBoolean result = c->cnx->hooks->egl.eglMakeCurrent(
- dp->dpys[c->impl], draw, read, c->context);
+ dp->dpys[c->impl], impl_draw, impl_read, c->context);
if (result == EGL_TRUE) {
setGlThreadSpecific(c->cnx->hooks);