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

Commit ec6221e5 authored by Jason Sams's avatar Jason Sams Committed by Android (Google) Code Review
Browse files

Merge "Add 2,3 vectors to allowed intrinsic list."

parents a3664247 d93fdb77
Loading
Loading
Loading
Loading
+8 −1
Original line number Diff line number Diff line
@@ -31,7 +31,10 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
    }

    /**
     * Supported elements types are {@link Element#U8_4}
     * Supported elements types are {@link Element#U8}, {@link
     * Element#U8_2}, {@link Element#U8_3}, {@link Element#U8_4},
     * {@link Element#F32}, {@link Element#F32_2}, {@link
     * Element#F32_3}, and {@link Element#F32_4}
     *
     * The default coefficients are.
     *
@@ -49,8 +52,12 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic {
    public static ScriptIntrinsicConvolve3x3 create(RenderScript rs, Element e) {
        float f[] = { 0, 0, 0, 0, 1, 0, 0, 0, 0};
        if (!e.isCompatible(Element.U8(rs)) &&
            !e.isCompatible(Element.U8_2(rs)) &&
            !e.isCompatible(Element.U8_3(rs)) &&
            !e.isCompatible(Element.U8_4(rs)) &&
            !e.isCompatible(Element.F32(rs)) &&
            !e.isCompatible(Element.F32_2(rs)) &&
            !e.isCompatible(Element.F32_3(rs)) &&
            !e.isCompatible(Element.F32_4(rs))) {
            throw new RSIllegalArgumentException("Unsuported element type.");
        }
+8 −1
Original line number Diff line number Diff line
@@ -31,7 +31,10 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
    }

    /**
     * Supported elements types are {@link Element#U8_4}
     * Supported elements types are {@link Element#U8}, {@link
     * Element#U8_2}, {@link Element#U8_3}, {@link Element#U8_4},
     * {@link Element#F32}, {@link Element#F32_2}, {@link
     * Element#F32_3}, and {@link Element#F32_4}
     *
     * The default coefficients are.
     * <code>
@@ -49,8 +52,12 @@ public final class ScriptIntrinsicConvolve5x5 extends ScriptIntrinsic {
     */
    public static ScriptIntrinsicConvolve5x5 create(RenderScript rs, Element e) {
        if (!e.isCompatible(Element.U8(rs)) &&
            !e.isCompatible(Element.U8_2(rs)) &&
            !e.isCompatible(Element.U8_3(rs)) &&
            !e.isCompatible(Element.U8_4(rs)) &&
            !e.isCompatible(Element.F32(rs)) &&
            !e.isCompatible(Element.F32_2(rs)) &&
            !e.isCompatible(Element.F32_3(rs)) &&
            !e.isCompatible(Element.F32_4(rs))) {
            throw new RSIllegalArgumentException("Unsuported element type.");
        }