summaryrefslogtreecommitdiffstats
path: root/rs/jni
diff options
context:
space:
mode:
authorTim Murray <timmurray@google.com>2015-04-10 04:35:04 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2015-04-10 04:35:04 +0000
commit9509bfe46a96a724a9166b115b287f16862b9fc5 (patch)
treeb15ce23dafe5f714d5233d6b62a7b8a079b71b7b /rs/jni
parent8d33804b01d4fc871b7eed750fa6aad00861f984 (diff)
parent72fcf9eb1079312afd7bdbee167c759109af4244 (diff)
downloadframeworks_base-9509bfe46a96a724a9166b115b287f16862b9fc5.zip
frameworks_base-9509bfe46a96a724a9166b115b287f16862b9fc5.tar.gz
frameworks_base-9509bfe46a96a724a9166b115b287f16862b9fc5.tar.bz2
am 72fcf9eb: am af61d43d: am 6d718c2f: Merge "Add support for setting the cache directory."
* commit '72fcf9eb1079312afd7bdbee167c759109af4244': Add support for setting the cache directory.
Diffstat (limited to 'rs/jni')
-rw-r--r--rs/jni/android_renderscript_RenderScript.cpp12
1 files changed, 12 insertions, 0 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp
index 40fad38..a40233a 100644
--- a/rs/jni/android_renderscript_RenderScript.cpp
+++ b/rs/jni/android_renderscript_RenderScript.cpp
@@ -684,6 +684,17 @@ nContextSetPriority(JNIEnv *_env, jobject _this, jlong con, jint p)
rsContextSetPriority((RsContext)con, p);
}
+static void
+nContextSetCacheDir(JNIEnv *_env, jobject _this, jlong con, jstring cacheDir)
+{
+ AutoJavaStringToUTF8 cacheDirUTF(_env, cacheDir);
+
+ if (kLogApi) {
+ ALOGD("ContextSetCacheDir, con(%p), cacheDir(%s)", (RsContext)con, cacheDirUTF.c_str());
+ }
+ rsContextSetCacheDir((RsContext)con, cacheDirUTF.c_str(), cacheDirUTF.length());
+}
+
static void
@@ -2307,6 +2318,7 @@ static JNINativeMethod methods[] = {
{"rsnContextCreateGL", "(JIIIIIIIIIIIIFI)J", (void*)nContextCreateGL },
{"rsnContextFinish", "(J)V", (void*)nContextFinish },
{"rsnContextSetPriority", "(JI)V", (void*)nContextSetPriority },
+{"rsnContextSetCacheDir", "(JLjava/lang/String;)V", (void*)nContextSetCacheDir },
{"rsnContextSetSurface", "(JIILandroid/view/Surface;)V", (void*)nContextSetSurface },
{"rsnContextDestroy", "(J)V", (void*)nContextDestroy },
{"rsnContextDump", "(JI)V", (void*)nContextDump },