summaryrefslogtreecommitdiff
path: root/rs/java/android/renderscript/RenderScript.java
diff options
context:
space:
mode:
Diffstat (limited to 'rs/java/android/renderscript/RenderScript.java')
-rw-r--r--rs/java/android/renderscript/RenderScript.java30
1 files changed, 30 insertions, 0 deletions
diff --git a/rs/java/android/renderscript/RenderScript.java b/rs/java/android/renderscript/RenderScript.java
index ea25f5896e00..f2b1380d5ac4 100644
--- a/rs/java/android/renderscript/RenderScript.java
+++ b/rs/java/android/renderscript/RenderScript.java
@@ -67,6 +67,12 @@ public class RenderScript {
static Method registerNativeAllocation;
static Method registerNativeFree;
+ /*
+ * Detect the bitness of the VM to allow FieldPacker to do the right thing.
+ */
+ static native int rsnSystemGetPointerSize();
+ static int sPointerSize;
+
static {
sInitialized = false;
if (!SystemProperties.getBoolean("config.disable_renderscript", false)) {
@@ -84,6 +90,7 @@ public class RenderScript {
System.loadLibrary("rs_jni");
_nInit();
sInitialized = true;
+ sPointerSize = rsnSystemGetPointerSize();
} catch (UnsatisfiedLinkError e) {
Log.e(LOG_TAG, "Error loading RS jni library: " + e);
throw new RSRuntimeException("Error loading RS jni library: " + e);
@@ -608,6 +615,29 @@ public class RenderScript {
}
}
+ /**
+ * Multi-input code.
+ *
+ */
+
+ // @hide
+ native void rsnScriptForEachMultiClipped(long con, long id, int slot, long[] ains, long aout, byte[] params,
+ int xstart, int xend, int ystart, int yend, int zstart, int zend);
+ // @hide
+ native void rsnScriptForEachMultiClipped(long con, long id, int slot, long[] ains, long aout,
+ int xstart, int xend, int ystart, int yend, int zstart, int zend);
+
+ // @hide
+ synchronized void nScriptForEachMultiClipped(long id, int slot, long[] ains, long aout, byte[] params,
+ int xstart, int xend, int ystart, int yend, int zstart, int zend) {
+ validate();
+ if (params == null) {
+ rsnScriptForEachMultiClipped(mContext, id, slot, ains, aout, xstart, xend, ystart, yend, zstart, zend);
+ } else {
+ rsnScriptForEachMultiClipped(mContext, id, slot, ains, aout, params, xstart, xend, ystart, yend, zstart, zend);
+ }
+ }
+
native void rsnScriptInvokeV(long con, long id, int slot, byte[] params);
synchronized void nScriptInvokeV(long id, int slot, byte[] params) {
validate();