diff options
author | Jack Palevich <jackpal@google.com> | 2009-05-15 18:13:34 -0700 |
---|---|---|
committer | Jack Palevich <jackpal@google.com> | 2009-05-15 18:13:34 -0700 |
commit | 6eedc8d3b598163f797a2f75d05fdc20809a4364 (patch) | |
tree | d636adb4fdda5973e9ae3acef536ab7a8c08d2e7 /opengl/tools/glgen/src | |
parent | cc38f9745e5c5f4c04294f940663035c181d7cca (diff) | |
download | frameworks_native-6eedc8d3b598163f797a2f75d05fdc20809a4364.zip frameworks_native-6eedc8d3b598163f797a2f75d05fdc20809a4364.tar.gz frameworks_native-6eedc8d3b598163f797a2f75d05fdc20809a4364.tar.bz2 |
Fix bug 1856713 gl Pointer functions should use Buffer position
JSR239 and android.opengl gl Pointer functions (glColorPointer, etc.)
now respect the current setting of the Buffer position.
This fixes a regression introduced when we started requiring the
Buffers passed to the Pointer functions to be direct Buffers.
Diffstat (limited to 'opengl/tools/glgen/src')
-rw-r--r-- | opengl/tools/glgen/src/JniCodeEmitter.java | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/opengl/tools/glgen/src/JniCodeEmitter.java b/opengl/tools/glgen/src/JniCodeEmitter.java index b0997b1..7340357 100644 --- a/opengl/tools/glgen/src/JniCodeEmitter.java +++ b/opengl/tools/glgen/src/JniCodeEmitter.java @@ -890,16 +890,10 @@ public class JniCodeEmitter { cname + " = (" + cfunc.getArgType(cIndex).getDeclaration() + - ") _env->GetDirectBufferAddress(" + - (mUseCPlusPlus ? "" : "_env, ") + + ") getDirectBufferPointer(_env, " + cname + "_buf);"); String iii = " "; - out.println(iii + indent + "if ( ! " + cname + " ) {"); - out.println(iii + iii + indent + - (mUseCPlusPlus ? "_env" : "(*_env)") + - "->ThrowNew(" + - (mUseCPlusPlus ? "" : "_env, ") + - "IAEClass, \"Must use a native order direct Buffer\");"); + out.println(iii + indent + "if ( ! " + cname + " ) {"); out.println(iii + iii + indent + "return;"); out.println(iii + indent + "}"); } else { |