Home | History | Annotate | Download | only in renderscript

Lines Matching refs:DataType

59     DataType mType;
101 * DataType represents the basic type information for a basic element. The
116 public enum DataType {
154 DataType(int id, int size) {
282 public DataType getDataType() {
302 rs.mElement_BOOLEAN = createUser(rs, DataType.BOOLEAN);
316 rs.mElement_U8 = createUser(rs, DataType.UNSIGNED_8);
330 rs.mElement_I8 = createUser(rs, DataType.SIGNED_8);
337 rs.mElement_U16 = createUser(rs, DataType.UNSIGNED_16);
344 rs.mElement_I16 = createUser(rs, DataType.SIGNED_16);
351 rs.mElement_U32 = createUser(rs, DataType.UNSIGNED_32);
358 rs.mElement_I32 = createUser(rs, DataType.SIGNED_32);
365 rs.mElement_U64 = createUser(rs, DataType.UNSIGNED_64);
372 rs.mElement_I64 = createUser(rs, DataType.SIGNED_64);
379 rs.mElement_F32 = createUser(rs, DataType.FLOAT_32);
386 rs.mElement_F64 = createUser(rs, DataType.FLOAT_64);
393 rs.mElement_ELEMENT = createUser(rs, DataType.RS_ELEMENT);
400 rs.mElement_TYPE = createUser(rs, DataType.RS_TYPE);
407 rs.mElement_ALLOCATION = createUser(rs, DataType.RS_ALLOCATION);
414 rs.mElement_SAMPLER = createUser(rs, DataType.RS_SAMPLER);
421 rs.mElement_SCRIPT = createUser(rs, DataType.RS_SCRIPT);
428 rs.mElement_MESH = createUser(rs, DataType.RS_MESH);
435 rs.mElement_PROGRAM_FRAGMENT = createUser(rs, DataType.RS_PROGRAM_FRAGMENT);
442 rs.mElement_PROGRAM_VERTEX = createUser(rs, DataType.RS_PROGRAM_VERTEX);
449 rs.mElement_PROGRAM_RASTER = createUser(rs, DataType.RS_PROGRAM_RASTER);
456 rs.mElement_PROGRAM_STORE = createUser(rs, DataType.RS_PROGRAM_STORE);
463 rs.mElement_FONT = createUser(rs, DataType.RS_FONT);
471 rs.mElement_A_8 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_A);
478 rs.mElement_RGB_565 = createPixel(rs, DataType.UNSIGNED_5_6_5, DataKind.PIXEL_RGB);
485 rs.mElement_RGB_888 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_RGB);
492 rs.mElement_RGBA_5551 = createPixel(rs, DataType.UNSIGNED_5_5_5_1, DataKind.PIXEL_RGBA);
499 rs.mElement_RGBA_4444 = createPixel(rs, DataType.UNSIGNED_4_4_4_4, DataKind.PIXEL_RGBA);
506 rs.mElement_RGBA_8888 = createPixel(rs, DataType.UNSIGNED_8, DataKind.PIXEL_RGBA);
513 rs.mElement_FLOAT_2 = createVector(rs, DataType.FLOAT_32, 2);
520 rs.mElement_FLOAT_3 = createVector(rs, DataType.FLOAT_32, 3);
527 rs.mElement_FLOAT_4 = createVector(rs, DataType.FLOAT_32, 4);
534 rs.mElement_DOUBLE_2 = createVector(rs, DataType.FLOAT_64, 2);
541 rs.mElement_DOUBLE_3 = createVector(rs, DataType.FLOAT_64, 3);
548 rs.mElement_DOUBLE_4 = createVector(rs, DataType.FLOAT_64, 4);
555 rs.mElement_UCHAR_2 = createVector(rs, DataType.UNSIGNED_8, 2);
562 rs.mElement_UCHAR_3 = createVector(rs, DataType.UNSIGNED_8, 3);
569 rs.mElement_UCHAR_4 = createVector(rs, DataType.UNSIGNED_8, 4);
576 rs.mElement_CHAR_2 = createVector(rs, DataType.SIGNED_8, 2);
583 rs.mElement_CHAR_3 = createVector(rs, DataType.SIGNED_8, 3);
590 rs.mElement_CHAR_4 = createVector(rs, DataType.SIGNED_8, 4);
597 rs.mElement_USHORT_2 = createVector(rs, DataType.UNSIGNED_16, 2);
604 rs.mElement_USHORT_3 = createVector(rs, DataType.UNSIGNED_16, 3);
611 rs.mElement_USHORT_4 = createVector(rs, DataType.UNSIGNED_16, 4);
618 rs.mElement_SHORT_2 = createVector(rs, DataType.SIGNED_16, 2);
625 rs.mElement_SHORT_3 = createVector(rs, DataType.SIGNED_16, 3);
632 rs.mElement_SHORT_4 = createVector(rs, DataType.SIGNED_16, 4);
639 rs.mElement_UINT_2 = createVector(rs, DataType.UNSIGNED_32, 2);
646 rs.mElement_UINT_3 = createVector(rs, DataType.UNSIGNED_32, 3);
653 rs.mElement_UINT_4 = createVector(rs, DataType.UNSIGNED_32, 4);
660 rs.mElement_INT_2 = createVector(rs, DataType.SIGNED_32, 2);
667 rs.mElement_INT_3 = createVector(rs, DataType.SIGNED_32, 3);
674 rs.mElement_INT_4 = createVector(rs, DataType.SIGNED_32, 4);
681 rs.mElement_ULONG_2 = createVector(rs, DataType.UNSIGNED_64, 2);
688 rs.mElement_ULONG_3 = createVector(rs, DataType.UNSIGNED_64, 3);
695 rs.mElement_ULONG_4 = createVector(rs, DataType.UNSIGNED_64, 4);
702 rs.mElement_LONG_2 = createVector(rs, DataType.SIGNED_64, 2);
709 rs.mElement_LONG_3 = createVector(rs, DataType.SIGNED_64, 3);
716 rs.mElement_LONG_4 = createVector(rs, DataType.SIGNED_64, 4);
723 rs.mElement_MATRIX_4X4 = createUser(rs, DataType.MATRIX_4X4);
736 rs.mElement_MATRIX_3X3 = createUser(rs, DataType.MATRIX_3X3);
743 rs.mElement_MATRIX_2X2 = createUser(rs, DataType.MATRIX_2X2);
755 mType = DataType.NONE;
765 Element(int id, RenderScript rs, DataType dt, DataKind dk, boolean norm, int size) {
767 if ((dt != DataType.UNSIGNED_5_6_5) &&
768 (dt != DataType.UNSIGNED_4_4_4_4) &&
769 (dt != DataType.UNSIGNED_5_5_5_1)) {
799 for (DataType dt: DataType.values()) {
831 * Create a custom Element of the specified DataType. The DataKind will be
835 * @param dt The DataType for the new element.
838 static Element createUser(RenderScript rs, DataType dt) {
847 * Create a custom vector element of the specified DataType and vector size.
853 * @param dt The DataType for the new Element.
859 public static Element createVector(RenderScript rs, DataType dt, int size) {
891 * Create a new pixel Element type. A matching DataType and DataKind must
892 * be provided. The DataType and DataKind must contain the same number of
896 * @param dt The DataType for the new element.
898 * DataType.
902 public static Element createPixel(RenderScript rs, DataType dt, DataKind dk) {
911 if (!(dt == DataType.UNSIGNED_8 ||
912 dt == DataType.UNSIGNED_16 ||
913 dt == DataType.UNSIGNED_5_6_5 ||
914 dt == DataType.UNSIGNED_4_4_4_4 ||
915 dt == DataType.UNSIGNED_5_5_5_1)) {
916 throw new RSIllegalArgumentException("Unsupported DataType");
918 if (dt == DataType.UNSIGNED_5_6_5 && dk != DataKind.PIXEL_RGB) {
921 if (dt == DataType.UNSIGNED_5_5_5_1 && dk != DataKind.PIXEL_RGBA) {
924 if (dt == DataType.UNSIGNED_4_4_4_4 && dk != DataKind.PIXEL_RGBA) {
927 if (dt == DataType.UNSIGNED_16 &&
975 (mType != DataType.NONE) &&