Re-run glgen/gen
Corresponding change to glgen attempts to generate code closer to
manual edits in cpp files here.
Bug: 126352534
Bug: 124064285
Test: run frameworks/native/opengl/tools/glgen/gen, copy outputs, build.
Change-Id: I32a62dfc80ba87d689ff366b83650c9a3b6f872d
diff --git a/core/jni/android_opengl_EGL14.cpp b/core/jni/android_opengl_EGL14.cpp
index 13b0598..de5e3a5 100644
--- a/core/jni/android_opengl_EGL14.cpp
+++ b/core/jni/android_opengl_EGL14.cpp
@@ -237,7 +237,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -335,7 +335,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -455,7 +455,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -511,7 +511,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -806,7 +806,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -1161,7 +1161,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -1207,7 +1207,7 @@
(JNIEnv *_env, jobject _this, jobject dpy, jobject surface, jint target) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"eglCopyBuffers");
- return (EGLBoolean) 0;
+ return JNI_FALSE;
}
static const char *classPathName = "android/opengl/EGL14";
diff --git a/core/jni/android_opengl_EGL15.cpp b/core/jni/android_opengl_EGL15.cpp
index 563f5db..99bdce2 100644
--- a/core/jni/android_opengl_EGL15.cpp
+++ b/core/jni/android_opengl_EGL15.cpp
@@ -14,6 +14,8 @@
** limitations under the License.
*/
+// This source file is automatically generated
+
#pragma GCC diagnostic ignored "-Wunused-variable"
#pragma GCC diagnostic ignored "-Wunused-function"
@@ -90,7 +92,6 @@
egldisplayGetHandleID = _env->GetMethodID(egldisplayClass, "getNativeHandle", "()J");
eglsurfaceGetHandleID = _env->GetMethodID(eglsurfaceClass, "getNativeHandle", "()J");
-
eglconfigConstructor = _env->GetMethodID(eglconfigClass, "<init>", "(J)V");
eglcontextConstructor = _env->GetMethodID(eglcontextClass, "<init>", "(J)V");
egldisplayConstructor = _env->GetMethodID(egldisplayClass, "<init>", "(J)V");
@@ -103,7 +104,6 @@
jobject localeglNoSurfaceObject = _env->NewObject(eglsurfaceClass, eglsurfaceConstructor, reinterpret_cast<jlong>(EGL_NO_SURFACE));
eglNoSurfaceObject = _env->NewGlobalRef(localeglNoSurfaceObject);
-
jclass eglClass = _env->FindClass("android/opengl/EGL15");
jfieldID noContextFieldID = _env->GetStaticFieldID(eglClass, "EGL_NO_CONTEXT", "Landroid/opengl/EGLContext;");
_env->SetStaticObjectField(eglClass, noContextFieldID, eglNoContextObject);
@@ -187,7 +187,7 @@
static void *
fromEGLHandle(JNIEnv *_env, jmethodID mid, jobject obj) {
- if (obj == NULL){
+ if (obj == NULL) {
jniThrowException(_env, "java/lang/IllegalArgumentException",
"Object is set to null.");
return nullptr;
@@ -198,10 +198,9 @@
}
static jobject
-toEGLHandle(JNIEnv *_env, jclass cls, jmethodID con, void * handle) {
- if (cls == eglimageClass &&
- (EGLImage)handle == EGL_NO_IMAGE) {
- return eglNoImageObject;
+toEGLHandle(JNIEnv *_env, jclass cls, jmethodID con, void *handle) {
+ if (cls == eglimageClass && (EGLImage)handle == EGL_NO_IMAGE) {
+ return eglNoImageObject;
}
return _env->NewObject(cls, con, reinterpret_cast<jlong>(handle));
@@ -333,7 +332,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
- return false;
+ return JNI_FALSE;
}
return (jboolean)_returnValue;
}
@@ -457,12 +456,9 @@
static jobject
android_eglCreatePlatformPixmapSurface
(JNIEnv *_env, jobject _this, jobject dpy, jobject config, jobject native_pixmap_buf, jlongArray attrib_list_ref, jint offset) {
- if ((true)) {
- jniThrowException(_env, "java/lang/UnsupportedOperationException",
- "eglCreatePlatformPixmapSurface");
+ jniThrowException(_env, "java/lang/UnsupportedOperationException",
+ "eglCreatePlatformPixmapSurface");
return nullptr;
- }
- return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, (EGLSurface) 0);
}
/* EGLBoolean eglWaitSync ( EGLDisplay dpy, EGLSync sync, EGLint flags ) */
diff --git a/core/jni/android_opengl_EGLExt.cpp b/core/jni/android_opengl_EGLExt.cpp
index 1eb1101..fef8116 100644
--- a/core/jni/android_opengl_EGLExt.cpp
+++ b/core/jni/android_opengl_EGLExt.cpp
@@ -102,6 +102,7 @@
if (obj == NULL){
jniThrowException(_env, "java/lang/IllegalArgumentException",
"Object is set to null.");
+ return nullptr;
}
return reinterpret_cast<void*>(_env->CallLongMethod(obj, mid));
diff --git a/core/jni/android_opengl_GLES10Ext.cpp b/core/jni/android_opengl_GLES10Ext.cpp
index ee82fc7..a5dcbf7 100644
--- a/core/jni/android_opengl_GLES10Ext.cpp
+++ b/core/jni/android_opengl_GLES10Ext.cpp
@@ -529,6 +529,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -598,6 +599,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
diff --git a/core/jni/android_opengl_GLES20.cpp b/core/jni/android_opengl_GLES20.cpp
index ff4536e..0e20d47 100644
--- a/core/jni/android_opengl_GLES20.cpp
+++ b/core/jni/android_opengl_GLES20.cpp
@@ -2682,6 +2682,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -3907,6 +3908,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
diff --git a/core/jni/android_opengl_GLES30.cpp b/core/jni/android_opengl_GLES30.cpp
index 9aca866..9922398 100644
--- a/core/jni/android_opengl_GLES30.cpp
+++ b/core/jni/android_opengl_GLES30.cpp
@@ -3010,6 +3010,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -3979,6 +3980,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
diff --git a/core/jni/android_opengl_GLES31.cpp b/core/jni/android_opengl_GLES31.cpp
index 4c51e2d..27dbd39 100644
--- a/core/jni/android_opengl_GLES31.cpp
+++ b/core/jni/android_opengl_GLES31.cpp
@@ -706,6 +706,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -917,6 +918,7 @@
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
diff --git a/core/jni/com_google_android_gles_jni_GLImpl.cpp b/core/jni/com_google_android_gles_jni_GLImpl.cpp
index ee14a89..c806162 100644
--- a/core/jni/com_google_android_gles_jni_GLImpl.cpp
+++ b/core/jni/com_google_android_gles_jni_GLImpl.cpp
@@ -4237,6 +4237,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -4306,6 +4307,7 @@
}
if (_exception) {
jniThrowException(_env, _exceptionType, _exceptionMessage);
+ return (jint)0;
}
return (jint)_returnValue;
}
@@ -4902,6 +4904,7 @@
(JNIEnv *_env, jobject _this, jint target, jint pname, jintArray params_ref, jint offset) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"glGetBufferParameteriv");
+ return;
}
/* void glGetBufferParameteriv ( GLenum target, GLenum pname, GLint *params ) */
@@ -4910,6 +4913,7 @@
(JNIEnv *_env, jobject _this, jint target, jint pname, jobject params_buf) {
jniThrowException(_env, "java/lang/UnsupportedOperationException",
"glGetBufferParameteriv");
+ return;
}
/* void glGetClipPlanef ( GLenum pname, GLfloat *eqn ) */