Scriptpublic class Script extends BaseObj The parent class for all executable scripts. This should not be used by
applications. |
Fields Summary |
---|
ScriptCThunker | mT | private final android.util.SparseArray | mKIDs | private final android.util.SparseArray | mFIDs |
Methods Summary |
---|
public void | bindAllocation(Allocation va, int slot)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkBindAllocation(va, slot);
return;
}
mRS.validate();
if (va != null) {
mRS.nScriptBindAllocation(getID(mRS), va.getID(mRS), slot);
} else {
mRS.nScriptBindAllocation(getID(mRS), 0, slot);
}
| protected android.support.v8.renderscript.Script$FieldID | createFieldID(int slot, Element e)Only to be used by generated reflected classes.
// Any thunking caller to createFieldID must create its own native IDs
// except ScriptC
if (mRS.isNative == true) {
FieldID f = new FieldID(0, mRS, this, slot);
if (mT != null) {
f.mN = mT.thunkCreateFieldID(slot, e);
}
mFIDs.put(slot, f);
return f;
}
FieldID f = mFIDs.get(slot);
if (f != null) {
return f;
}
int id = mRS.nScriptFieldIDCreate(getID(mRS), slot);
if (id == 0) {
throw new RSDriverException("Failed to create FieldID");
}
f = new FieldID(id, mRS, this, slot);
mFIDs.put(slot, f);
return f;
| protected android.support.v8.renderscript.Script$KernelID | createKernelID(int slot, int sig, Element ein, Element eout)Only to be used by generated reflected classes.
KernelID k = mKIDs.get(slot);
if (k != null) {
return k;
}
// Any native callers to createKernelID must initialize their own native IDs
// excpet ScriptCThunker
if (mRS.isNative == true) {
k = new KernelID(0, mRS, this, slot, sig);
if (mT != null) {
k.mN = mT.thunkCreateKernelID(slot, sig, ein, eout);
}
mKIDs.put(slot, k);
return k;
}
int id = mRS.nScriptKernelIDCreate(getID(mRS), slot, sig);
if (id == 0) {
throw new RSDriverException("Failed to create KernelID");
}
k = new KernelID(id, mRS, this, slot, sig);
mKIDs.put(slot, k);
return k;
| protected void | forEach(int slot, Allocation ain, Allocation aout, FieldPacker v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkForEach(slot, ain, aout, v);
return;
}
if (ain == null && aout == null) {
throw new RSIllegalArgumentException(
"At least one of ain or aout is required to be non-null.");
}
int in_id = 0;
if (ain != null) {
in_id = ain.getID(mRS);
}
int out_id = 0;
if (aout != null) {
out_id = aout.getID(mRS);
}
byte[] params = null;
if (v != null) {
params = v.getData();
}
mRS.nScriptForEach(getID(mRS), slot, in_id, out_id, params);
| protected void | forEach(int slot, Allocation ain, Allocation aout, FieldPacker v, android.support.v8.renderscript.Script$LaunchOptions sc)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkForEach(slot, ain, aout, v, sc);
return;
}
if (ain == null && aout == null) {
throw new RSIllegalArgumentException(
"At least one of ain or aout is required to be non-null.");
}
if (sc == null) {
forEach(slot, ain, aout, v);
return;
}
int in_id = 0;
if (ain != null) {
in_id = ain.getID(mRS);
}
int out_id = 0;
if (aout != null) {
out_id = aout.getID(mRS);
}
byte[] params = null;
if (v != null) {
params = v.getData();
}
mRS.nScriptForEachClipped(getID(mRS), slot, in_id, out_id, params, sc.xstart, sc.xend, sc.ystart, sc.yend, sc.zstart, sc.zend);
| android.renderscript.Script | getNObj()
return mT;
| protected void | invoke(int slot)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkInvoke(slot);
return;
}
mRS.nScriptInvoke(getID(mRS), slot);
| protected void | invoke(int slot, FieldPacker v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkInvoke(slot, v);
return;
}
if (v != null) {
mRS.nScriptInvokeV(getID(mRS), slot, v.getData());
} else {
mRS.nScriptInvoke(getID(mRS), slot);
}
| public void | setTimeZone(java.lang.String timeZone)
if (mT != null) {
mT.thunkSetTimeZone(timeZone);
return;
}
mRS.validate();
try {
mRS.nScriptSetTimeZone(getID(mRS), timeZone.getBytes("UTF-8"));
} catch (java.io.UnsupportedEncodingException e) {
throw new RuntimeException(e);
}
| public void | setVar(int index, float v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarF(getID(mRS), index, v);
| public void | setVar(int index, double v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarD(getID(mRS), index, v);
| public void | setVar(int index, int v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarI(getID(mRS), index, v);
| public void | setVar(int index, long v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarJ(getID(mRS), index, v);
| public void | setVar(int index, boolean v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarI(getID(mRS), index, v ? 1 : 0);
| public void | setVar(int index, BaseObj o)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, o);
return;
}
mRS.nScriptSetVarObj(getID(mRS), index, (o == null) ? 0 : o.getID(mRS));
| public void | setVar(int index, FieldPacker v)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v);
return;
}
mRS.nScriptSetVarV(getID(mRS), index, v.getData());
| public void | setVar(int index, FieldPacker v, Element e, int[] dims)Only intended for use by generated reflected code.
if (mT != null) {
mT.thunkSetVar(index, v, e, dims);
return;
}
mRS.nScriptSetVarVE(getID(mRS), index, v.getData(), e.getID(mRS), dims);
|
|