Loading opengl/tools/glgen/src/JniCodeEmitter.java +14 −0 Original line number Diff line number Diff line Loading @@ -985,6 +985,7 @@ public class JniCodeEmitter { boolean emitExceptionCheck = ((numArrays > 0 || numStrings > 0) && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs) || (cfunc.hasPointerArg() && numArrays > 0)) || (numBufferArgs > 0) || hasCheckTest(cfunc) || hasIfTest(cfunc)) || (stringArgs.size() > 0); Loading Loading @@ -1308,6 +1309,8 @@ public class JniCodeEmitter { out.println(); } else if (jfunc.getArgType(idx).isBuffer()) { needsExit = needsExit || (!nullAllowed && !isPointerFunc); String array = numBufferArgs <= 1 ? "_array" : "_" + cfunc.getArgName(cIndex) + "Array"; String bufferOffset = numBufferArgs <= 1 ? "_bufferOffset" : Loading @@ -1318,6 +1321,17 @@ public class JniCodeEmitter { out.println(indent + "if (" + cname + "_buf) {"); out.print(indent); } else { out.println(indent + "if (!" + cname + "_buf) {"); out.println(indent + indent + "_exception = 1;"); out.println(indent + indent + "_exceptionType = " + "\"java/lang/IllegalArgumentException\";"); out.println(indent + indent + "_exceptionMessage = \"" + cname +" == null\";"); out.println(indent + indent + "goto exit;"); out.println(indent + "}"); } if (isPointerFunc) { out.println(indent + Loading opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.cpp 0 → 100644 +9 −0 Original line number Diff line number Diff line /* EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */ static jobject android_eglCreatePixmapSurface (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jint pixmap, jintArray attrib_list_ref, jint offset) { jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglCreatePixmapSurface"); return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, (EGLSurface) 0); } opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java +2 −1 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ int[] attrib_list, int offset ); opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.nativeReg 0 → 100644 +1 −0 Original line number Diff line number Diff line {"eglCreatePixmapSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;I[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePixmapSurface }, Loading
opengl/tools/glgen/src/JniCodeEmitter.java +14 −0 Original line number Diff line number Diff line Loading @@ -985,6 +985,7 @@ public class JniCodeEmitter { boolean emitExceptionCheck = ((numArrays > 0 || numStrings > 0) && (hasNonConstArg(jfunc, cfunc, nonPrimitiveArgs) || (cfunc.hasPointerArg() && numArrays > 0)) || (numBufferArgs > 0) || hasCheckTest(cfunc) || hasIfTest(cfunc)) || (stringArgs.size() > 0); Loading Loading @@ -1308,6 +1309,8 @@ public class JniCodeEmitter { out.println(); } else if (jfunc.getArgType(idx).isBuffer()) { needsExit = needsExit || (!nullAllowed && !isPointerFunc); String array = numBufferArgs <= 1 ? "_array" : "_" + cfunc.getArgName(cIndex) + "Array"; String bufferOffset = numBufferArgs <= 1 ? "_bufferOffset" : Loading @@ -1318,6 +1321,17 @@ public class JniCodeEmitter { out.println(indent + "if (" + cname + "_buf) {"); out.print(indent); } else { out.println(indent + "if (!" + cname + "_buf) {"); out.println(indent + indent + "_exception = 1;"); out.println(indent + indent + "_exceptionType = " + "\"java/lang/IllegalArgumentException\";"); out.println(indent + indent + "_exceptionMessage = \"" + cname +" == null\";"); out.println(indent + indent + "goto exit;"); out.println(indent + "}"); } if (isPointerFunc) { out.println(indent + Loading
opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.cpp 0 → 100644 +9 −0 Original line number Diff line number Diff line /* EGLSurface eglCreatePixmapSurface ( EGLDisplay dpy, EGLConfig config, EGLNativePixmapType pixmap, const EGLint *attrib_list ) */ static jobject android_eglCreatePixmapSurface (JNIEnv *_env, jobject _this, jobject dpy, jobject config, jint pixmap, jintArray attrib_list_ref, jint offset) { jniThrowException(_env, "java/lang/UnsupportedOperationException", "eglCreatePixmapSurface"); return toEGLHandle(_env, eglsurfaceClass, eglsurfaceConstructor, (EGLSurface) 0); }
opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java +2 −1 Original line number Diff line number Diff line Loading @@ -8,3 +8,4 @@ int[] attrib_list, int offset );
opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.nativeReg 0 → 100644 +1 −0 Original line number Diff line number Diff line {"eglCreatePixmapSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;I[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePixmapSurface },