diff options
author | Alan Viverette <alanv@google.com> | 2015-08-20 20:31:27 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-08-20 20:31:27 +0000 |
commit | 54c807e713c0d04134108b7d13e4abd467e318d5 (patch) | |
tree | a787f1c34342256646787da8b81762fcda3d80bf | |
parent | 1773ded84684593f459b19f3271d471b38f14f85 (diff) | |
parent | f0d69b9e33e32b60bf953fc775b7843825e99036 (diff) | |
download | frameworks_base-54c807e713c0d04134108b7d13e4abd467e318d5.zip frameworks_base-54c807e713c0d04134108b7d13e4abd467e318d5.tar.gz frameworks_base-54c807e713c0d04134108b7d13e4abd467e318d5.tar.bz2 |
Merge "Translate ripple mask to account for drawable bounds" into mnc-dev
-rw-r--r-- | graphics/java/android/graphics/drawable/RippleDrawable.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/graphics/java/android/graphics/drawable/RippleDrawable.java b/graphics/java/android/graphics/drawable/RippleDrawable.java index 32f6a89..464f3de 100644 --- a/graphics/java/android/graphics/drawable/RippleDrawable.java +++ b/graphics/java/android/graphics/drawable/RippleDrawable.java @@ -855,7 +855,8 @@ public class RippleDrawable extends LayerDrawable { // Position the shader to account for canvas translation. if (mMaskShader != null) { - mMaskMatrix.setTranslate(-x, -y); + final Rect bounds = getBounds(); + mMaskMatrix.setTranslate(bounds.left - x, bounds.top - y); mMaskShader.setLocalMatrix(mMaskMatrix); } |