diff options
author | Siva Velusamy <vsiva@google.com> | 2012-03-09 14:21:28 -0800 |
---|---|---|
committer | Siva Velusamy <vsiva@google.com> | 2012-03-09 15:25:29 -0800 |
commit | 64d10a1da0a702ffeb086ad9c4a632f2712f1dad (patch) | |
tree | ad00d68fc373d8bdeab43b2fc83f81a983c2e659 /core/jni | |
parent | df0d3ab4d03d8738a606b35bf9673950844aef4a (diff) | |
download | frameworks_base-64d10a1da0a702ffeb086ad9c4a632f2712f1dad.zip frameworks_base-64d10a1da0a702ffeb086ad9c4a632f2712f1dad.tar.gz frameworks_base-64d10a1da0a702ffeb086ad9c4a632f2712f1dad.tar.bz2 |
Expose a function to set OpenGL Trace level.
This patch adds a function setGlDebugLevel() to libEGL, and
exposes it to the Java layer at android.opengl.GLUtils.enableTracing().
Change-Id: Ia5abb130bc32fcfe3ab25b0a0a5283a54c54f357
Diffstat (limited to 'core/jni')
-rw-r--r-- | core/jni/android/opengl/util.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/core/jni/android/opengl/util.cpp b/core/jni/android/opengl/util.cpp index 929df540..634efa6 100644 --- a/core/jni/android/opengl/util.cpp +++ b/core/jni/android/opengl/util.cpp @@ -556,6 +556,12 @@ void nativeUtilsClassInit(JNIEnv *env, jclass clazz) nativeBitmapID = env->GetFieldID(bitmapClass, "mNativeBitmap", "I"); } +extern void setGLDebugLevel(int level); +void nativeEnableTracing(JNIEnv *env, jclass clazz) +{ + setGLDebugLevel(1); +} + static int checkFormat(SkBitmap::Config config, int format, int type) { switch(config) { @@ -1026,6 +1032,7 @@ static JNINativeMethod gUtilsMethods[] = { { "native_getType", "(Landroid/graphics/Bitmap;)I", (void*) util_getType }, { "native_texImage2D", "(IIILandroid/graphics/Bitmap;II)I", (void*)util_texImage2D }, { "native_texSubImage2D", "(IIIILandroid/graphics/Bitmap;II)I", (void*)util_texSubImage2D }, + { "native_enableTracing", "()V", (void*)nativeEnableTracing }, }; static JNINativeMethod gEtc1Methods[] = { |