Adds invocable functions to ScriptGroup

This also includes InvokeID support

Change-Id: I5b59df166ea30b309b8dd9623825ac0e72d03856
This commit is contained in:
Yang Ni
2015-01-23 17:16:02 -08:00
parent 240e874397
commit be392ad35e
5 changed files with 439 additions and 3 deletions

View File

@@ -313,6 +313,15 @@ public class RenderScript {
sizes, depClosures, depFieldIDs);
}
native long rsnInvokeClosureCreate(long con, long invokeID, byte[] params,
long[] fieldIDs, long[] values, int[] sizes);
synchronized long nInvokeClosureCreate(long invokeID, byte[] params,
long[] fieldIDs, long[] values, int[] sizes) {
validate();
return rsnInvokeClosureCreate(mContext, invokeID, params, fieldIDs,
values, sizes);
}
native void rsnClosureSetArg(long con, long closureID, int index,
long value, int size);
synchronized void nClosureSetArg(long closureID, int index, long value,
@@ -745,6 +754,12 @@ public class RenderScript {
return rsnScriptKernelIDCreate(mContext, sid, slot, sig);
}
native long rsnScriptInvokeIDCreate(long con, long sid, int slot);
synchronized long nScriptInvokeIDCreate(long sid, int slot) {
validate();
return rsnScriptInvokeIDCreate(mContext, sid, slot);
}
native long rsnScriptFieldIDCreate(long con, long sid, int slot);
synchronized long nScriptFieldIDCreate(long sid, int slot) {
validate();