diff options
author | Jason Sams <rjsams@android.com> | 2010-11-16 17:37:02 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-11-16 17:37:02 -0800 |
commit | 6f4cf0b8885403ead157ae00fd43cf1282331c23 (patch) | |
tree | ae1e103e42911792c5f859d34d8362a76ae362b0 /graphics/jni | |
parent | 7a21ee61484e7c55f8642231362821058104a49d (diff) | |
download | frameworks_base-6f4cf0b8885403ead157ae00fd43cf1282331c23.zip frameworks_base-6f4cf0b8885403ead157ae00fd43cf1282331c23.tar.gz frameworks_base-6f4cf0b8885403ead157ae00fd43cf1282331c23.tar.bz2 |
Fix ref counting for globals when set from java code.
Change-Id: I415b6ddeaab277e60233e905a6bae357cd5193eb
Diffstat (limited to 'graphics/jni')
-rw-r--r-- | graphics/jni/android_renderscript_RenderScript.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp index dd84848..8888459 100644 --- a/graphics/jni/android_renderscript_RenderScript.cpp +++ b/graphics/jni/android_renderscript_RenderScript.cpp @@ -829,6 +829,13 @@ nScriptSetVarI(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slo } static void +nScriptSetVarObj(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jint val) +{ + LOG_API("nScriptSetVarObj, con(%p), s(%p), slot(%i), val(%i)", con, (void *)script, slot, val); + rsScriptSetVarObj(con, (RsScript)script, slot, (RsObjectBase)val); +} + +static void nScriptSetVarJ(JNIEnv *_env, jobject _this, RsContext con, jint script, jint slot, jlong val) { LOG_API("nScriptSetVarJ, con(%p), s(%p), slot(%i), val(%lli)", con, (void *)script, slot, val); @@ -1335,6 +1342,7 @@ static JNINativeMethod methods[] = { {"rsnScriptSetVarF", "(IIIF)V", (void*)nScriptSetVarF }, {"rsnScriptSetVarD", "(IIID)V", (void*)nScriptSetVarD }, {"rsnScriptSetVarV", "(III[B)V", (void*)nScriptSetVarV }, +{"rsnScriptSetVarObj", "(IIII)V", (void*)nScriptSetVarObj }, {"rsnScriptCBegin", "(I)V", (void*)nScriptCBegin }, {"rsnScriptCSetScript", "(I[BII)V", (void*)nScriptCSetScript }, |