java.lang.Object | ||
↳ | android.support.v8.renderscript.BaseObj | |
↳ | android.support.v8.renderscript.Type |
A Type describes the Element
and
dimensions used for an Allocation
or
a parallel operation. Types are created through
Type.Builder
.
A Type always includes an Element
and an X dimension. A Type may be multidimensional, up to three dimensions.
A nonzero value in the Y or Z dimensions indicates that the dimension is
present. Note that a Type with only a given X dimension and a Type with the
same X dimension but Y = 1 are not equivalent.
A Type also supports inclusion of level of detail (LOD) or cube map faces. LOD and cube map faces are booleans to indicate present or not present.
A Type also supports YUV format information to support an Allocation
in a YUV format. The YUV formats
supported are YV12
and NV21
.
For more information about creating an application that uses RenderScript, read the RenderScript developer guide.
Nested Classes | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Type.Builder | Builder class for Type. | ||||||||||
Type.CubemapFace |
Public Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
Utility function for creating basic 1D types.
| |||||||||||
Utility function for creating basic 2D types.
| |||||||||||
Utility function for creating basic 3D types.
| |||||||||||
Return the total number of accessable cells in the Type.
| |||||||||||
Return the element associated with this Type.
| |||||||||||
Return the value of the X dimension.
| |||||||||||
Return the value of the Y dimension or 0 for a 1D allocation.
| |||||||||||
Get the YUV format
| |||||||||||
Return the value of the Z dimension or 0 for a 1D or 2D allocation.
| |||||||||||
Return if the Type is a cube map.
| |||||||||||
Return if the Type has a mipmap chain.
|
[Expand]
Inherited Methods | |||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
From class
android.support.v8.renderscript.BaseObj
| |||||||||||
From class
java.lang.Object
|
Utility function for creating basic 1D types. The type is created without mipmaps enabled.
rs | The RenderScript context |
---|---|
e | The Element for the Type |
dimX | The X dimension, must be > 0 |
Utility function for creating basic 2D types. The type is created without mipmaps or cubemaps.
rs | The RenderScript context |
---|---|
e | The Element for the Type |
dimX | The X dimension, must be > 0 |
dimY | The Y dimension, must be > 0 |
Utility function for creating basic 3D types. The type is created without mipmaps.
rs | The RenderScript context |
---|---|
e | The Element for the Type |
dimX | The X dimension, must be > 0 |
dimY | The Y dimension, must be > 0 |
dimZ | The Z dimension, must be > 0 |
Return the total number of accessable cells in the Type.
Return the value of the X dimension.
Return the value of the Y dimension or 0 for a 1D allocation.
Get the YUV format
Return the value of the Z dimension or 0 for a 1D or 2D allocation.
Return if the Type is a cube map.
Return if the Type has a mipmap chain.