diff options
author | Diego Perez <diegoperez@google.com> | 2015-03-05 10:13:00 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-05 10:13:02 +0000 |
commit | d5e11f6f4717cee4ccbd3fb01af802dc208cb9c9 (patch) | |
tree | 3dfe3ff25fcde941111ef747d54d94a77081d193 /tools | |
parent | be93f28d5b018859ad33423cd938fe730cd26313 (diff) | |
parent | e81096458f689ab3c0c4dbab2452722c3e3623c4 (diff) | |
download | frameworks_base-d5e11f6f4717cee4ccbd3fb01af802dc208cb9c9.zip frameworks_base-d5e11f6f4717cee4ccbd3fb01af802dc208cb9c9.tar.gz frameworks_base-d5e11f6f4717cee4ccbd3fb01af802dc208cb9c9.tar.bz2 |
Merge "Fix crash when shadowSize is 0"
Diffstat (limited to 'tools')
-rw-r--r-- | tools/layoutlib/bridge/src/android/view/ShadowPainter.java | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/tools/layoutlib/bridge/src/android/view/ShadowPainter.java b/tools/layoutlib/bridge/src/android/view/ShadowPainter.java index 38846bd..a0db7bf 100644 --- a/tools/layoutlib/bridge/src/android/view/ShadowPainter.java +++ b/tools/layoutlib/bridge/src/android/view/ShadowPainter.java @@ -65,6 +65,9 @@ public class ShadowPainter { @SuppressWarnings({"SuspiciousNameCombination", "UnnecessaryLocalVariable"}) // Imported code public static BufferedImage createDropShadow(BufferedImage source, int shadowSize, float shadowOpacity, int shadowRgb) { + if (shadowSize == 0) { + return source; + } // This code is based on // http://www.jroller.com/gfx/entry/non_rectangular_shadow |