#include <rsCppStructs.h>
Data Structures | |
class | Builder |
Public Member Functions | |
size_t | getSubElementCount () |
sp< const Element > | getSubElement (uint32_t index) |
const char * | getSubElementName (uint32_t index) |
size_t | getSubElementArraySize (uint32_t index) |
uint32_t | getSubElementOffsetBytes (uint32_t index) |
RsDataType | getDataType () const |
RsDataKind | getDataKind () const |
size_t | getSizeBytes () const |
uint32_t | getVectorSize () const |
bool | isCompatible (sp< const Element >e) const |
Static Public Member Functions | |
static sp< const Element > | BOOLEAN (sp< RS > rs) |
static sp< const Element > | U8 (sp< RS > rs) |
static sp< const Element > | I8 (sp< RS > rs) |
static sp< const Element > | U16 (sp< RS > rs) |
static sp< const Element > | I16 (sp< RS > rs) |
static sp< const Element > | U32 (sp< RS > rs) |
static sp< const Element > | I32 (sp< RS > rs) |
static sp< const Element > | U64 (sp< RS > rs) |
static sp< const Element > | I64 (sp< RS > rs) |
static sp< const Element > | F32 (sp< RS > rs) |
static sp< const Element > | F64 (sp< RS > rs) |
static sp< const Element > | ELEMENT (sp< RS > rs) |
static sp< const Element > | TYPE (sp< RS > rs) |
static sp< const Element > | ALLOCATION (sp< RS > rs) |
static sp< const Element > | SAMPLER (sp< RS > rs) |
static sp< const Element > | SCRIPT (sp< RS > rs) |
static sp< const Element > | A_8 (sp< RS > rs) |
static sp< const Element > | RGB_565 (sp< RS > rs) |
static sp< const Element > | RGB_888 (sp< RS > rs) |
static sp< const Element > | RGBA_5551 (sp< RS > rs) |
static sp< const Element > | RGBA_4444 (sp< RS > rs) |
static sp< const Element > | RGBA_8888 (sp< RS > rs) |
static sp< const Element > | F32_2 (sp< RS > rs) |
static sp< const Element > | F32_3 (sp< RS > rs) |
static sp< const Element > | F32_4 (sp< RS > rs) |
static sp< const Element > | F64_2 (sp< RS > rs) |
static sp< const Element > | F64_3 (sp< RS > rs) |
static sp< const Element > | F64_4 (sp< RS > rs) |
static sp< const Element > | U8_2 (sp< RS > rs) |
static sp< const Element > | U8_3 (sp< RS > rs) |
static sp< const Element > | U8_4 (sp< RS > rs) |
static sp< const Element > | I8_2 (sp< RS > rs) |
static sp< const Element > | I8_3 (sp< RS > rs) |
static sp< const Element > | I8_4 (sp< RS > rs) |
static sp< const Element > | U16_2 (sp< RS > rs) |
static sp< const Element > | U16_3 (sp< RS > rs) |
static sp< const Element > | U16_4 (sp< RS > rs) |
static sp< const Element > | I16_2 (sp< RS > rs) |
static sp< const Element > | I16_3 (sp< RS > rs) |
static sp< const Element > | I16_4 (sp< RS > rs) |
static sp< const Element > | U32_2 (sp< RS > rs) |
static sp< const Element > | U32_3 (sp< RS > rs) |
static sp< const Element > | U32_4 (sp< RS > rs) |
static sp< const Element > | I32_2 (sp< RS > rs) |
static sp< const Element > | I32_3 (sp< RS > rs) |
static sp< const Element > | I32_4 (sp< RS > rs) |
static sp< const Element > | U64_2 (sp< RS > rs) |
static sp< const Element > | U64_3 (sp< RS > rs) |
static sp< const Element > | U64_4 (sp< RS > rs) |
static sp< const Element > | I64_2 (sp< RS > rs) |
static sp< const Element > | I64_3 (sp< RS > rs) |
static sp< const Element > | I64_4 (sp< RS > rs) |
static sp< const Element > | YUV (sp< RS > rs) |
static sp< const Element > | MATRIX_4X4 (sp< RS > rs) |
static sp< const Element > | MATRIX_3X3 (sp< RS > rs) |
static sp< const Element > | MATRIX_2X2 (sp< RS > rs) |
static sp< const Element > | createUser (sp< RS > rs, RsDataType dt) |
static sp< const Element > | createVector (sp< RS > rs, RsDataType dt, uint32_t size) |
static sp< const Element > | createPixel (sp< RS > rs, RsDataType dt, RsDataKind dk) |
An Element represents one item within an Allocation. An Element is roughly equivalent to a C type in a RenderScript kernel. Elements may be basic or complex. Some basic elements are:
Basic Elements are comprised of a Element.DataType and a Element.DataKind. The DataType encodes C type information of an Element, while the DataKind encodes how that Element should be interpreted by a Sampler. Note that Allocation objects with DataKind USER cannot be used as input for a Sampler. In general, Allocation objects that are intended for use with a Sampler should use bitmap-derived Elements such as Element::RGBA_8888.
Definition at line 584 of file rsCppStructs.h.
Utility function for returning an Element containing a single Allocation.
[in] | rs | RenderScript context |
RsDataKind android::RSC::Element::getDataKind | ( | ) | const [inline] |
Returns the data kind used for the Element.
Definition at line 641 of file rsCppStructs.h.
RsDataType android::RSC::Element::getDataType | ( | ) | const [inline] |
Returns the data type used for the Element.
Definition at line 633 of file rsCppStructs.h.
size_t android::RSC::Element::getSizeBytes | ( | ) | const [inline] |
Returns the size in bytes of the Element.
Definition at line 649 of file rsCppStructs.h.
sp<const Element> android::RSC::Element::getSubElement | ( | uint32_t | index | ) |
For complex Elements, this returns the sub-element at a given index.
[in] | index | index of sub-element |
size_t android::RSC::Element::getSubElementArraySize | ( | uint32_t | index | ) |
For complex Elements, this returns the size of the sub-element at a given index.
[in] | index | index of sub-element |
size_t android::RSC::Element::getSubElementCount | ( | ) | [inline] |
Elements could be simple, such as an int or a float, or a structure with multiple sub-elements, such as a collection of floats, float2, float4. This function returns zero for simple elements or the number of sub-elements otherwise.
Definition at line 595 of file rsCppStructs.h.
const char* android::RSC::Element::getSubElementName | ( | uint32_t | index | ) |
For complex Elements, this returns the name of the sub-element at a given index.
[in] | index | index of sub-element |
uint32_t android::RSC::Element::getSubElementOffsetBytes | ( | uint32_t | index | ) |
Returns the location of a sub-element within a complex Element.
[in] | index | index of sub-element |
uint32_t android::RSC::Element::getVectorSize | ( | ) | const [inline] |
Returns the number of vector components for this Element.
Definition at line 657 of file rsCppStructs.h.
bool android::RSC::Element::isCompatible | ( | sp< const Element > | e | ) | const |