diff options
author | Jason Sams <rjsams@android.com> | 2010-01-19 16:43:26 -0800 |
---|---|---|
committer | Jason Sams <rjsams@android.com> | 2010-01-19 16:43:26 -0800 |
commit | b4ecab24dbff6e6dc9e7929655a55199fc32e8dd (patch) | |
tree | bd86e40e284e0df31402a7b3d1af46e2055e6c31 /src/com/android/launcher2/Utilities.java | |
parent | 629de3ef739883c0962423cc0c3a26299f162d3d (diff) | |
download | android_packages_apps_Trebuchet-b4ecab24dbff6e6dc9e7929655a55199fc32e8dd.tar.gz android_packages_apps_Trebuchet-b4ecab24dbff6e6dc9e7929655a55199fc32e8dd.tar.bz2 android_packages_apps_Trebuchet-b4ecab24dbff6e6dc9e7929655a55199fc32e8dd.zip |
Update launcher2 with vertex shader and single draw method for icons.
Diffstat (limited to 'src/com/android/launcher2/Utilities.java')
-rw-r--r-- | src/com/android/launcher2/Utilities.java | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/com/android/launcher2/Utilities.java b/src/com/android/launcher2/Utilities.java index 55cb509bc..507096cff 100644 --- a/src/com/android/launcher2/Utilities.java +++ b/src/com/android/launcher2/Utilities.java @@ -257,7 +257,7 @@ final class Utilities { } dest.drawColor(0, PorterDuff.Mode.CLEAR); - + int[] xy = new int[2]; Bitmap mask = src.extractAlpha(sBlurPaint, xy); @@ -296,13 +296,13 @@ final class Utilities { if (width > 0 && height > 0) { if (width < bitmapWidth || height < bitmapHeight) { final float ratio = (float) bitmapWidth / bitmapHeight; - + if (bitmapWidth > bitmapHeight) { height = (int) (width / ratio); } else if (bitmapHeight > bitmapWidth) { width = (int) (height * ratio); } - + final Bitmap.Config c = (width == sIconWidth && height == sIconHeight) ? bitmap.getConfig() : Bitmap.Config.ARGB_8888; final Bitmap thumb = Bitmap.createBitmap(sIconWidth, sIconHeight, c); @@ -339,7 +339,7 @@ final class Utilities { final float density = metrics.density; sIconWidth = sIconHeight = (int) resources.getDimension(android.R.dimen.app_icon_size); - sIconTextureWidth = sIconTextureHeight = roundToPow2(sIconWidth); + sIconTextureWidth = sIconTextureHeight = sIconWidth + 2; sBlurPaint.setMaskFilter(new BlurMaskFilter(5 * density, BlurMaskFilter.Blur.NORMAL)); sGlowColorPressedPaint.setColor(0xffffc300); |