summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanesh Mondegarian <daneshm90@gmail.com>2014-02-16 11:30:19 -0800
committerDanesh Mondegarian <daneshm90@gmail.com>2014-02-16 11:30:19 -0800
commitcb144c223edfa2a45fb0ae22791f198fd2018870 (patch)
tree9c5e9edd3008cddcc6a33b094cbe8d44c30363e1
parentbddc012ade4700b915eab8c5f8d58ac716505d4a (diff)
downloadandroid_packages_apps_Trebuchet-cb144c223edfa2a45fb0ae22791f198fd2018870.tar.gz
android_packages_apps_Trebuchet-cb144c223edfa2a45fb0ae22791f198fd2018870.tar.bz2
android_packages_apps_Trebuchet-cb144c223edfa2a45fb0ae22791f198fd2018870.zip
Trebuchet : Decouple iconMask and iconBack dependency
Allow them to function independently in the case where an icon pack only has one of them. Change-Id: I7b72bd689eac7e411f88cb5fbacea3604d45036b
-rw-r--r--src/com/android/launcher3/Utilities.java8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher3/Utilities.java b/src/com/android/launcher3/Utilities.java
index 9b5cbe7eb..282e47516 100644
--- a/src/com/android/launcher3/Utilities.java
+++ b/src/com/android/launcher3/Utilities.java
@@ -170,16 +170,16 @@ final class Utilities {
sOldBounds.set(icon.getBounds());
icon.setBounds(left, top, left+width, top+height);
canvas.save();
- if (iconMask != null && iconBack != null) {
- canvas.scale(scale, scale, width / 2, height/2);
- }
+ canvas.scale(scale, scale, width / 2, height/2);
icon.draw(canvas);
canvas.restore();
- if (iconBack != null && iconMask != null) {
+ if (iconMask != null) {
iconMask.setBounds(icon.getBounds());
((BitmapDrawable) iconMask).getPaint().setXfermode(
new PorterDuffXfermode(PorterDuff.Mode.DST_OUT));
iconMask.draw(canvas);
+ }
+ if (iconBack != null) {
canvas.setBitmap(null);
Bitmap finalBitmap = Bitmap.createBitmap(textureWidth, textureHeight,
Bitmap.Config.ARGB_8888);