summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlan Viverette <alanv@google.com>2015-08-20 20:31:27 +0000
committerAndroid (Google) Code Review <android-gerrit@google.com>2015-08-20 20:31:27 +0000
commit54c807e713c0d04134108b7d13e4abd467e318d5 (patch)
treea787f1c34342256646787da8b81762fcda3d80bf
parent1773ded84684593f459b19f3271d471b38f14f85 (diff)
parentf0d69b9e33e32b60bf953fc775b7843825e99036 (diff)
downloadframeworks_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.java3
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);
}