OSDN Git Service

Kill the global references in the OpenGL wrappers.
authorElliott Hughes <enh@google.com>
Sat, 9 Apr 2011 03:01:01 +0000 (20:01 -0700)
committerElliott Hughes <enh@google.com>
Mon, 11 Apr 2011 22:31:20 +0000 (15:31 -0700)
commit9875750593aae7c2a62f33c620809d49162393eb
tree05696154ec1056b08a758f5741cdd7cd31a54587
parent626d865d418cf3fcea985429ef85cf83f8cd978e
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
14 files changed:
opengl/tools/glgen/gen
opengl/tools/glgen/src/JniCodeEmitter.java
opengl/tools/glgen/stubs/gles11/GLES10ExtcHeader.cpp
opengl/tools/glgen/stubs/gles11/GLES10cHeader.cpp
opengl/tools/glgen/stubs/gles11/GLES11ExtcHeader.cpp
opengl/tools/glgen/stubs/gles11/GLES11cHeader.cpp
opengl/tools/glgen/stubs/gles11/GLES20cHeader.cpp
opengl/tools/glgen/stubs/gles11/glGetProgramInfoLog.cpp
opengl/tools/glgen/stubs/gles11/glGetShaderInfoLog.cpp
opengl/tools/glgen/stubs/gles11/glGetString.cpp
opengl/tools/glgen/stubs/gles11/glShaderSource.cpp
opengl/tools/glgen/stubs/jsr239/GLCHeader.cpp
opengl/tools/glgen/stubs/jsr239/GLImplHeader.java-impl
opengl/tools/glgen/stubs/jsr239/glGetString.cpp