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

Commit 966c86a3 authored by TreeHugger Robot's avatar TreeHugger Robot Committed by Android (Google) Code Review
Browse files

Merge "Add check for input allocation type for ScriptIntrinsicBlur."

parents 5f7df448 08d7d039
Loading
Loading
Loading
Loading
+4 −0
Original line number Diff line number Diff line
@@ -62,6 +62,10 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
        if (ain.getType().getY() == 0) {
            throw new RSIllegalArgumentException("Input set to a 1D Allocation");
        }
        Element e = ain.getElement();
        if ((!e.isCompatible(Element.U8_4(mRS))) && (!e.isCompatible(Element.U8(mRS)))) {
            throw new RSIllegalArgumentException("Unsupported element type.");
        }
        mInput = ain;
        setVar(1, ain);
    }