Add check for input allocation type for ScriptIntrinsicBlur.
Bug: 124466617 Test: mm Test: CtsRenderscriptTestCases Change-Id: I4784b96b5f96749d503bd1de8360e74b72f3f5c2
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user