Add Float32 suppor for IntrinsicResize. base part.
Change-Id: I37e8826cfab92512cc641b106a42723162bffe58
diff --git a/rs/java/android/renderscript/ScriptIntrinsicResize.java b/rs/java/android/renderscript/ScriptIntrinsicResize.java
index d6764cc..cee4c33 100644
--- a/rs/java/android/renderscript/ScriptIntrinsicResize.java
+++ b/rs/java/android/renderscript/ScriptIntrinsicResize.java
@@ -29,6 +29,8 @@
/**
* Supported elements types are {@link Element#U8}, {@link
* Element#U8_2}, {@link Element#U8_3}, {@link Element#U8_4}
+ * {@link Element#F32}, {@link Element#F32_2}, {@link
+ * Element#F32_3}, {@link Element#F32_4}
*
* @param rs The RenderScript context
*
@@ -52,7 +54,11 @@
if (!e.isCompatible(Element.U8(mRS)) &&
!e.isCompatible(Element.U8_2(mRS)) &&
!e.isCompatible(Element.U8_3(mRS)) &&
- !e.isCompatible(Element.U8_4(mRS))) {
+ !e.isCompatible(Element.U8_4(mRS)) &&
+ !e.isCompatible(Element.F32(mRS)) &&
+ !e.isCompatible(Element.F32_2(mRS)) &&
+ !e.isCompatible(Element.F32_3(mRS)) &&
+ !e.isCompatible(Element.F32_4(mRS))) {
throw new RSIllegalArgumentException("Unsuported element type.");
}