diff options
author | Elliott Hughes <enh@google.com> | 2011-04-08 20:01:01 -0700 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2011-04-11 15:31:20 -0700 |
commit | 24ce5fb2cc09d0a14406e7b935f8648c5720d27e (patch) | |
tree | 022bd63502ea1a649ecf32bdb3dc2e0205376901 /opengl/tools/glgen/stubs/gles11/glGetString.cpp | |
parent | 7797e647fc8fcd5091b9449c0044f5cb70db5b47 (diff) | |
download | frameworks_base-24ce5fb2cc09d0a14406e7b935f8648c5720d27e.zip frameworks_base-24ce5fb2cc09d0a14406e7b935f8648c5720d27e.tar.gz frameworks_base-24ce5fb2cc09d0a14406e7b935f8648c5720d27e.tar.bz2 |
Kill the global references in the OpenGL wrappers.
Just use jniThrowException instead. Note that it would be trivial to throw
seemingly more appropriate exceptions (NullPointerException and
OutOfMemoryException in particular), but I'm only attempting to preserve
existing behavior here.
I also found shadowing bugs in some of the special-case functions, which
would previously always have leaked memory.
This also moves an accidental change to a generated file (ActivityThread ->
AppGlobals) into the generator, so it won't be overwritten in future.
Change-Id: Iab570310b568cb406c60dd0e2b8211f8a36ae590
Diffstat (limited to 'opengl/tools/glgen/stubs/gles11/glGetString.cpp')
-rw-r--r-- | opengl/tools/glgen/stubs/gles11/glGetString.cpp | 12 |
1 files changed, 3 insertions, 9 deletions
diff --git a/opengl/tools/glgen/stubs/gles11/glGetString.cpp b/opengl/tools/glgen/stubs/gles11/glGetString.cpp index a400859..239fe4a 100644 --- a/opengl/tools/glgen/stubs/gles11/glGetString.cpp +++ b/opengl/tools/glgen/stubs/gles11/glGetString.cpp @@ -1,11 +1,5 @@ -#include <string.h>
-
/* const GLubyte * glGetString ( GLenum name ) */
-static
-jstring
-android_glGetString
- (JNIEnv *_env, jobject _this, jint name) {
- const char * chars = (const char *)glGetString((GLenum)name);
- jstring output = _env->NewStringUTF(chars);
- return output;
+static jstring android_glGetString(JNIEnv* _env, jobject, jint name) {
+ const char* chars = (const char*) glGetString((GLenum) name);
+ return _env->NewStringUTF(chars);
}
|