summaryrefslogtreecommitdiffstats
path: root/graphics/jni/android_renderscript_RenderScript.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'graphics/jni/android_renderscript_RenderScript.cpp')
-rw-r--r--graphics/jni/android_renderscript_RenderScript.cpp20
1 files changed, 19 insertions, 1 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 6f781a0..a02abca 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -586,7 +586,7 @@ static void
nScriptCSetClearDepth(JNIEnv *_env, jobject _this, jfloat d)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
- LOG_API("nScriptCSetClearColor, con(%p), depth(%f)", con, d);
+ LOG_API("nScriptCSetClearDepth, con(%p), depth(%f)", con, d);
rsScriptCSetClearDepth(d);
}
@@ -599,6 +599,23 @@ nScriptCSetClearStencil(JNIEnv *_env, jobject _this, jint stencil)
}
static void
+nScriptCSetTimeZone(JNIEnv *_env, jobject _this, jbyteArray timeZone)
+{
+ RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
+ LOG_API("nScriptCSetTimeZone, con(%p), timeZone(%s)", con, timeZone);
+
+ jint length = _env->GetArrayLength(timeZone);
+ jbyte* timeZone_ptr;
+ timeZone_ptr = (jbyte *) _env->GetPrimitiveArrayCritical(timeZone, (jboolean *)0);
+
+ rsScriptCSetTimeZone((const char *)timeZone_ptr, length);
+
+ if (timeZone_ptr) {
+ _env->ReleasePrimitiveArrayCritical(timeZone, timeZone_ptr, 0);
+ }
+}
+
+static void
nScriptCAddType(JNIEnv *_env, jobject _this, jint type)
{
RsContext con = (RsContext)(_env->GetIntField(_this, gContextId));
@@ -1052,6 +1069,7 @@ static JNINativeMethod methods[] = {
{"nScriptCSetClearColor", "(FFFF)V", (void*)nScriptCSetClearColor },
{"nScriptCSetClearDepth", "(F)V", (void*)nScriptCSetClearDepth },
{"nScriptCSetClearStencil", "(I)V", (void*)nScriptCSetClearStencil },
+{"nScriptCSetTimeZone", "([B)V", (void*)nScriptCSetTimeZone },
{"nScriptCAddType", "(I)V", (void*)nScriptCAddType },
{"nScriptCSetRoot", "(Z)V", (void*)nScriptCSetRoot },
{"nScriptCSetScript", "([BII)V", (void*)nScriptCSetScript },