diff options
4 files changed, 26 insertions, 1 deletions
diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java index 6caf07655f..e8691bb7f8 100644 --- a/opengl/tools/glgen/src/JniCodeEmitter.java +++ b/opengl/tools/glgen/src/JniCodeEmitter.java @@ -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); @@ -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" : @@ -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 + diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.cpp b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.cpp new file mode 100644 index 0000000000..3eacf3c3cd --- /dev/null +++ b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.cpp @@ -0,0 +1,9 @@ +/* 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); +} + diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java index bc6740ec5f..1750b32f30 100644 --- a/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java +++ b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.java @@ -7,4 +7,5 @@ int pixmap, int[] attrib_list, int offset - );
\ No newline at end of file + ); + diff --git a/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.nativeReg b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.nativeReg new file mode 100644 index 0000000000..fa260d80d9 --- /dev/null +++ b/opengl/tools/glgen/stubs/egl/eglCreatePixmapSurface.nativeReg @@ -0,0 +1 @@ +{"eglCreatePixmapSurface", "(Landroid/opengl/EGLDisplay;Landroid/opengl/EGLConfig;I[II)Landroid/opengl/EGLSurface;", (void *) android_eglCreatePixmapSurface }, |