summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2009-11-17 17:36:27 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2009-11-17 17:36:27 -0800
commitbd2b773c23d6e5c07d5af2b1f6c25ad858b949d5 (patch)
tree1f9e21a9aa6ff4bf6555398f0e28ec79f2f42d93 /graphics
parentd2709747b661827abcd8b9230a653f3578bbf7b6 (diff)
parentfa0394c9f89f13b53c6db2470253825b88cafb64 (diff)
downloadframeworks_base-bd2b773c23d6e5c07d5af2b1f6c25ad858b949d5.zip
frameworks_base-bd2b773c23d6e5c07d5af2b1f6c25ad858b949d5.tar.gz
frameworks_base-bd2b773c23d6e5c07d5af2b1f6c25ad858b949d5.tar.bz2
am fa0394c9: Merge change I715333b8 into eclair
Merge commit 'fa0394c9f89f13b53c6db2470253825b88cafb64' into eclair-plus-aosp * commit 'fa0394c9f89f13b53c6db2470253825b88cafb64': Add support for dumping RS objects to aid in debugging of white blocks bug.
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/RenderScript.java5
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp10
2 files changed, 14 insertions, 1 deletions
diff --git a/graphics/java/android/renderscript/RenderScript.java b/graphics/java/android/renderscript/RenderScript.java
index a5bceb6..c42f647 100644
--- a/graphics/java/android/renderscript/RenderScript.java
+++ b/graphics/java/android/renderscript/RenderScript.java
@@ -68,6 +68,7 @@ public class RenderScript {
native void nContextDestroy(int con);
native void nContextSetSurface(int w, int h, Surface sur);
native void nContextSetPriority(int p);
+ native void nContextDump(int bits);
native void nContextBindRootScript(int script);
native void nContextBindSampler(int sampler, int slot);
@@ -304,6 +305,10 @@ public class RenderScript {
nContextSetSurface(w, h, mSurface);
}
+ public void contextDump(int bits) {
+ nContextDump(bits);
+ }
+
public void destroy() {
nContextDeinitToClient();
mMessageThread.mRun = false;
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index d311c33..af3bc74 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -189,9 +189,16 @@ static void
nContextDestroy(JNIEnv *_env, jobject _this, jint con)
{
LOG_API("nContextDestroy, con(%p)", (RsContext)con);
- return rsContextDestroy((RsContext)con);
+ rsContextDestroy((RsContext)con);
}
+static void
+nContextDump(JNIEnv *_env, jobject _this, jint bits)
+{
+ RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
+ LOG_API("nContextDump, con(%p) bits(%i)", (RsContext)con, bits);
+ rsContextDump((RsContext)con, bits);
+}
static void
nContextPause(JNIEnv *_env, jobject _this)
@@ -1346,6 +1353,7 @@ static JNINativeMethod methods[] = {
{"nContextSetPriority", "(I)V", (void*)nContextSetPriority },
{"nContextSetSurface", "(IILandroid/view/Surface;)V", (void*)nContextSetSurface },
{"nContextDestroy", "(I)V", (void*)nContextDestroy },
+{"nContextDump", "(I)V", (void*)nContextDump },
{"nContextPause", "()V", (void*)nContextPause },
{"nContextResume", "()V", (void*)nContextResume },
{"nAssignName", "(I[B)V", (void*)nAssignName },