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

Commit 2d5664f6 authored by Yang Ni's avatar Yang Ni Committed by android-build-merger
Browse files

Merge "Validates Intrinsic Blur only takes 2D Allocations" am: b44f4d2f am:...

Merge "Validates Intrinsic Blur only takes 2D Allocations" am: b44f4d2f am: 0962a6e8 am: cfe40aa1
am: 5be70d01

Change-Id: Ie79dfe42049354c3bb60de9e9987fc8c75167f30
parents e36a8b4e 5be70d01
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -59,6 +59,9 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
     * @param ain The input allocation
     */
    public void setInput(Allocation ain) {
        if (ain.getType().getY() == 0) {
            throw new RSIllegalArgumentException("Input set to a 1D Allocation");
        }
        mInput = ain;
        setVar(1, ain);
    }
@@ -85,6 +88,9 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
     *             type.
     */
    public void forEach(Allocation aout) {
        if (aout.getType().getY() == 0) {
            throw new RSIllegalArgumentException("Output is a 1D Allocation");
        }
        forEach(0, (Allocation) null, aout, null);
    }

@@ -97,6 +103,9 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
     * @param opt LaunchOptions for clipping
     */
    public void forEach(Allocation aout, Script.LaunchOptions opt) {
        if (aout.getType().getY() == 0) {
            throw new RSIllegalArgumentException("Output is a 1D Allocation");
        }
        forEach(0, (Allocation) null, aout, null, opt);
    }