Skip to content

Most visited

Recently visited

navigation

ScriptIntrinsicBlend

public class ScriptIntrinsicBlend
extends ScriptIntrinsic

java.lang.Object
   ↳ android.support.v8.renderscript.BaseObj
     ↳ android.support.v8.renderscript.Script
       ↳ android.support.v8.renderscript.ScriptIntrinsic
         ↳ android.support.v8.renderscript.ScriptIntrinsicBlend


Intrinsic kernels for blending two Allocation objects.

Summary

Public methods

static ScriptIntrinsicBlend create(RenderScript rs, Element e)

Supported elements types are U8_4(RenderScript)

void forEachAdd(Allocation ain, Allocation aout)

Sets dst = min(src + dst, 1.0)

void forEachClear(Allocation ain, Allocation aout)

Sets dst = {0, 0, 0, 0}

void forEachDst(Allocation ain, Allocation aout)

Sets dst = dst This is a NOP.

void forEachDstAtop(Allocation ain, Allocation aout)

dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a Note: Before API 23, the alpha channel was not correctly set.

void forEachDstIn(Allocation ain, Allocation aout)

Sets dst = dst * src.a

void forEachDstOut(Allocation ain, Allocation aout)

Sets dst = dst * (1.0 - src.a)

void forEachDstOver(Allocation ain, Allocation aout)

Sets dst = dst + src * (1.0 - dst.a)

void forEachMultiply(Allocation ain, Allocation aout)

Sets dst = src * dst

void forEachSrc(Allocation ain, Allocation aout)

Sets dst = src

void forEachSrcAtop(Allocation ain, Allocation aout)

dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb dst.a = dst.a

void forEachSrcIn(Allocation ain, Allocation aout)

Sets dst = src * dst.a

void forEachSrcOut(Allocation ain, Allocation aout)

Sets dst = src * (1.0 - dst.a)

void forEachSrcOver(Allocation ain, Allocation aout)

Sets dst = src + dst * (1.0 - src.a)

void forEachSubtract(Allocation ain, Allocation aout)

Sets dst = max(dst - src, 0.0)

void forEachXor(Allocation ain, Allocation aout)

Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}

Script.KernelID getKernelIDAdd()

Get a KernelID for the Add kernel.

Script.KernelID getKernelIDClear()

Get a KernelID for the Clear kernel.

Script.KernelID getKernelIDDst()

Get a KernelID for the Dst kernel.

Script.KernelID getKernelIDDstAtop()

Get a KernelID for the DstAtop kernel.

Script.KernelID getKernelIDDstIn()

Get a KernelID for the DstIn kernel.

Script.KernelID getKernelIDDstOut()

Get a KernelID for the DstOut kernel.

Script.KernelID getKernelIDDstOver()

Get a KernelID for the DstOver kernel.

Script.KernelID getKernelIDMultiply()

Get a KernelID for the Multiply kernel.

Script.KernelID getKernelIDSrc()

Get a KernelID for the Src kernel.

Script.KernelID getKernelIDSrcAtop()

Get a KernelID for the SrcAtop kernel.

Script.KernelID getKernelIDSrcIn()

Get a KernelID for the SrcIn kernel.

Script.KernelID getKernelIDSrcOut()

Get a KernelID for the SrcOut kernel.

Script.KernelID getKernelIDSrcOver()

Get a KernelID for the SrcOver kernel.

Script.KernelID getKernelIDSubtract()

Get a KernelID for the Subtract kernel.

Script.KernelID getKernelIDXor()

Get a KernelID for the Xor kernel.

Inherited methods

From class android.support.v8.renderscript.Script
From class android.support.v8.renderscript.BaseObj
From class java.lang.Object

Public methods

create

added in version 23.0.0
ScriptIntrinsicBlend create (RenderScript rs, 
                Element e)

Supported elements types are U8_4(RenderScript)

Parameters
rs RenderScript: The RenderScript context

e Element: Element type for inputs and outputs

Returns
ScriptIntrinsicBlend ScriptIntrinsicBlend

forEachAdd

added in version 23.0.0
void forEachAdd (Allocation ain, 
                Allocation aout)

Sets dst = min(src + dst, 1.0)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachClear

added in version 23.0.0
void forEachClear (Allocation ain, 
                Allocation aout)

Sets dst = {0, 0, 0, 0}

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachDst

added in version 23.0.0
void forEachDst (Allocation ain, 
                Allocation aout)

Sets dst = dst This is a NOP.

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachDstAtop

added in version 23.0.0
void forEachDstAtop (Allocation ain, 
                Allocation aout)

dst = dst.rgb * src.a + (1.0 - dst.a) * src.rgb dst.a = src.a Note: Before API 23, the alpha channel was not correctly set. Please use with caution when targeting older APIs.

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachDstIn

added in version 23.0.0
void forEachDstIn (Allocation ain, 
                Allocation aout)

Sets dst = dst * src.a

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachDstOut

added in version 23.0.0
void forEachDstOut (Allocation ain, 
                Allocation aout)

Sets dst = dst * (1.0 - src.a)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachDstOver

added in version 23.0.0
void forEachDstOver (Allocation ain, 
                Allocation aout)

Sets dst = dst + src * (1.0 - dst.a)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachMultiply

added in version 23.0.0
void forEachMultiply (Allocation ain, 
                Allocation aout)

Sets dst = src * dst

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSrc

added in version 23.0.0
void forEachSrc (Allocation ain, 
                Allocation aout)

Sets dst = src

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSrcAtop

added in version 23.0.0
void forEachSrcAtop (Allocation ain, 
                Allocation aout)

dst.rgb = src.rgb * dst.a + (1.0 - src.a) * dst.rgb dst.a = dst.a

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSrcIn

added in version 23.0.0
void forEachSrcIn (Allocation ain, 
                Allocation aout)

Sets dst = src * dst.a

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSrcOut

added in version 23.0.0
void forEachSrcOut (Allocation ain, 
                Allocation aout)

Sets dst = src * (1.0 - dst.a)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSrcOver

added in version 23.0.0
void forEachSrcOver (Allocation ain, 
                Allocation aout)

Sets dst = src + dst * (1.0 - src.a)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachSubtract

added in version 23.0.0
void forEachSubtract (Allocation ain, 
                Allocation aout)

Sets dst = max(dst - src, 0.0)

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

forEachXor

added in version 23.0.0
void forEachXor (Allocation ain, 
                Allocation aout)

Sets dst = {src.r ^ dst.r, src.g ^ dst.g, src.b ^ dst.b, src.a ^ dst.a}

Parameters
ain Allocation: The source buffer

aout Allocation: The destination buffer

getKernelIDAdd

added in version 23.0.0
Script.KernelID getKernelIDAdd ()

Get a KernelID for the Add kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDClear

added in version 23.0.0
Script.KernelID getKernelIDClear ()

Get a KernelID for the Clear kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDst

added in version 23.0.0
Script.KernelID getKernelIDDst ()

Get a KernelID for the Dst kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstAtop

added in version 23.0.0
Script.KernelID getKernelIDDstAtop ()

Get a KernelID for the DstAtop kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstIn

added in version 23.0.0
Script.KernelID getKernelIDDstIn ()

Get a KernelID for the DstIn kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstOut

added in version 23.0.0
Script.KernelID getKernelIDDstOut ()

Get a KernelID for the DstOut kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDDstOver

added in version 23.0.0
Script.KernelID getKernelIDDstOver ()

Get a KernelID for the DstOver kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDMultiply

added in version 23.0.0
Script.KernelID getKernelIDMultiply ()

Get a KernelID for the Multiply kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrc

added in version 23.0.0
Script.KernelID getKernelIDSrc ()

Get a KernelID for the Src kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcAtop

added in version 23.0.0
Script.KernelID getKernelIDSrcAtop ()

Get a KernelID for the SrcAtop kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcIn

added in version 23.0.0
Script.KernelID getKernelIDSrcIn ()

Get a KernelID for the SrcIn kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcOut

added in version 23.0.0
Script.KernelID getKernelIDSrcOut ()

Get a KernelID for the SrcOut kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSrcOver

added in version 23.0.0
Script.KernelID getKernelIDSrcOver ()

Get a KernelID for the SrcOver kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDSubtract

added in version 23.0.0
Script.KernelID getKernelIDSubtract ()

Get a KernelID for the Subtract kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

getKernelIDXor

added in version 23.0.0
Script.KernelID getKernelIDXor ()

Get a KernelID for the Xor kernel.

Returns
Script.KernelID Script.KernelID The KernelID object.

This site uses cookies to store your preferences for site-specific language and display options.

Get the latest Android developer news and tips that will help you find success on Google Play.

* Required Fields

Hooray!

Follow Google Developers on WeChat

Browse this site in ?

You requested a page in , but your language preference for this site is .

Would you like to change your language preference and browse this site in ? If you want to change your language preference later, use the language menu at the bottom of each page.

This class requires API level or higher

This doc is hidden because your selected API level for the documentation is . You can change the documentation API level with the selector above the left navigation.

For more information about specifying the API level your app requires, read Supporting Different Platform Versions.

Take a short survey?
Help us improve the Android developer experience.
(Sep 2017 survey)