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.cpp25
1 files changed, 23 insertions, 2 deletions
diff --git a/graphics/jni/android_renderscript_RenderScript.cpp b/graphics/jni/android_renderscript_RenderScript.cpp
index 9a8a6e8..8830685 100644
--- a/graphics/jni/android_renderscript_RenderScript.cpp
+++ b/graphics/jni/android_renderscript_RenderScript.cpp
@@ -1055,10 +1055,30 @@ nScriptForEachV(JNIEnv *_env, jobject _this, RsContext con,
static void
nScriptForEachClipped(JNIEnv *_env, jobject _this, RsContext con,
jint script, jint slot, jint ain, jint aout,
- jbyteArray params, jint xstart, jint xend,
+ jint xstart, jint xend,
jint ystart, jint yend, jint zstart, jint zend)
{
LOG_API("nScriptForEachClipped, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
+ RsScriptCall sc;
+ sc.xStart = xstart;
+ sc.xEnd = xend;
+ sc.yStart = ystart;
+ sc.yEnd = yend;
+ sc.zStart = zstart;
+ sc.zEnd = zend;
+ sc.strategy = RS_FOR_EACH_STRATEGY_DONT_CARE;
+ sc.arrayStart = 0;
+ sc.arrayEnd = 0;
+ rsScriptForEach(con, (RsScript)script, slot, (RsAllocation)ain, (RsAllocation)aout, NULL, 0, &sc, sizeof(sc));
+}
+
+static void
+nScriptForEachClippedV(JNIEnv *_env, jobject _this, RsContext con,
+ jint script, jint slot, jint ain, jint aout,
+ jbyteArray params, jint xstart, jint xend,
+ jint ystart, jint yend, jint zstart, jint zend)
+{
+ LOG_API("nScriptForEachClipped, con(%p), s(%p), slot(%i)", con, (void *)script, slot);
jint len = _env->GetArrayLength(params);
jbyte *ptr = _env->GetByteArrayElements(params, NULL);
RsScriptCall sc;
@@ -1536,7 +1556,8 @@ static JNINativeMethod methods[] = {
{"rsnScriptInvokeV", "(III[B)V", (void*)nScriptInvokeV },
{"rsnScriptForEach", "(IIIII)V", (void*)nScriptForEach },
{"rsnScriptForEach", "(IIIII[B)V", (void*)nScriptForEachV },
-{"rsnScriptForEachClipped", "(IIIII[BIIIIII)V", (void*)nScriptForEachClipped },
+{"rsnScriptForEachClipped", "(IIIIIIIIIII)V", (void*)nScriptForEachClipped },
+{"rsnScriptForEachClipped", "(IIIII[BIIIIII)V", (void*)nScriptForEachClippedV },
{"rsnScriptSetVarI", "(IIII)V", (void*)nScriptSetVarI },
{"rsnScriptSetVarJ", "(IIIJ)V", (void*)nScriptSetVarJ },
{"rsnScriptSetVarF", "(IIIF)V", (void*)nScriptSetVarF },