diff options
author | Romain Guy <romainguy@google.com> | 2011-03-07 18:05:04 -0800 |
---|---|---|
committer | Romain Guy <romainguy@google.com> | 2011-03-07 18:05:04 -0800 |
commit | 9b7146db6d9c0586b98b062fbcdb3fac6cc54d19 (patch) | |
tree | bb07142137a690e7fe705608da0d779ea942809e /core | |
parent | 0aaa11ed5be45170fb2535a6ce021c92b18d8878 (diff) | |
download | frameworks_base-9b7146db6d9c0586b98b062fbcdb3fac6cc54d19.zip frameworks_base-9b7146db6d9c0586b98b062fbcdb3fac6cc54d19.tar.gz frameworks_base-9b7146db6d9c0586b98b062fbcdb3fac6cc54d19.tar.bz2 |
Fix EGL JNI bugs
Bug #3461349
Before this change, eglGetCurrent*() could not be used to compare
contexts, displays and surfaces at the Dalvik level.
Change-Id: I442037dae37bc357b64810ab10c779b5754e9153
Diffstat (limited to 'core')
-rw-r--r-- | core/jni/com_google_android_gles_jni_EGLImpl.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/core/jni/com_google_android_gles_jni_EGLImpl.cpp b/core/jni/com_google_android_gles_jni_EGLImpl.cpp index e7ea8c8..3d24bee 100644 --- a/core/jni/com_google_android_gles_jni_EGLImpl.cpp +++ b/core/jni/com_google_android_gles_jni_EGLImpl.cpp @@ -400,7 +400,7 @@ static jint jni_eglGetCurrentDisplay(JNIEnv *_env, jobject _this) { } static jint jni_eglGetCurrentSurface(JNIEnv *_env, jobject _this, jint readdraw) { - if (!(readdraw == EGL_READ) || (readdraw == EGL_DRAW)) { + if ((readdraw != EGL_READ) && (readdraw != EGL_DRAW)) { doThrow(_env, "java/lang/IllegalArgumentException"); return 0; } |