summaryrefslogtreecommitdiffstats
path: root/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
diff options
context:
space:
mode:
authorMiao Wang <miaowang@google.com>2015-01-23 09:41:04 -0800
committerMiao Wang <miaowang@google.com>2015-01-23 19:15:57 +0000
commit8a1265384b0409ea0245d53e665c69426f6b7b2f (patch)
tree6d92bd4e20d71e773a6f71f2531e630aa2b00bb9 /rs/java/android/renderscript/ScriptIntrinsicHistogram.java
parent73500edb42d9270437e41ff2ddaa0cd6eacb422b (diff)
downloadframeworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.zip
frameworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.tar.gz
frameworks_base-8a1265384b0409ea0245d53e665c69426f6b7b2f.tar.bz2
[RenderScript] Allow U8_2 & U8_3 input allocation for Histogram
Intrinsic Bug: 19035242 Bug: 19124958 Change-Id: I9e806d7a0786e728c5f23607dc67ca5d755e12ed
Diffstat (limited to 'rs/java/android/renderscript/ScriptIntrinsicHistogram.java')
-rw-r--r--rs/java/android/renderscript/ScriptIntrinsicHistogram.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
index 4ecac99..f8c0c16 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicHistogram.java
@@ -92,8 +92,10 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
"Input vector size must be >= output vector size.");
}
if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_2(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_3(mRS)) &&
!ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
- throw new RSIllegalArgumentException("Input type must be U8 or U8_4.");
+ throw new RSIllegalArgumentException("Input type must be U8, U8_1, U8_2 or U8_4.");
}
forEach(0, ain, null, null, opt);
@@ -188,8 +190,10 @@ public final class ScriptIntrinsicHistogram extends ScriptIntrinsic {
throw new RSIllegalArgumentException("Output vector size must be one.");
}
if (!ain.getType().getElement().isCompatible(Element.U8(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_2(mRS)) &&
+ !ain.getType().getElement().isCompatible(Element.U8_3(mRS)) &&
!ain.getType().getElement().isCompatible(Element.U8_4(mRS))) {
- throw new RSIllegalArgumentException("Input type must be U8 or U8_4.");
+ throw new RSIllegalArgumentException("Input type must be U8, U8_1, U8_2 or U8_4.");
}
forEach(1, ain, null, null, opt);