RenderScript: implement a Script entry point for calling a
reduce-style kernel. Bug: 22631253 This adds a new (currently hidden) API to the Script class and the corresponding code for the RenderScript JNI layer. Change-Id: I40f19aaeb90411b859bd6b0bffc3f071fa327c21
This commit is contained in:
@@ -31,6 +31,8 @@ import android.os.SystemProperties;
|
||||
import android.os.Trace;
|
||||
import java.util.ArrayList;
|
||||
|
||||
// TODO: Clean up the whitespace that separates methods in this class.
|
||||
|
||||
/**
|
||||
* This class provides access to a RenderScript context, which controls RenderScript
|
||||
* initialization, resource management, and teardown. An instance of the RenderScript
|
||||
@@ -727,6 +729,14 @@ public class RenderScript {
|
||||
rsnScriptForEach(mContext, id, slot, ains, aout, params, limits);
|
||||
}
|
||||
|
||||
native void rsnScriptReduce(long con, long id, int slot, long ain,
|
||||
long aout, int[] limits);
|
||||
synchronized void nScriptReduce(long id, int slot, long ain, long aout,
|
||||
int[] limits) {
|
||||
validate();
|
||||
rsnScriptReduce(mContext, id, slot, ain, aout, limits);
|
||||
}
|
||||
|
||||
native void rsnScriptInvokeV(long con, long id, int slot, byte[] params);
|
||||
synchronized void nScriptInvokeV(long id, int slot, byte[] params) {
|
||||
validate();
|
||||
|
||||
Reference in New Issue
Block a user