diff options
| author | 2013-04-01 20:27:28 +0000 | |
|---|---|---|
| committer | 2013-04-01 20:27:28 +0000 | |
| commit | 4134ce3386e791bd2e024677197e36a3b4768dbb (patch) | |
| tree | 5026162ca5ef927facb1643c2ac4df824b1f5d8d | |
| parent | 53de5c296a579e9012d152f8a25c08f6f6091b3b (diff) | |
| parent | bddc7ffb5203602e6e84941b1840aef5d606bcb4 (diff) | |
Merge "Fix blur intrinsic creation." into jb-mr2-dev
3 files changed, 3 insertions, 3 deletions
diff --git a/graphics/java/android/renderscript/ScriptIntrinsicBlur.java b/graphics/java/android/renderscript/ScriptIntrinsicBlur.java index 7ffd1e740c59..2848f64569d6 100644 --- a/graphics/java/android/renderscript/ScriptIntrinsicBlur.java +++ b/graphics/java/android/renderscript/ScriptIntrinsicBlur.java @@ -46,7 +46,7 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic { * @return ScriptIntrinsicBlur */ public static ScriptIntrinsicBlur create(RenderScript rs, Element e) { - if ((e != Element.U8_4(rs)) && e != (Element.U8(rs))) { + if ((!e.isCompatible(Element.U8_4(rs))) && (!e.isCompatible(Element.U8(rs)))) { throw new RSIllegalArgumentException("Unsuported element type."); } int id = rs.nScriptIntrinsicCreate(5, e.getID(rs)); diff --git a/graphics/java/android/renderscript/ScriptIntrinsicColorMatrix.java b/graphics/java/android/renderscript/ScriptIntrinsicColorMatrix.java index b21997876cca..f7e844ea94db 100644 --- a/graphics/java/android/renderscript/ScriptIntrinsicColorMatrix.java +++ b/graphics/java/android/renderscript/ScriptIntrinsicColorMatrix.java @@ -47,7 +47,7 @@ public final class ScriptIntrinsicColorMatrix extends ScriptIntrinsic { * @return ScriptIntrinsicColorMatrix */ public static ScriptIntrinsicColorMatrix create(RenderScript rs, Element e) { - if (e != Element.U8_4(rs)) { + if (!e.isCompatible(Element.U8_4(rs))) { throw new RSIllegalArgumentException("Unsuported element type."); } int id = rs.nScriptIntrinsicCreate(2, e.getID(rs)); diff --git a/graphics/java/android/renderscript/ScriptIntrinsicConvolve3x3.java b/graphics/java/android/renderscript/ScriptIntrinsicConvolve3x3.java index b40ea845afca..d54df9661b48 100644 --- a/graphics/java/android/renderscript/ScriptIntrinsicConvolve3x3.java +++ b/graphics/java/android/renderscript/ScriptIntrinsicConvolve3x3.java @@ -48,7 +48,7 @@ public final class ScriptIntrinsicConvolve3x3 extends ScriptIntrinsic { */ public static ScriptIntrinsicConvolve3x3 create(RenderScript rs, Element e) { float f[] = { 0, 0, 0, 0, 1, 0, 0, 0, 0}; - if (e != Element.U8_4(rs)) { + if (!e.isCompatible(Element.U8_4(rs))) { throw new RSIllegalArgumentException("Unsuported element type."); } int id = rs.nScriptIntrinsicCreate(1, e.getID(rs)); |