Methods Summary |
---|
private void | blend(int id, Allocation ain, Allocation aout)
if (!ain.getElement().isCompatible(Element.U8_4(mRS))) {
throw new RSIllegalArgumentException("Input is not of expected format.");
}
if (!aout.getElement().isCompatible(Element.U8_4(mRS))) {
throw new RSIllegalArgumentException("Output is not of expected format.");
}
forEach(id, ain, aout, null);
|
public static android.support.v8.renderscript.ScriptIntrinsicBlend | create(RenderScript rs, Element e)Supported elements types are {@link Element#U8_4}
if (rs.isNative) {
RenderScriptThunker rst = (RenderScriptThunker) rs;
return ScriptIntrinsicBlendThunker.create(rs, e);
}
// 7 comes from RS_SCRIPT_INTRINSIC_ID_BLEND in rsDefines.h
int id = rs.nScriptIntrinsicCreate(7, e.getID(rs));
return new ScriptIntrinsicBlend(id, rs);
|
public void | forEachAdd(Allocation ain, Allocation aout)Sets dst = min(src + dst, 1.0)
blend(34, ain, aout);
|
public void | forEachClear(Allocation ain, Allocation aout)Sets dst = {0, 0, 0, 0}
blend(0, ain, aout);
|
public void | forEachDst(Allocation ain, Allocation aout)Sets dst = dst
This is a NOP.
// NOP
|
public void | forEachDstAtop(Allocation ain, Allocation aout)dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb
dst.a = src.a
blend(10, ain, aout);
|
public void | forEachDstIn(Allocation ain, Allocation aout)Sets dst = dst * src.a
blend(6, ain, aout);
|
public void | forEachDstOut(Allocation ain, Allocation aout)Sets dst = dst * (1.0 - src.a)
blend(8, ain, aout);
|
public void | forEachDstOver(Allocation ain, Allocation aout)Sets dst = dst + src * (1.0 - dst.a)
blend(4, ain, aout);
|
public void | forEachMultiply(Allocation ain, Allocation aout)Sets dst = src * dst
blend(14, ain, aout);
|
public void | forEachSrc(Allocation ain, Allocation aout)Sets dst = src
blend(1, ain, aout);
|
public void | forEachSrcAtop(Allocation ain, Allocation aout)dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb
dst.a = dst.a
blend(9, ain, aout);
|
public void | forEachSrcIn(Allocation ain, Allocation aout)Sets dst = src * dst.a
blend(5, ain, aout);
|
public void | forEachSrcOut(Allocation ain, Allocation aout)Sets dst = src * (1.0 - dst.a)
blend(7, ain, aout);
|
public void | forEachSrcOver(Allocation ain, Allocation aout)Sets dst = src + dst * (1.0 - src.a)
blend(3, ain, aout);
|
public void | forEachSubtract(Allocation ain, Allocation aout)Sets dst = max(dst - src, 0.0)
blend(35, ain, aout);
|
public void | forEachXor(Allocation ain, Allocation aout)Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}
blend(11, ain, aout);
|
public Script.KernelID | getKernelIDAdd()Get a KernelID for the Add kernel.
return createKernelID(34, 3, null, null);
|
public Script.KernelID | getKernelIDClear()Get a KernelID for the Clear kernel.
return createKernelID(0, 3, null, null);
|
public Script.KernelID | getKernelIDDst()Get a KernelID for the Dst kernel.
return createKernelID(2, 3, null, null);
|
public Script.KernelID | getKernelIDDstAtop()Get a KernelID for the DstAtop kernel.
return createKernelID(10, 3, null, null);
|
public Script.KernelID | getKernelIDDstIn()Get a KernelID for the DstIn kernel.
return createKernelID(6, 3, null, null);
|
public Script.KernelID | getKernelIDDstOut()Get a KernelID for the DstOut kernel.
return createKernelID(8, 3, null, null);
|
public Script.KernelID | getKernelIDDstOver()Get a KernelID for the DstOver kernel.
return createKernelID(4, 3, null, null);
|
public Script.KernelID | getKernelIDMultiply()Get a KernelID for the Multiply kernel.
return createKernelID(14, 3, null, null);
|
public Script.KernelID | getKernelIDSrc()Get a KernelID for the Src kernel.
return createKernelID(1, 3, null, null);
|
public Script.KernelID | getKernelIDSrcAtop()Get a KernelID for the SrcAtop kernel.
return createKernelID(9, 3, null, null);
|
public Script.KernelID | getKernelIDSrcIn()Get a KernelID for the SrcIn kernel.
return createKernelID(5, 3, null, null);
|
public Script.KernelID | getKernelIDSrcOut()Get a KernelID for the SrcOut kernel.
return createKernelID(7, 3, null, null);
|
public Script.KernelID | getKernelIDSrcOver()Get a KernelID for the SrcOver kernel.
return createKernelID(3, 3, null, null);
|
public Script.KernelID | getKernelIDSubtract()Get a KernelID for the Subtract kernel.
return createKernelID(35, 3, null, null);
|
public Script.KernelID | getKernelIDXor()Get a KernelID for the Xor kernel.
return createKernelID(11, 3, null, null);
|