summaryrefslogtreecommitdiffstats
path: root/graphics
diff options
context:
space:
mode:
authorJason Sams <jsams@google.com>2012-10-02 15:21:11 -0700
committerJason Sams <jsams@google.com>2012-10-02 15:21:11 -0700
commit31864d76a3624f2c5908218b32bf09051b1b9d24 (patch)
tree96a11f2d3e44b854a317c55047a0d95875f5d494 /graphics
parent3750db176adbaf3f9779df5eadf335f673b2ac4f (diff)
downloadframeworks_base-31864d76a3624f2c5908218b32bf09051b1b9d24.zip
frameworks_base-31864d76a3624f2c5908218b32bf09051b1b9d24.tar.gz
frameworks_base-31864d76a3624f2c5908218b32bf09051b1b9d24.tar.bz2
Fix range on blur intrinsic.
The intrinsic fails when the radius was 0. A blur of radius 0 is a nop and should be disallowed. Fix the test to allow sub-pixel radius to be selected. bug 7273437 Change-Id: I2805674e29d557615eb7ac65c7910d4dffa28b58
Diffstat (limited to 'graphics')
-rw-r--r--graphics/java/android/renderscript/ScriptIntrinsicBlur.java6
1 files changed, 3 insertions, 3 deletions
diff --git a/graphics/java/android/renderscript/ScriptIntrinsicBlur.java b/graphics/java/android/renderscript/ScriptIntrinsicBlur.java
index 61e5d4f..2a04b42 100644
--- a/graphics/java/android/renderscript/ScriptIntrinsicBlur.java
+++ b/graphics/java/android/renderscript/ScriptIntrinsicBlur.java
@@ -69,13 +69,13 @@ public final class ScriptIntrinsicBlur extends ScriptIntrinsic {
/**
* Set the radius of the Blur.
*
- * Supported range 0-25
+ * Supported range 0 < radius <= 25
*
* @param radius The radius of the blur
*/
public void setRadius(float radius) {
- if (radius < 0 || radius > 25) {
- throw new RSIllegalArgumentException("Radius out of range (0-25).");
+ if (radius <= 0 || radius > 25) {
+ throw new RSIllegalArgumentException("Radius out of range (0 < r <= 25).");
}
setVar(0, radius);
}