diff --git a/src/com/android/launcher2/AllAppsPagedView.java b/src/com/android/launcher2/AllAppsPagedView.java
index a0f1f6e..daa5d64 100644
--- a/src/com/android/launcher2/AllAppsPagedView.java
+++ b/src/com/android/launcher2/AllAppsPagedView.java
@@ -425,6 +425,7 @@
         // add any necessary pages
         for (int i = curNumPages; i < numPages; ++i) {
             PagedViewCellLayout layout = new PagedViewCellLayout(getContext());
+            layout.enableHardwareLayers();
             layout.setCellCount(mCellCountX, mCellCountY);
             layout.setPadding(mPageLayoutPaddingLeft, mPageLayoutPaddingTop,
                     mPageLayoutPaddingRight, mPageLayoutPaddingBottom);
diff --git a/src/com/android/launcher2/CachedTextView.java b/src/com/android/launcher2/CachedTextView.java
index eaa6636..403d856 100644
--- a/src/com/android/launcher2/CachedTextView.java
+++ b/src/com/android/launcher2/CachedTextView.java
@@ -47,6 +47,7 @@
     private float mPaddingH = 0;
     private float mPaddingV = 0;
     private CharSequence mText;
+    private boolean mEnabled = true;
 
     public CachedTextView(Context context) {
         super(context);
@@ -73,6 +74,10 @@
         return 0;
     }
 
+    public void disableCache() {
+        mEnabled = false;
+    }
+
     public void setText(CharSequence text, BufferType type) {
         super.setText(text, type);
         mIsTextCacheDirty = true;
@@ -138,7 +143,7 @@
     }
 
     public void draw(Canvas canvas) {
-        if (mIsTextCacheDirty && !mIsBuildingCache) {
+        if (mEnabled && mIsTextCacheDirty && !mIsBuildingCache) {
             buildAndUpdateCache();
             mIsTextCacheDirty = false;
         }
diff --git a/src/com/android/launcher2/Launcher.java b/src/com/android/launcher2/Launcher.java
index 5ca377d..df6ff36 100644
--- a/src/com/android/launcher2/Launcher.java
+++ b/src/com/android/launcher2/Launcher.java
@@ -2675,9 +2675,6 @@
         }
 
         if (animated) {
-            final float oldScaleX = toView.getScaleX();
-            final float oldScaleY = toView.getScaleY();
-
             ValueAnimator scaleAnim = ValueAnimator.ofFloat(0f, 1f).setDuration(duration);
             scaleAnim.setInterpolator(new Workspace.ZoomOutInterpolator());
             scaleAnim.addUpdateListener(new AnimatorUpdateListener() {
@@ -2685,8 +2682,8 @@
                     final float b = (Float) animation.getAnimatedValue();
                     final float a = 1f - b;
                     ((View) toView.getParent()).fastInvalidate();
-                    toView.setFastScaleX(a * oldScaleX + b * 1f);
-                    toView.setFastScaleY(a * oldScaleY + b * 1f);
+                    toView.setFastScaleX(a * scale + b * 1f);
+                    toView.setFastScaleY(a * scale + b * 1f);
                 }
             });
 
diff --git a/src/com/android/launcher2/PagedView.java b/src/com/android/launcher2/PagedView.java
index 96b0551..45baa6c 100644
--- a/src/com/android/launcher2/PagedView.java
+++ b/src/com/android/launcher2/PagedView.java
@@ -596,7 +596,21 @@
             canvas.clipRect(mScrollX, mScrollY, mScrollX + mRight - mLeft,
                     mScrollY + mBottom - mTop);
 
+            for (int i = 0; i < pageCount; i++) {
+                View child = getChildAt(i);
+                if (child != null && child instanceof PagedViewCellLayout) {
+                    boolean willBeDrawn = i >= leftScreen && i <= rightScreen;
+                    if (!willBeDrawn) {
+                        ((PagedViewCellLayout)child).destroyHardwareLayers();
+                    }
+                }
+            }
+
             for (int i = leftScreen; i <= rightScreen; i++) {
+                View child = getChildAt(i);
+                if (child != null && child instanceof PagedViewCellLayout) {
+                    ((PagedViewCellLayout)child).createHardwareLayers();
+                }
                 drawChild(canvas, getChildAt(i), drawingTime);
             }
             canvas.restore();
diff --git a/src/com/android/launcher2/PagedViewCellLayout.java b/src/com/android/launcher2/PagedViewCellLayout.java
index 6d1fb55..d64f3c9 100644
--- a/src/com/android/launcher2/PagedViewCellLayout.java
+++ b/src/com/android/launcher2/PagedViewCellLayout.java
@@ -40,6 +40,7 @@
     private static int sDefaultCellDimensions = 96;
     protected PagedViewCellLayoutChildren mChildren;
     private PagedViewCellLayoutChildren mHolographicChildren;
+    private boolean mUseHardwareLayers = false;
 
     public PagedViewCellLayout(Context context) {
         this(context, null);
@@ -73,12 +74,29 @@
         addView(mHolographicChildren);
     }
 
+    public void enableHardwareLayers() {
+        mUseHardwareLayers = true;
+    }
+
     @Override
     public void setAlpha(float alpha) {
         mChildren.setAlpha(alpha);
         mHolographicChildren.setAlpha(1.0f - alpha);
     }
 
+    void destroyHardwareLayers() {
+        if (mUseHardwareLayers) {
+            mChildren.destroyHardwareLayer();
+            mHolographicChildren.destroyHardwareLayer();
+        }
+    }
+    void createHardwareLayers() {
+        if (mUseHardwareLayers) {
+            mChildren.createHardwareLayer();
+            mHolographicChildren.createHardwareLayer();
+        }
+    }
+
     @Override
     public void cancelLongPress() {
         super.cancelLongPress();
@@ -109,6 +127,9 @@
 
             if (child instanceof PagedViewIcon) {
                 PagedViewIcon pagedViewIcon = (PagedViewIcon) child;
+                if (mUseHardwareLayers) {
+                    pagedViewIcon.disableCache();
+                }
                 mHolographicChildren.addView(pagedViewIcon.getHolographicOutlineView(), index, lp);
             }
             return true;
diff --git a/src/com/android/launcher2/PagedViewCellLayoutChildren.java b/src/com/android/launcher2/PagedViewCellLayoutChildren.java
index 1359a43..27da02a 100644
--- a/src/com/android/launcher2/PagedViewCellLayoutChildren.java
+++ b/src/com/android/launcher2/PagedViewCellLayoutChildren.java
@@ -18,7 +18,6 @@
 
 import android.content.Context;
 import android.graphics.Rect;
-import android.view.MotionEvent;
 import android.view.View;
 import android.view.ViewGroup;
 
@@ -39,7 +38,6 @@
 
     public PagedViewCellLayoutChildren(Context context) {
         super(context);
-        setLayerType(LAYER_TYPE_HARDWARE, null);
     }
 
     @Override
@@ -140,6 +138,17 @@
         }
     }
 
+    void destroyHardwareLayer() {
+        if (getLayerType() == LAYER_TYPE_HARDWARE) {
+            setLayerType(LAYER_TYPE_NONE, null);
+        }
+    }
+    void createHardwareLayer() {
+        if (getLayerType() == LAYER_TYPE_NONE) {
+            setLayerType(LAYER_TYPE_HARDWARE, null);
+        }
+    }
+
     public void enableCenteredContent(boolean enabled) {
         mCenterContent = enabled;
     }
diff --git a/src/com/android/launcher2/PagedViewIcon.java b/src/com/android/launcher2/PagedViewIcon.java
index ca67d2f..1366619 100644
--- a/src/com/android/launcher2/PagedViewIcon.java
+++ b/src/com/android/launcher2/PagedViewIcon.java
@@ -40,7 +40,7 @@
  * An icon on a PagedView, specifically for items in the launcher's paged view (with compound
  * drawables on the top).
  */
-public class PagedViewIcon extends TextView implements Checkable {
+public class PagedViewIcon extends CachedTextView implements Checkable {
     private static final String TAG = "PagedViewIcon";
 
     // holographic outline
