summaryrefslogtreecommitdiffstats
path: root/src/com/android/launcher2/PagedViewIcon.java
diff options
context:
space:
mode:
authorWinson Chung <winsonc@google.com>2011-04-22 14:13:05 -0700
committerWinson Chung <winsonc@google.com>2011-04-25 15:18:24 -0700
commitb46a2d130b3d04df830402d579060b63db559ae3 (patch)
tree7da5a351fc25d04923ce0778e1d473cd99867f2e /src/com/android/launcher2/PagedViewIcon.java
parent876668c132e87fb3dfe6b25eb9e07fd7ae896e33 (diff)
downloadandroid_packages_apps_Trebuchet-b46a2d130b3d04df830402d579060b63db559ae3.tar.gz
android_packages_apps_Trebuchet-b46a2d130b3d04df830402d579060b63db559ae3.tar.bz2
android_packages_apps_Trebuchet-b46a2d130b3d04df830402d579060b63db559ae3.zip
Disabling certain effects (wallpaper transition, holographic icons in AllApps) if HW acceleration is not enabled.
Change-Id: I7926d5c3ba95c6d57999189677ff79f67b05434f
Diffstat (limited to 'src/com/android/launcher2/PagedViewIcon.java')
-rw-r--r--src/com/android/launcher2/PagedViewIcon.java9
1 files changed, 6 insertions, 3 deletions
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index f1b8a01d0..95bb72f49 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -57,6 +57,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
private int mAlpha = 255;
private int mHolographicAlpha;
+ private boolean mHolographicEffectsEnabled;
private boolean mIsChecked;
private ObjectAnimator mCheckedAlphaAnimator;
private float mCheckedAlpha = 1.0f;
@@ -132,6 +133,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
}
mHolographicOutlineView = new HolographicPagedViewIcon(context, this);
+ mHolographicEffectsEnabled = isHardwareAccelerated();
}
protected HolographicPagedViewIcon getHolographicOutlineView() {
@@ -164,7 +166,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
mIconCache = cache;
mIconCacheKey = new PagedViewIconCache.Key(info);
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
- if (!queueHolographicOutlineCreation()) {
+ if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
getHolographicOutlineView().invalidate();
}
}
@@ -182,7 +184,7 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
mIconCache = cache;
mIconCacheKey = new PagedViewIconCache.Key(info);
mHolographicOutline = mIconCache.getOutline(mIconCacheKey);
- if (!queueHolographicOutlineCreation()) {
+ if (mHolographicEffectsEnabled && !queueHolographicOutlineCreation()) {
getHolographicOutlineView().invalidate();
}
}
@@ -218,7 +220,8 @@ public class PagedViewIcon extends CachedTextView implements Checkable {
// draw any blended overlays
if (mCheckedOutline == null) {
- if (mHolographicOutline != null && mHolographicAlpha > 0) {
+ if (mHolographicEffectsEnabled && mHolographicOutline != null
+ && mHolographicAlpha > 0) {
mPaint.setAlpha(mHolographicAlpha);
overlay = mHolographicOutline;
}