Skip to content
Snippets Groups Projects
Commit 67c59949 authored by Yang Ni's avatar Yang Ni
Browse files

Validates Intrinsic Blur only takes 2D Allocations

Bug: 24555166

Test: RSTest on x86_64 emulator
Change-Id: I0c8c970ce85989c3213fb4986e517ac0be5beb26
(cherry picked from commit bb671376)
parent 5d25f429
No related merge requests found
......@@ -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);
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment