summaryrefslogtreecommitdiffstats
path: root/rs/jni/android_renderscript_RenderScript.cpp
diff options
context:
space:
mode:
authorYang Ni <yangni@google.com>2015-02-03 06:27:39 +0000
committerandroid-build-merger <android-build-merger@google.com>2015-02-03 06:27:39 +0000
commit712e38eaba012904a515dc84d1edda4dab563dcc (patch)
treedbed727b9383e5f00b875f2e572cb4eef6f8d7eb /rs/jni/android_renderscript_RenderScript.cpp
parente9557d7d2728d1c77e4d173e8f6d954eeeb69357 (diff)
parent29fe5ef179a4a7de15360650353c6196f9350b07 (diff)
downloadframeworks_base-712e38eaba012904a515dc84d1edda4dab563dcc.zip
frameworks_base-712e38eaba012904a515dc84d1edda4dab563dcc.tar.gz
frameworks_base-712e38eaba012904a515dc84d1edda4dab563dcc.tar.bz2
Merge "Pass in code cache directory when creating a script group." automerge: 9559ce7
automerge: 29fe5ef * commit '29fe5ef179a4a7de15360650353c6196f9350b07': Pass in code cache directory when creating a script group.
Diffstat (limited to 'rs/jni/android_renderscript_RenderScript.cpp')
-rw-r--r--rs/jni/android_renderscript_RenderScript.cpp11
1 files changed, 7 insertions, 4 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 06f4def..cbcba39 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -258,7 +258,9 @@ nClosureSetGlobal(JNIEnv *_env, jobject _this, jlong con, jlong closureID,
static long
nScriptGroup2Create(JNIEnv *_env, jobject _this, jlong con,
- jlongArray closureArray) {
+ jstring cacheDir, jlongArray closureArray) {
+ AutoJavaStringToUTF8 cacheDirUTF(_env, cacheDir);
+
jlong* jClosures = _env->GetLongArrayElements(closureArray, nullptr);
jsize numClosures = _env->GetArrayLength(closureArray);
RsClosure* closures = (RsClosure*)alloca(sizeof(RsClosure) * numClosures);
@@ -266,8 +268,9 @@ nScriptGroup2Create(JNIEnv *_env, jobject _this, jlong con,
closures[i] = (RsClosure)jClosures[i];
}
- return (jlong)(uintptr_t)rsScriptGroup2Create((RsContext)con, closures,
- numClosures);
+ return (jlong)(uintptr_t)rsScriptGroup2Create(
+ (RsContext)con, cacheDirUTF.c_str(), cacheDirUTF.length(),
+ closures, numClosures);
}
static void
@@ -2008,7 +2011,7 @@ static JNINativeMethod methods[] = {
{"rsnScriptKernelIDCreate", "(JJII)J", (void*)nScriptKernelIDCreate },
{"rsnScriptFieldIDCreate", "(JJI)J", (void*)nScriptFieldIDCreate },
{"rsnScriptGroupCreate", "(J[J[J[J[J[J)J", (void*)nScriptGroupCreate },
-{"rsnScriptGroup2Create", "(J[J)J", (void*)nScriptGroup2Create },
+{"rsnScriptGroup2Create", "(JLjava/lang/String;[J)J", (void*)nScriptGroup2Create },
{"rsnScriptGroupSetInput", "(JJJJ)V", (void*)nScriptGroupSetInput },
{"rsnScriptGroupSetOutput", "(JJJJ)V", (void*)nScriptGroupSetOutput },
{"rsnScriptGroupExecute", "(JJ)V", (void*)nScriptGroupExecute },