Loading rs/java/android/renderscript/RenderScript.java +23 −0 Original line number Diff line number Diff line Loading @@ -615,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(); Loading rs/java/android/renderscript/Script.java +48 −1 Original line number Diff line number Diff line Loading @@ -182,6 +182,54 @@ public class Script extends BaseObj { mRS.nScriptForEachClipped(getID(mRS), slot, in_id, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend); } /** * Only intended for use by generated reflected code. * * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v) { forEach(slot, ains, aout, v, new LaunchOptions()); } /** * Only intended for use by generated reflected code. * * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v, LaunchOptions sc) { mRS.validate(); for (Allocation ain : ains) { mRS.validateObject(ain); } mRS.validateObject(aout); if (ains == null && aout == null) { throw new RSIllegalArgumentException( "At least one of ain or aout is required to be non-null."); } if (sc == null) { forEach(slot, ains, aout, v); return; } long[] in_ids = new long[ains.length]; for (int index = 0; index < ains.length; ++index) { in_ids[index] = ains[index].getID(mRS); } long out_id = 0; if (aout != null) { out_id = aout.getID(mRS); } byte[] params = null; if (v != null) { params = v.getData(); } mRS.nScriptForEachMultiClipped(getID(mRS), slot, in_ids, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend); } Script(long id, RenderScript rs) { super(id, rs); } Loading Loading @@ -477,4 +525,3 @@ public class Script extends BaseObj { } } rs/java/android/renderscript/ScriptIntrinsicBlur.java +1 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -109,4 +109,3 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic { return createFieldID(1, null); } } rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java +1 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -130,4 +130,3 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic { } } rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java +1 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -130,4 +130,3 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic { return createFieldID(1, null); } } Loading
rs/java/android/renderscript/RenderScript.java +23 −0 Original line number Diff line number Diff line Loading @@ -615,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(); Loading
rs/java/android/renderscript/Script.java +48 −1 Original line number Diff line number Diff line Loading @@ -182,6 +182,54 @@ public class Script extends BaseObj { mRS.nScriptForEachClipped(getID(mRS), slot, in_id, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend); } /** * Only intended for use by generated reflected code. * * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v) { forEach(slot, ains, aout, v, new LaunchOptions()); } /** * Only intended for use by generated reflected code. * * @hide */ protected void forEach(int slot, Allocation[] ains, Allocation aout, FieldPacker v, LaunchOptions sc) { mRS.validate(); for (Allocation ain : ains) { mRS.validateObject(ain); } mRS.validateObject(aout); if (ains == null && aout == null) { throw new RSIllegalArgumentException( "At least one of ain or aout is required to be non-null."); } if (sc == null) { forEach(slot, ains, aout, v); return; } long[] in_ids = new long[ains.length]; for (int index = 0; index < ains.length; ++index) { in_ids[index] = ains[index].getID(mRS); } long out_id = 0; if (aout != null) { out_id = aout.getID(mRS); } byte[] params = null; if (v != null) { params = v.getData(); } mRS.nScriptForEachMultiClipped(getID(mRS), slot, in_ids, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend); } Script(long id, RenderScript rs) { super(id, rs); } Loading Loading @@ -477,4 +525,3 @@ public class Script extends BaseObj { } }
rs/java/android/renderscript/ScriptIntrinsicBlur.java +1 −2 Original line number Diff line number Diff line Loading @@ -88,7 +88,7 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -109,4 +109,3 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic { return createFieldID(1, null); } }
rs/java/android/renderscript/ScriptIntrinsicConvolve3x3.java +1 −2 Original line number Diff line number Diff line Loading @@ -108,7 +108,7 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -130,4 +130,3 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic { } }
rs/java/android/renderscript/ScriptIntrinsicConvolve5x5.java +1 −2 Original line number Diff line number Diff line Loading @@ -109,7 +109,7 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic { * type. */ public void forEach(Allocation aout) { forEach(0, null, aout, null); forEach(0, (Allocation) null, aout, null); } /** Loading @@ -130,4 +130,3 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic { return createFieldID(1, null); } }