Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 3c0618be authored by Stephen Hines's avatar Stephen Hines Committed by Android (Google) Code Review
Browse files

Merge "Add support for more vector types to RS."

parents fd0ffd2a 836c4a58
Loading
Loading
Loading
Loading
+26 −0
Original line number Diff line number Diff line
@@ -16665,10 +16665,25 @@ package android.renderscript {
    method public static android.renderscript.Element F32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element F64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element I8_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX4X4(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_2X2(android.renderscript.RenderScript);
    method public static android.renderscript.Element MATRIX_3X3(android.renderscript.RenderScript);
@@ -16687,9 +16702,20 @@ package android.renderscript {
    method public static android.renderscript.Element SCRIPT(android.renderscript.RenderScript);
    method public static android.renderscript.Element TYPE(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U16_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U32_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U64_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_2(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_3(android.renderscript.RenderScript);
    method public static android.renderscript.Element U8_4(android.renderscript.RenderScript);
    method public static android.renderscript.Element createPixel(android.renderscript.RenderScript, android.renderscript.Element.DataType, android.renderscript.Element.DataKind);
    method public static android.renderscript.Element createVector(android.renderscript.RenderScript, android.renderscript.Element.DataType, int);
+1 −1
Original line number Diff line number Diff line
@@ -79,7 +79,7 @@ public class Allocation extends BaseObj {

    /**
     * GRAPHICS_TEXTURE The allcation will be used as a texture
     * source by one or more graphcics programs.
     * source by one or more graphics programs.
     *
     */
    public static final int USAGE_GRAPHICS_TEXTURE = 0x0002;
+182 −0
Original line number Diff line number Diff line
@@ -383,6 +383,41 @@ public class Element extends BaseObj {
        return rs.mElement_FLOAT_4;
    }

    public static Element F64_2(RenderScript rs) {
        if(rs.mElement_DOUBLE_2 == null) {
            rs.mElement_DOUBLE_2 = createVector(rs, DataType.FLOAT_64, 2);
        }
        return rs.mElement_DOUBLE_2;
    }

    public static Element F64_3(RenderScript rs) {
        if(rs.mElement_DOUBLE_3 == null) {
            rs.mElement_DOUBLE_3 = createVector(rs, DataType.FLOAT_64, 3);
        }
        return rs.mElement_DOUBLE_3;
    }

    public static Element F64_4(RenderScript rs) {
        if(rs.mElement_DOUBLE_4 == null) {
            rs.mElement_DOUBLE_4 = createVector(rs, DataType.FLOAT_64, 4);
        }
        return rs.mElement_DOUBLE_4;
    }

    public static Element U8_2(RenderScript rs) {
        if(rs.mElement_UCHAR_2 == null) {
            rs.mElement_UCHAR_2 = createVector(rs, DataType.UNSIGNED_8, 2);
        }
        return rs.mElement_UCHAR_2;
    }

    public static Element U8_3(RenderScript rs) {
        if(rs.mElement_UCHAR_3 == null) {
            rs.mElement_UCHAR_3 = createVector(rs, DataType.UNSIGNED_8, 3);
        }
        return rs.mElement_UCHAR_3;
    }

    public static Element U8_4(RenderScript rs) {
        if(rs.mElement_UCHAR_4 == null) {
            rs.mElement_UCHAR_4 = createVector(rs, DataType.UNSIGNED_8, 4);
@@ -390,6 +425,153 @@ public class Element extends BaseObj {
        return rs.mElement_UCHAR_4;
    }

    public static Element I8_2(RenderScript rs) {
        if(rs.mElement_CHAR_2 == null) {
            rs.mElement_CHAR_2 = createVector(rs, DataType.SIGNED_8, 2);
        }
        return rs.mElement_CHAR_2;
    }

    public static Element I8_3(RenderScript rs) {
        if(rs.mElement_CHAR_3 == null) {
            rs.mElement_CHAR_3 = createVector(rs, DataType.SIGNED_8, 3);
        }
        return rs.mElement_CHAR_3;
    }

    public static Element I8_4(RenderScript rs) {
        if(rs.mElement_CHAR_4 == null) {
            rs.mElement_CHAR_4 = createVector(rs, DataType.SIGNED_8, 4);
        }
        return rs.mElement_CHAR_4;
    }

    public static Element U16_2(RenderScript rs) {
        if(rs.mElement_USHORT_2 == null) {
            rs.mElement_USHORT_2 = createVector(rs, DataType.UNSIGNED_16, 2);
        }
        return rs.mElement_USHORT_2;
    }

    public static Element U16_3(RenderScript rs) {
        if(rs.mElement_USHORT_3 == null) {
            rs.mElement_USHORT_3 = createVector(rs, DataType.UNSIGNED_16, 3);
        }
        return rs.mElement_USHORT_3;
    }

    public static Element U16_4(RenderScript rs) {
        if(rs.mElement_USHORT_4 == null) {
            rs.mElement_USHORT_4 = createVector(rs, DataType.UNSIGNED_16, 4);
        }
        return rs.mElement_USHORT_4;
    }

    public static Element I16_2(RenderScript rs) {
        if(rs.mElement_SHORT_2 == null) {
            rs.mElement_SHORT_2 = createVector(rs, DataType.SIGNED_16, 2);
        }
        return rs.mElement_SHORT_2;
    }

    public static Element I16_3(RenderScript rs) {
        if(rs.mElement_SHORT_3 == null) {
            rs.mElement_SHORT_3 = createVector(rs, DataType.SIGNED_16, 3);
        }
        return rs.mElement_SHORT_3;
    }

    public static Element I16_4(RenderScript rs) {
        if(rs.mElement_SHORT_4 == null) {
            rs.mElement_SHORT_4 = createVector(rs, DataType.SIGNED_16, 4);
        }
        return rs.mElement_SHORT_4;
    }

    public static Element U32_2(RenderScript rs) {
        if(rs.mElement_UINT_2 == null) {
            rs.mElement_UINT_2 = createVector(rs, DataType.UNSIGNED_32, 2);
        }
        return rs.mElement_UINT_2;
    }

    public static Element U32_3(RenderScript rs) {
        if(rs.mElement_UINT_3 == null) {
            rs.mElement_UINT_3 = createVector(rs, DataType.UNSIGNED_32, 3);
        }
        return rs.mElement_UINT_3;
    }

    public static Element U32_4(RenderScript rs) {
        if(rs.mElement_UINT_4 == null) {
            rs.mElement_UINT_4 = createVector(rs, DataType.UNSIGNED_32, 4);
        }
        return rs.mElement_UINT_4;
    }

    public static Element I32_2(RenderScript rs) {
        if(rs.mElement_INT_2 == null) {
            rs.mElement_INT_2 = createVector(rs, DataType.SIGNED_32, 2);
        }
        return rs.mElement_INT_2;
    }

    public static Element I32_3(RenderScript rs) {
        if(rs.mElement_INT_3 == null) {
            rs.mElement_INT_3 = createVector(rs, DataType.SIGNED_32, 3);
        }
        return rs.mElement_INT_3;
    }

    public static Element I32_4(RenderScript rs) {
        if(rs.mElement_INT_4 == null) {
            rs.mElement_INT_4 = createVector(rs, DataType.SIGNED_32, 4);
        }
        return rs.mElement_INT_4;
    }

    public static Element U64_2(RenderScript rs) {
        if(rs.mElement_ULONG_2 == null) {
            rs.mElement_ULONG_2 = createVector(rs, DataType.UNSIGNED_64, 2);
        }
        return rs.mElement_ULONG_2;
    }

    public static Element U64_3(RenderScript rs) {
        if(rs.mElement_ULONG_3 == null) {
            rs.mElement_ULONG_3 = createVector(rs, DataType.UNSIGNED_64, 3);
        }
        return rs.mElement_ULONG_3;
    }

    public static Element U64_4(RenderScript rs) {
        if(rs.mElement_ULONG_4 == null) {
            rs.mElement_ULONG_4 = createVector(rs, DataType.UNSIGNED_64, 4);
        }
        return rs.mElement_ULONG_4;
    }

    public static Element I64_2(RenderScript rs) {
        if(rs.mElement_LONG_2 == null) {
            rs.mElement_LONG_2 = createVector(rs, DataType.SIGNED_64, 2);
        }
        return rs.mElement_LONG_2;
    }

    public static Element I64_3(RenderScript rs) {
        if(rs.mElement_LONG_3 == null) {
            rs.mElement_LONG_3 = createVector(rs, DataType.SIGNED_64, 3);
        }
        return rs.mElement_LONG_3;
    }

    public static Element I64_4(RenderScript rs) {
        if(rs.mElement_LONG_4 == null) {
            rs.mElement_LONG_4 = createVector(rs, DataType.SIGNED_64, 4);
        }
        return rs.mElement_LONG_4;
    }

    public static Element MATRIX_4X4(RenderScript rs) {
        if(rs.mElement_MATRIX_4X4 == null) {
            rs.mElement_MATRIX_4X4 = createUser(rs, DataType.MATRIX_4X4);
+35 −0
Original line number Diff line number Diff line
@@ -613,8 +613,43 @@ public class RenderScript {
    Element mElement_FLOAT_2;
    Element mElement_FLOAT_3;
    Element mElement_FLOAT_4;

    Element mElement_DOUBLE_2;
    Element mElement_DOUBLE_3;
    Element mElement_DOUBLE_4;

    Element mElement_UCHAR_2;
    Element mElement_UCHAR_3;
    Element mElement_UCHAR_4;

    Element mElement_CHAR_2;
    Element mElement_CHAR_3;
    Element mElement_CHAR_4;

    Element mElement_USHORT_2;
    Element mElement_USHORT_3;
    Element mElement_USHORT_4;

    Element mElement_SHORT_2;
    Element mElement_SHORT_3;
    Element mElement_SHORT_4;

    Element mElement_UINT_2;
    Element mElement_UINT_3;
    Element mElement_UINT_4;

    Element mElement_INT_2;
    Element mElement_INT_3;
    Element mElement_INT_4;

    Element mElement_ULONG_2;
    Element mElement_ULONG_3;
    Element mElement_ULONG_4;

    Element mElement_LONG_2;
    Element mElement_LONG_3;
    Element mElement_LONG_4;

    Element mElement_MATRIX_4X4;
    Element mElement_MATRIX_3X3;
    Element mElement_MATRIX_2X2;