summaryrefslogtreecommitdiffstats
path: root/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
diff options
context:
space:
mode:
Diffstat (limited to 'rs/java/android/renderscript/ScriptIntrinsicHistogram.java')
-rw-r--r--rs/java/android/renderscript/ScriptIntrinsicHistogram.java12
1 files changed, 6 insertions, 6 deletions
diff --git a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
index 95b610a..4ecac99 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
@@ -91,9 +91,9 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
throw new RSIllegalArgumentException(
"Input vector size must be >= output vector size.");
}
- if (ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
- ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
- throw new RSIllegalArgumentException("Output type must be U32 or I32.");
+ if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
+ throw new RSIllegalArgumentException("Input type must be U8 or U8_4.");
}
forEach(0, ain, null, null, opt);
@@ -187,9 +187,9 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
if (mOut.getType().getElement().getVectorSize() != 1) {
throw new RSIllegalArgumentException("Output vector size must be one.");
}
- if (ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
- ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
- throw new RSIllegalArgumentException("Output type must be U32 or I32.");
+ if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
+ throw new RSIllegalArgumentException("Input type must be U8 or U8_4.");
}
forEach(1, ain, null, null, opt);