diff options
author | Tim Murray <timmurray@google.com> | 2015-04-07 15:43:24 -0700 |
---|---|---|
committer | Tim Murray <timmurray@google.com> | 2015-04-09 17:50:39 -0700 |
commit | 47f31582b67f492d9e1523abd0d8b86c38ec007d (patch) | |
tree | 3832370c800536d22d23de76cd3e6183cdd20fe9 /rs/jni | |
parent | ba2836e6cf5a00855e470705741d9e4b9b1a9df9 (diff) | |
download | frameworks_base-47f31582b67f492d9e1523abd0d8b86c38ec007d.zip frameworks_base-47f31582b67f492d9e1523abd0d8b86c38ec007d.tar.gz frameworks_base-47f31582b67f492d9e1523abd0d8b86c38ec007d.tar.bz2 |
Add support for setting the cache directory.
Change-Id: I2bf1874705b877a8a8262ab49b47fe8241e603d5
Diffstat (limited to 'rs/jni')
-rw-r--r-- | rs/jni/android_renderscript_RenderScript.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/rs/jni/android_renderscript_RenderScript.cpp b/rs/jni/android_renderscript_RenderScript.cpp index 3591199..676d94f 100644 --- a/rs/jni/android_renderscript_RenderScript.cpp +++ b/rs/jni/android_renderscript_RenderScript.cpp @@ -689,6 +689,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 @@ -2312,6 +2323,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 }, |